id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12755,serialization/map.hpp tests for the wrong thing to figure out whether emplace_hint() exists,bangerth@…,John Maddock,"Originally from here: https://github.com/geodynamics/aspect/issues/1271 boost::serialization has this piece of code in serialization/map.hpp: ``` typename Container::iterator result = #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP s.insert(hint, t.reference()); #else s.emplace_hint(hint, t.reference()); #endif ``` The assumption must have been that BOOST_NO_CXX11_HDR_UNORDERED_MAP is indicative of whether std::map has an emplace_hint() function (which is new to C++11). The define comes from here (boost/config/stdlib/libstdcpp3.hpp): ``` // C++0x headers in GCC 4.3.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_FUNCTIONAL #endif ``` The problem is that for GCC 4.8, BOOST_NO_CXX11_HDR_UNORDERED_MAP is not set, but the libstdc++ that comes with this compiler still doesn't have emplace_hint(). In other words, if one tries to compile something with GCC 4.8 that calls this function, then it will result in a compiler error. The solution is to either exclude the ""special"" GCC 4.8 in this one location and fall back to insert(), or to have some kind of test that is actually specific to testing whether or not emplace_hint() exists.",Bugs,new,To Be Determined,serialization,Boost 1.63.0,Regression,,,bangerth@…