Using C++ with boost. In Boost.Assign can I use the new operator with map_list_of?
For example:
std::map<int, MyObject*> objects = boost::assign::map_list_of
(1, new MyObject())(2, new MyObject())(3, new MyObject())
If not, is there another way to do it?
Seems yes. This compiles fine with VS2010 & boost 1.47.