>> 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
|