I\'m trying to use the C++0x unique_ptr class inside a map like so:
// compile with `g++ main.cpp -std=gnu++0x`
#include
#include
I don't believe it's possible to correctly use unique_ptr
in a map::insert
yet. Here's the GCC bug for it:
Bug 44436 - [C++0x] Implement insert(&&) and emplace* in associative and unordered containers
It looks like it may be fixed for GCC 4.6, but it won't build from SVN on vanilla Ubuntu 10.04.1 to confirm.
This is not working as of GCC svn r165422 (4.6.0).