[C++ PATCH] Make parser revert digraph "<:"
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Jan 26 23:44:00 GMT 2004
"Giovanni Bajo" <giovannibajo@libero.it> writes:
| Theodore Papadopoulo wrote:
|
| > What I dislike with your patch (and I think what Gaby and other
| > dislike also) is that I will also have a message if I wrote "A[:B>".
| > Ie, as far as I understand, seeing the token sequence
| > <square bracket><:> you assume that the code contained "<::" which
| > will not be true if the code actually contained "[:".
|
| No, it will *try* parsing it, but fall back to the normal parsing if it can't
| find a syntactically-correct template argument list after it.
Yes, but
struct S { };
vector[:S> v;
is not intended to be supported. That is the whole you seem to be
missing. See Mark's message about accepting/issueing a diagnostic
only if it were '<::'.
-- Gaby
More information about the Gcc-patches
mailing list