>>> is lexed as >> >. But what happens if the first > closes a template argument list, should the result be equivalent to > > > or > >>?
It does matter in the following code:
template<class T> struct X { };
void operator >>(const X<int>&, int) { }
int main() {
*new X<int>>> 1;
}
The text of the FDIS says
It cannot unlex tokens and relex. So this will be a
> > >. Note that the input to a C++ implementation is first lexed into preprocessing tokens, and then those tokens are converted into C++ tokens. So first your input are the C++ tokens>> >, then the C++ parser changes these to> > >.There’s no chance you could merge those two trailing
> >tokens.