For containers such as std::map< std::string, std::unique_ptr< Foo >>
, it looks like emplace()
has yet to be implemented in stdc++ as of gcc 4.7.2.
Unfortunately, I can't store Foo directly by value as it is an abstract super-class.
As a simple, but inefficient, place-holder, I've just been using std::map< std::string, Foo* >
in conjunction with a std::vector< std::unique_ptr< Foo >>
for garbage collection.
Do you have a interim solution that is more efficient and more easily replaced once emplace() is available?