From 15731376ea5009f01ffdfefdd43554833d8a5eb3 Mon Sep 17 00:00:00 2001 From: Chris Glover Date: Sat, 20 Feb 2016 12:22:52 -0500 Subject: [PATCH] Replace the usage of typeid with boost::typeindex in order to allow compiling without rtti support. --- include/boost/property_tree/detail/ptree_implementation.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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())); } }