[issue-11] fix compilation error when using BOOST_NO_RTTI

This commit is contained in:
James E. King III
2022-04-23 17:07:09 +00:00
parent 5f0c02f5e3
commit eb8cf469ce
3 changed files with 4 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
#include <boost/type_traits/is_convertible.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type.hpp>
#include <boost/type_index.hpp>
#include <boost/smart_ptr.hpp>
#include <exception>
#include <map>
@@ -149,7 +150,7 @@ class dynamic_property_map_adaptor : public dynamic_property_map
using boost::put;
key_type key_ = any_cast<key_type>(in_key);
if (in_value.type() == typeid(value_type)) {
if (in_value.type() == boost::typeindex::type_id<value_type>()) {
put(property_map_, key_, any_cast<value_type>(in_value));
} else {
// if in_value is an empty string, put a default constructed value_type.

View File

@@ -21,6 +21,7 @@ test-suite property_map
: [ compile property_map_cc.cpp ]
[ run compose_property_map_test.cpp ]
[ run dynamic_properties_test.cpp ]
[ run dynamic_properties_test.cpp : : : <define>BOOST_NO_RTTI=1 : dynamic_properties_no_rtti_test ]
[ run function_property_map_test.cpp ]
[ run transform_value_property_map_test.cpp ]
;

View File

@@ -1 +1,2 @@
leak:dynamic_properties_test
leak:dynamic_properties_no_rtti_test