Re: 2003/2005 conlfict by Bo
Bo
Thu Jan 10 14:41:33 CST 2008
Duane Hebert wrote:
> "Ben Voigt [C++ MVP]" <rbv@nospam.nospam> wrote in message
> news:eM0h416UIHA.1164@TK2MSFTNGP02.phx.gbl...
>>
>> "Duane Hebert" <spoo@flarn.com> wrote in message
>> news:uzAGO05UIHA.4448@TK2MSFTNGP03.phx.gbl...
>>>
>>> "Carl Daniel [VC++ MVP]"
>>> <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote in message
>>> news:uNc7Fu5UIHA.5164@TK2MSFTNGP03.phx.gbl...
>>>> Duane Hebert wrote:
>>>>> Using MSVC2003.net
>>>>>
>>>>> std::vector<std::vector<int>> foo;
>>>>>
>>>>> causes an error due to the >> that should be > >
>>>>>
>>>>> but it compiles fine with MSVC2005.net. Is there a setting to
>>>>> turn this off in 2005?
>>>>
>>>> Not that I'm aware of.
>>>
>>> Disabling extensions completely doesn't seem to make
>>> this work properly either. I wonder if 2008 compiles this
>>> as well.
>>
>> I believe that the C++ standards committee changed the syntax very
>> slightly to make that work, and the newer versions implement the
>> new parser.
>
> I was under the impression that this would be true with the next
> "version" of the c++ standard. Has that one been officially
> released?
No, it has not. Hopefully next year.
The usual complaint is that compilers are late in implementing new
features. Here they are too early? :-)
To be more serious, the compiler accepts the formally correct syntax,
which is important. Having extensions as well is allowed.
>
> It would be good but I'm only even concerned due to some cross
> platform requirements so until all of the compilers that we use are
> compliant...
It depends on what platforms you intend to cross between. There are
other compilers accepting this as well.
Bo Persson