POV-Ray : Newsgroups : povray.off-topic : Adventures with C++ : Re: An actual C++ question Server Time
29 Jul 2024 04:30:25 EDT (-0400)
  Re: An actual C++ question  
From: scott
Date: 23 May 2013 10:14:06
Message: <519e242e$1@news.povray.org>
>>> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.