This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Make parser revert digraph "<:"


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]