diff --git a/include/boost/type_traits/detail/bool_trait_def.hpp b/include/boost/type_traits/detail/bool_trait_def.hpp index ec39ab8..b6f7d86 100644 --- a/include/boost/type_traits/detail/bool_trait_def.hpp +++ b/include/boost/type_traits/detail/bool_trait_def.hpp @@ -149,3 +149,32 @@ template< param > struct trait##_impl< sp1,sp2 > \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ /**/ #endif + +#ifndef BOOST_TT_INTEGRAL_CONSTANT +#define BOOST_TT_INTEGRAL_CONSTANT + +// +// this is not a TR1 conforming integral_constant, +// but it is a first start: +// + +namespace boost{ + +template +struct integral_constant +{ + typedef T value_type; + typedef integral_constant type; + BOOST_STATIC_CONSTANT(value_type, value = val); +}; + +BOOST_TT_AUX_BOOL_TRAIT_SPEC2(integral_constant, bool, true, true); +BOOST_TT_AUX_BOOL_TRAIT_SPEC2(integral_constant, bool, false, false); + +typedef integral_constant true_type; +typedef integral_constant false_type; + + +} + +#endif