id summary reporter owner description type status milestone component version severity resolution keywords cc 3874 [map0 / insert] inserting into map0 does not work without including map10.hpp Jeffrey Hellrung Aleksey Gurtovoy "The following does not compile on MSVC9: {{{ #include #include #include typedef boost::mpl::insert< boost::mpl::map0<>, boost::mpl::pair< void, void > >::type map1_type; typedef boost::mpl::insert< map1_type, boost::mpl::pair< int, int > >::type map2_type; int main() { } }}} The compiler output is {{{ 1>------ Build started: Project: test, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>d:\boost_1_41_0\boost\mpl\insert.hpp(32) : error C2903: 'apply' : symbol is neither a class template nor a function template 1> d:\test\main.cpp(13) : see reference to class template instantiation 'boost::mpl::insert' being compiled 1> with 1> [ 1> Sequence=map1_type, 1> Pos_or_T=boost::mpl::pair 1> ] 1>d:\boost_1_41_0\boost\mpl\insert.hpp(32) : error C2039: 'apply' : is not a member of 'boost::mpl::insert_impl' 1> d:\boost_1_41_0\boost\mpl\aux_\insert_impl.hpp(64) : see declaration of 'boost::mpl::insert_impl' 1>d:\boost_1_41_0\boost\mpl\insert.hpp(32) : error C2955: 'boost::mpl::apply' : use of class template requires template argument list 1> d:\boost_1_41_0\boost\mpl\aux_\preprocessed\plain\apply.hpp(134) : see declaration of 'boost::mpl::apply' 1>d:\boost_1_41_0\boost\mpl\insert.hpp(32) : error C2143: syntax error : missing ',' before '<' 1>d:\test\main.cpp(13) : error C2039: 'type' : is not a member of 'boost::mpl::insert' 1> with 1> [ 1> Sequence=map1_type, 1> Pos_or_T=boost::mpl::pair 1> ] 1>d:\test\main.cpp(13) : error C2146: syntax error : missing ';' before identifier 'map2_type' 1>d:\test\main.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\test\main.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>Build log was saved at ""file://d:\test\Debug\BuildLog.htm"" 1>test - 8 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== }}} A fix (which took me a while to figure out, since the above error message didn't give me any clues) is to include . I think either a note should be made in the documentation for insert, the error message should be more helpful (maybe a comment in mpl/insert.hpp line 32???), or the above code should ""just work""." Bugs new Boost 1.42.0 mpl Boost 1.41.0 Problem mpl map0 insert