[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24195: 25.0.95; Wrong indentation after a 'less < than' comparison (
From: |
npostavs |
Subject: |
bug#24195: 25.0.95; Wrong indentation after a 'less < than' comparison (c++-mode) |
Date: |
Wed, 24 Aug 2016 21:24:43 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
tags 24195 wontfix
quit
Alan Mackenzie <acm@muc.de> writes:
>> So could we say "<" can't be a template opener when it comes after a
>> close paren except for the close paren of "operator()"?
>
> We could, but I can't see it helping very much (though it might help a
> little bit).
>
> There are probably quite a lot of special cases like that where it is
> possible to say for sure that the "<" does/doesn't introduce a template
> construct. But that will leave a lot of ambiguous cases. The more we
> try to analyse these, the closer we get to building a compiler inside CC
> Mode. For example, the example given might have been "k < l() && ....",
> leaving no syntactic clues about the templateicity of "<".
>
> Analysing the C++ syntax to determine these determinable cases would be
> a lot of work, and it would be a lot of work to implement it, too.
>
> The C++ standards people haven't thought it worthwhile to preserve
> unambigious syntax in their language, so there is no way CC Mode can get
> it right every time.
Makes sense, I've been out of C++ for some time, so I kind of forgot how
ridiculous the syntax is. Marking as wontfix.