In article <2r*************@uni-berlin.de>,
John Harrison <jo*************@hotmail.com> wrote:
"Sachin Garg" <sc*****@gmail.com> wrote in message
news:b3*************************@posting.google.c om... "John Harrison" <jo*************@hotmail.com> wrote in message
news:<2r*************@uni-berlin.de>... > "Johan" <me@knoware.nl> wrote in message
> news:10*************@corp.supernews.com...
> ....
> list< DataVariant<string> > DataList2;
>
> The only thing to watch out for is that you must put a space between the
> first > and the second >.
I thought this 'space' problem was only in my VC compiler. Or is it
true across others like gcc too? Is there a specific reason why this
issue cant be removed from compilers?
It's true on all compilers. The rules of C++ say that >> is the right shift
operator, so you must put in a space.
These rules may change in the future, and no doubt some compilers are smart
enough to figure out what you really meant, but as it stands at the moment a
space is required.
Comeau C++'s current error on something like that is:
error: space required between adjacent ">" delimiters of
nested template argument lists (">>" is the right shift operator)
so it's able to figure out some of the cases, and eventually probably
will accept it (silently or with a warning, depending upon the mode
requested, and whether this is resolved in some manner in C++0x).
--
Greg Comeau / Comeau C++ 4.3.3, for C++03 core language support
Comeau C/C++ ONLINE ==>
http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?