Skip to content

Commit 3b7c3cc

Browse files
committed
Use boost::core::type_name instead of typeid().name(). Closes #107.
1 parent e7f9db6 commit 3b7c3cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/boost/property_tree/detail/ptree_implementation.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <boost/iterator/reverse_iterator.hpp>
1616
#include <boost/assert.hpp>
1717
#include <boost/core/invoke_swap.hpp>
18+
#include <boost/core/type_name.hpp>
1819
#include <memory>
1920

2021
#if (defined(BOOST_MSVC) && \
@@ -669,7 +670,7 @@ namespace boost { namespace property_tree
669670
}
670671
BOOST_PROPERTY_TREE_THROW(ptree_bad_data(
671672
std::string("conversion of data to type \"") +
672-
typeid(Type).name() + "\" failed", data()));
673+
boost::core::type_name<Type>() + "\" failed", data()));
673674
}
674675

675676
template<class K, class D, class C>
@@ -824,7 +825,7 @@ namespace boost { namespace property_tree
824825
data() = *o;
825826
} else {
826827
BOOST_PROPERTY_TREE_THROW(ptree_bad_data(
827-
std::string("conversion of type \"") + typeid(Type).name() +
828+
std::string("conversion of type \"") + boost::core::type_name<Type>() +
828829
"\" to data failed", boost::any()));
829830
}
830831
}

0 commit comments

Comments
 (0)