diff --git a/include/boost/type_index.hpp b/include/boost/type_index.hpp index e1994ee..4937533 100644 --- a/include/boost/type_index.hpp +++ b/include/boost/type_index.hpp @@ -38,11 +38,11 @@ namespace boost { namespace typeind { #if defined(BOOST_TYPE_INDEX_USER_TYPEINFO) && defined(BOOST_TYPE_INDEX_USER_TYPEINFO_NAME) - typedef boost::typeind::detail::type_index_base type_index; + typedef BOOST_TYPE_INDEX_USER_TYPEINFO_NAME type_index; #elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC) - typedef boost::typeind::detail::stl_type_index type_index; + typedef boost::typeind::stl_type_index type_index; #else - typedef boost::typeind::detail::ctti_type_index type_index; + typedef boost::typeind::ctti_type_index type_index; #endif typedef type_index::type_info_t type_info; diff --git a/include/boost/type_index/ctti_type_index.hpp b/include/boost/type_index/ctti_type_index.hpp index 241d8cc..c6b28c4 100644 --- a/include/boost/type_index/ctti_type_index.hpp +++ b/include/boost/type_index/ctti_type_index.hpp @@ -34,7 +34,9 @@ #include #include -namespace boost { namespace typeind { namespace detail { +namespace boost { namespace typeind { + +namespace detail { struct ctti_data { const char* typename_; @@ -46,12 +48,13 @@ inline const ctti_data& ctti_construct() BOOST_NOEXCEPT { return result; } +} // namespace detail -class ctti_type_index: public type_index_facade { - const ctti_data* data_; +class ctti_type_index: public type_index_facade { + const detail::ctti_data* data_; public: - typedef ctti_data type_info_t; + typedef detail::ctti_data type_info_t; inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT : data_(&data) @@ -85,14 +88,14 @@ template inline ctti_type_index ctti_type_index::construct() BOOST_NOEXCEPT { typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type no_ref_t; typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cvr_t; - return ctti_construct(); + return detail::ctti_construct(); } template inline ctti_type_index ctti_type_index::construct_with_cvr() BOOST_NOEXCEPT { - return ctti_construct(); + return detail::ctti_construct(); } @@ -101,7 +104,7 @@ inline ctti_type_index ctti_type_index::construct_runtime(const T* rtti_val) BOO BOOST_STATIC_ASSERT_MSG(sizeof(T) && false, "type_id_runtime(const T*) and type_index::construct_runtime(const T*) require RTTI"); - return ctti_construct(); + return detail::ctti_construct(); } template @@ -109,7 +112,7 @@ inline ctti_type_index ctti_type_index::construct_runtime(const T& rtti_val) BOO BOOST_STATIC_ASSERT_MSG(sizeof(T) && false, "type_id_runtime(const T&) and type_index::construct_runtime(const T&) require RTTI"); - return ctti_construct(); + return detail::ctti_construct(); } @@ -123,7 +126,7 @@ inline const char* ctti_type_index::name() const BOOST_NOEXCEPT { } inline std::string ctti_type_index::pretty_name() const { - std::size_t len = std::strlen(raw_name() + ctti_skip_size_at_end); + std::size_t len = std::strlen(raw_name() + detail::ctti_skip_size_at_end); while (raw_name()[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces return std::string(raw_name(), len); } @@ -144,7 +147,7 @@ inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT { } -}}} // namespace boost::typeind::detail +}} // namespace boost::typeind #endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_IPP diff --git a/include/boost/type_index/stl_type_index.hpp b/include/boost/type_index/stl_type_index.hpp index e57ea98..22813d9 100644 --- a/include/boost/type_index/stl_type_index.hpp +++ b/include/boost/type_index/stl_type_index.hpp @@ -59,7 +59,7 @@ # include #endif -namespace boost { namespace typeind { namespace detail { +namespace boost { namespace typeind { class stl_type_index : public type_index_facade< @@ -223,8 +223,9 @@ inline stl_type_index stl_type_index::construct() BOOST_NOEXCEPT { return typeid(no_cvr_t); } -template class cvr_saver{}; - +namespace detail { + template class cvr_saver{}; +} template inline stl_type_index stl_type_index::construct_with_cvr() BOOST_NOEXCEPT { @@ -232,7 +233,7 @@ inline stl_type_index stl_type_index::construct_with_cvr() BOOST_NOEXCEPT { boost::is_reference::value || boost::is_const::value || boost::is_volatile::value, - cvr_saver, + detail::cvr_saver, T >::type type; @@ -257,7 +258,7 @@ inline stl_type_index stl_type_index::construct_runtime(const T& value) BOOST_NO return typeid(value); } -}}} // namespace boost::typeind::detail +}} // namespace boost::typeind #endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP diff --git a/include/boost/type_index/type_index_facade.hpp b/include/boost/type_index/type_index_facade.hpp index 577bcb5..5f1d0b1 100644 --- a/include/boost/type_index/type_index_facade.hpp +++ b/include/boost/type_index/type_index_facade.hpp @@ -25,7 +25,7 @@ #endif #endif -namespace boost { namespace typeind { namespace detail { +namespace boost { namespace typeind { /// type_index_facade - use as a public base class for defining new /// standard-conforming iterators. @@ -198,7 +198,7 @@ inline std::size_t hash_value(const type_index_facade& lhs) B return lhs.hash_code(); } -}}} // namespace boost::typeind::detail +}} // namespace boost::typeind #endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP