Hello fellow C++ programmers. I have, what I hope to be, a quick question about STL containers:
std::list<std::string> l;
This statement compiles fine when used in some C++ sourcefile (with the appropriate includes). But
std::list<const std::string> m;
or
std::list<std::string * const> n;
fails to compile when using gcc (gcc version 4.0.1 (Apple Inc. build 5484)). However, using the Visual Studio 2008 C++ compiler, no complaints arise.
A little research unearths that elements in STL containers have to be Assignable
. Is there a STL bug in the VC implementation (I'd say: 'unlikely') or do they use another concept of Assignable
?