So a while ago I were playing with Boost.Extension example. They used
std::map<std::string, factory<computer> > computers;
computers.swap(types.get());
But when I started porting project from bjam to premake to visual studio project 2008 I found out that I can not use method they used for creating map. I always got Compiler Error C2512 on that line (actually on line 74 inside Boost.Extension type_map.hpp). So I used way of creating a link to a map:
map<string, factory<computer> >& computers(types.get());
(they used in some of there tutorials) and it all compiled. I am quite new to C++ and probably do not get alot.
So what is difference between creation of a map from link vs simple creation of a map, in this case and in general?
Update - full error message
Error 1 error C2512: boost::extensions::basic_type_map::type_map_convertible::type_holder: no appropriate default constructor available c:\users\avesta\downloads\extension-svn-source\boost\extension\type_map.hpp 74 Mltiple-Inheritance