POV-Ray : Newsgroups : povray.off-topic : Adventures with C++ : Re: An actual C++ question Server Time
29 Jul 2024 04:31:54 EDT (-0400)
  Re: An actual C++ question  
From: Orchid Win7 v1
Date: 23 May 2013 03:22:34
Message: <519dc3ba$1@news.povray.org>
>> boost::shared_ptr<std::vector<Foo>> _foo(new std::vector<Foo>());
>
> Oh, and it's probably best to write it like this:
>
> 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...

(VC emits endless warnings about "printf may be unsafe; please use 
printf_s instead". Apparently the latter function doesn't exist in GCC...)


Post a reply to this message

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