summaryrefslogtreecommitdiff
path: root/boost/log/attributes
diff options
context:
space:
mode:
Diffstat (limited to 'boost/log/attributes')
-rw-r--r--boost/log/attributes/attribute_value.hpp8
-rw-r--r--boost/log/attributes/attribute_value_impl.hpp3
-rw-r--r--boost/log/attributes/current_thread_id.hpp2
-rw-r--r--boost/log/attributes/fallback_policy.hpp8
4 files changed, 11 insertions, 10 deletions
diff --git a/boost/log/attributes/attribute_value.hpp b/boost/log/attributes/attribute_value.hpp
index 95014c19ad..7cc11bfa8e 100644
--- a/boost/log/attributes/attribute_value.hpp
+++ b/boost/log/attributes/attribute_value.hpp
@@ -15,11 +15,11 @@
#ifndef BOOST_LOG_ATTRIBUTE_VALUE_HPP_INCLUDED_
#define BOOST_LOG_ATTRIBUTE_VALUE_HPP_INCLUDED_
+#include <boost/type_index.hpp>
#include <boost/move/core.hpp>
#include <boost/smart_ptr/intrusive_ptr.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/utility/explicit_operator_bool.hpp>
-#include <boost/log/utility/type_info_wrapper.hpp>
#include <boost/log/utility/type_dispatch/type_dispatcher.hpp>
#include <boost/log/attributes/attribute.hpp>
#include <boost/log/attributes/value_extraction_fwd.hpp>
@@ -103,7 +103,7 @@ public:
/*!
* \return The attribute value type
*/
- virtual type_info_wrapper get_type() const { return type_info_wrapper(); }
+ virtual typeindex::type_index get_type() const { return typeindex::type_index(); }
};
private:
@@ -166,12 +166,12 @@ public:
* the information cannot be provided. If the returned value is not empty, the type
* can be used for value extraction.
*/
- type_info_wrapper get_type() const
+ typeindex::type_index get_type() const
{
if (m_pImpl.get())
return m_pImpl->get_type();
else
- return type_info_wrapper();
+ return typeindex::type_index();
}
/*!
diff --git a/boost/log/attributes/attribute_value_impl.hpp b/boost/log/attributes/attribute_value_impl.hpp
index 99bf022e72..50ba812271 100644
--- a/boost/log/attributes/attribute_value_impl.hpp
+++ b/boost/log/attributes/attribute_value_impl.hpp
@@ -15,6 +15,7 @@
#ifndef BOOST_LOG_ATTRIBUTES_ATTRIBUTE_VALUE_IMPL_HPP_INCLUDED_
#define BOOST_LOG_ATTRIBUTES_ATTRIBUTE_VALUE_IMPL_HPP_INCLUDED_
+#include <boost/type_index.hpp>
#include <boost/move/core.hpp>
#include <boost/move/utility.hpp>
#include <boost/type_traits/remove_cv.hpp>
@@ -87,7 +88,7 @@ public:
/*!
* \return The attribute value type
*/
- type_info_wrapper get_type() const { return type_info_wrapper(typeid(value_type)); }
+ typeindex::type_index get_type() const { return typeindex::type_id< value_type >(); }
/*!
* \return Reference to the contained value.
diff --git a/boost/log/attributes/current_thread_id.hpp b/boost/log/attributes/current_thread_id.hpp
index 0861a370be..23573e38be 100644
--- a/boost/log/attributes/current_thread_id.hpp
+++ b/boost/log/attributes/current_thread_id.hpp
@@ -79,7 +79,7 @@ protected:
return new detached_value(boost::log::aux::this_thread::get_id());
}
- type_info_wrapper get_type() const { return type_info_wrapper(typeid(value_type)); }
+ typeindex::type_index get_type() const { return typeindex::type_id< value_type >(); }
};
public:
diff --git a/boost/log/attributes/fallback_policy.hpp b/boost/log/attributes/fallback_policy.hpp
index 549b81df9f..cde3e94623 100644
--- a/boost/log/attributes/fallback_policy.hpp
+++ b/boost/log/attributes/fallback_policy.hpp
@@ -15,11 +15,11 @@
#ifndef BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_HPP_INCLUDED_
#define BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_HPP_INCLUDED_
+#include <boost/type_index.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/exceptions.hpp>
-#include <boost/log/utility/type_info_wrapper.hpp>
#include <boost/log/attributes/fallback_policy_fwd.hpp>
#include <boost/log/detail/header.hpp>
@@ -59,7 +59,7 @@ struct fallback_to_none
/*!
* The method is called when value extraction failed because the attribute value has different type than requested.
*/
- static void on_invalid_type(type_info_wrapper const&)
+ static void on_invalid_type(typeindex::type_index const&)
{
}
@@ -99,7 +99,7 @@ struct fallback_to_throw
/*!
* The method is called when value extraction failed because the attribute value has different type than requested.
*/
- static void on_invalid_type(type_info_wrapper const& t)
+ static void on_invalid_type(typeindex::type_index const& t)
{
BOOST_LOG_THROW_DESCR_PARAMS(invalid_type, "Attribute value has incompatible type", (t));
}
@@ -161,7 +161,7 @@ struct fallback_to_default
/*!
* The method is called when value extraction failed because the attribute value has different type than requested.
*/
- static void on_invalid_type(type_info_wrapper const&)
+ static void on_invalid_type(typeindex::type_index const&)
{
}