diff --git a/include/boost/property_tree/detail/ptree_implementation.hpp b/include/boost/property_tree/detail/ptree_implementation.hpp index dd9fd37e2..71ce6b5b8 100644 --- a/include/boost/property_tree/detail/ptree_implementation.hpp +++ b/include/boost/property_tree/detail/ptree_implementation.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #if (defined(BOOST_MSVC) && \ @@ -669,7 +670,8 @@ namespace boost { namespace property_tree } BOOST_PROPERTY_TREE_THROW(ptree_bad_data( std::string("conversion of data to type \"") + - typeid(Type).name() + "\" failed", data())); + boost::typeindex::type_id().pretty_name() + + "\" failed", data())); } template @@ -824,7 +826,8 @@ namespace boost { namespace property_tree data() = *o; } else { BOOST_PROPERTY_TREE_THROW(ptree_bad_data( - std::string("conversion of type \"") + typeid(Type).name() + + std::string("conversion of type \"") + + boost::typeindex::type_id().pretty_name() + "\" to data failed", boost::any())); } }