diff --git a/include/boost/type_traits/detail/bool_trait.hpp b/include/boost/type_traits/detail/bool_trait.hpp deleted file mode 100644 index 226d3d2..0000000 --- a/include/boost/type_traits/detail/bool_trait.hpp +++ /dev/null @@ -1,40 +0,0 @@ -//----------------------------------------------------------------------------- -// boost/type_traits/detail/bool_trait.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. - -#ifndef BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED -#define BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED - -#include "boost/mpl/bool_c.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace type_traits { - -template< bool C > struct bool_trait -{ - typedef mpl::bool_c type; - BOOST_STATIC_CONSTANT(bool, value = C); -}; - -#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -template< bool C > -bool const bool_trait::value; -#endif - -} // namespace type_traits -} // namespace boost - -#endif // BOOST_TT_DETAIL_BOOL_TRAIT_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/size_t_trait.hpp b/include/boost/type_traits/detail/size_t_trait.hpp deleted file mode 100644 index 021ed5d..0000000 --- a/include/boost/type_traits/detail/size_t_trait.hpp +++ /dev/null @@ -1,43 +0,0 @@ -//----------------------------------------------------------------------------- -// boost type_traits/aux_/size_t_trait.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. - -#ifndef BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED -#define BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED - -#include "boost/mpl/integral_c.hpp" -#include "boost/config.hpp" - -#include - -namespace boost { -namespace type_traits { - -template< std::size_t N > -struct size_t_trait -{ - typedef mpl::integral_c type; - BOOST_STATIC_CONSTANT(std::size_t, value = N); -}; - -#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -template< std::size_t N > -std::size_t const size_t_trait::value; -#endif - -} // namespace type_traits -} // namespace boost - -#endif // BOOST_TT_DETAIL_SIZE_T_TRAIT_HPP_INCLUDED diff --git a/include/boost/type_traits/detail/size_t_trait_def.hpp b/include/boost/type_traits/detail/size_t_trait_def.hpp index d88db9c..1683685 100644 --- a/include/boost/type_traits/detail/size_t_trait_def.hpp +++ b/include/boost/type_traits/detail/size_t_trait_def.hpp @@ -16,33 +16,45 @@ // no include guards, the header is intended for multiple inclusion! -#include "boost/type_traits/detail/size_t_trait.hpp" #include "boost/type_traits/detail/template_arity_spec.hpp" +#include "boost/mpl/size_t_c.hpp" #include "boost/mpl/aux_/lambda_support.hpp" -#define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,value) \ +#include + +#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200 +# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ +#else +# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ + typedef mpl::size_t_c< C > base_; \ + using base_::value; \ + /**/ +#endif + + +#define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ template< typename T > struct trait \ - : ::boost::type_traits::size_t_trait< value > \ + : mpl::size_t_c< C > \ { \ + BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ /**/ -#define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,value) \ +#define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ template<> struct trait \ - : ::boost::type_traits::size_t_trait< value > \ + : mpl::size_t_c< C > \ { \ + BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(spec)) \ }; \ -/**/ +/**/ -// BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) - -#define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,value) \ +#define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ template< param > struct trait \ - : ::boost::type_traits::size_t_trait< value > \ + : mpl::size_t_c< C > \ { \ }; \ /**/