mirror of
https://github.com/boostorg/property_map.git
synced 2026-01-19 04:22:15 +00:00
[issue-11] fix compilation error when using BOOST_NO_RTTI
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 ]
|
||||
;
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
leak:dynamic_properties_test
|
||||
leak:dynamic_properties_no_rtti_test
|
||||
|
||||
Reference in New Issue
Block a user