>>> boost::shared_ptr<std::vector<Foo> > _foo(new std::vector<Foo>());
>>>
>>> Since some compilers will complain about using >> in a type definition
>>> (due to the ambiguity with the >> operator).
>>
>> VisualStudio compiles this perfectly. GCC point-blank fails to compile
>> it. *sigh* Gotta love the number of inconsistencies between two
>> compilers for supposedly "the same" language...
>
> You are surprised that a Microsoft product allows something that is
> frowned upon by a more anal-retentive competitor?!?
boost::shared_ptr<std::vector<Foo>> _foo(new std::vector<Foo>());
I don't see how the >> is ambiguous at all in this statement. Seems to
me like lazy/bad parser design if this trips it up.
Post a reply to this message
|