3 ms·
l := list<int>(lst) vs l := x < y When it reads the "<" sign, the parser doesn't know whether it is in the first situation (an instantiation of a generic
by sacado2 7y ago
l := list<int>(lst)
vs
l := x < y
When it reads the "<" sign, the parser doesn't know whether it is in the first situation (an instantiation of a generic type) or the second one (a comparison). It makes parsing harder.
It's even worse when the actual type is also a generic one, as in list<list<int>>. That's the reason why you had to write `list<list<int> >` (note the space) rather than `list<list<int>>` in C++ until C++11.