GNU bug report logs -
#66911
CC Mode 5.35.2 (C++//l); Noise macro being taken as anchor to class-open
Previous Next
Full log
Message #17 received at 66911 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Alan Mackenzie <acm <at> muc.de> writes:
>> Though, the anchor still anchors on the template<> line rather than the
>> struct line in:
>
>> template<size_t _Nw>
>> struct _Base_bitset
>> {
>
>> ... making it impossible (AFAICT) to create a style that implements:
>
>> template<size_t _Nw>
>> struct _Base_bitset
>> {
>> };
>
>> struct foo
>> {
>> };
>
>> instead, the former gets formatted as:
>
>> template<size_t _Nw>
>> struct _Base_bitset
>> {
>> };
>
>> Is this intended?
>
> Apologies. I missed this second point in your original bug report.
Admittedly, I had considered making it two bug reports because the
issues seemed separate to me, but I wasn't sure if one caused the other
or vice-versa. So, I don't blame you :-)
> This should be fixable, but will be more work to fix than the other
> point.
>
> I think something like the following would do it: we could add a second
> anchor point to topmost-intro-cont forms, that second point pointing at
> struct. In languages without templates/generics, or in constructs
> lacking template components, both anchor points would be the same.
>
> So you could write an alignment function which would use that second
> anchor point for class-open lines and the like. Or, just possibly, we
> might be able to make that second point the default for class-open. This
> should keep backward compatibility. I'll have to think about this.
>
> And of course, the manual and test programs will need amending, too. ;-)
That sounds lovely - thanks in advance, if you do, indeed, decide to do
it. For now, I can get this patch implemented with some manual
indenting.
Thanks for the quick fix, have a lovely day :-)
--
Arsen Arsenović
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.