From 8f94dbbf3563381ebf1f8db96e16692f8e351db9 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 18 Jan 2015 11:39:05 +0000 Subject: [PATCH] Inline namespace test version. --- include/boost/type_traits/add_const.hpp | 5 ++++- include/boost/type_traits/detail/config.hpp | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/add_const.hpp b/include/boost/type_traits/add_const.hpp index bf53c7a..802696c 100644 --- a/include/boost/type_traits/add_const.hpp +++ b/include/boost/type_traits/add_const.hpp @@ -10,10 +10,12 @@ #ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED #define BOOST_TT_ADD_CONST_HPP_INCLUDED -#include +#include namespace boost { +BOOST_TT_INLINE_NS + // * convert a type T to const type - add_const // this is not required since the result is always // the same as "T const", but it does suppress warnings @@ -41,6 +43,7 @@ namespace boost { typedef T& type; }; +BOOST_TT_INLINE_NS_END } // namespace boost #endif // BOOST_TT_ADD_CONST_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 2e25ad0..c1c611f 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -12,7 +12,7 @@ #ifndef BOOST_CONFIG_HPP #include #endif - +#include #include // @@ -67,6 +67,18 @@ #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) #define BOOST_TT_BROKEN_COMPILER_SPEC(x) +#ifdef BOOST_NO_CXX11_INLINE_NAMESPACES + +#define BOOST_TT_INLINE_NS +#define BOOST_TT_INLINE_NS_END + +#else + +#define BOOST_TT_INLINE_NS inline namespace BOOST_JOIN(tt, BOOST_VERSION) { +#define BOOST_TT_INLINE_NS_END } + +#endif + #endif // BOOST_TT_CONFIG_HPP_INCLUDED