From a4007ce6eac5b83e90437c1dc2b30af85ad858d0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 20 Feb 2001 12:56:26 +0000 Subject: [PATCH] more tentative type_traits fixes for EDG front end [SVN r9289] --- include/boost/type_traits/alignment_traits.hpp | 2 ++ include/boost/type_traits/ice.hpp | 12 ++++++++++++ include/boost/type_traits/type_traits_test.hpp | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/alignment_traits.hpp b/include/boost/type_traits/alignment_traits.hpp index 13ceb33..52af79a 100644 --- a/include/boost/type_traits/alignment_traits.hpp +++ b/include/boost/type_traits/alignment_traits.hpp @@ -12,6 +12,7 @@ #define ALIGNMENT_TYPE_TRAITS_HPP #include +#include #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include #endif @@ -80,3 +81,4 @@ struct alignment_of #endif // ALIGNMENT_TYPE_TRAITS_HPP + diff --git a/include/boost/type_traits/ice.hpp b/include/boost/type_traits/ice.hpp index 22c0f9e..321c121 100644 --- a/include/boost/type_traits/ice.hpp +++ b/include/boost/type_traits/ice.hpp @@ -56,6 +56,17 @@ struct ice_and BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct ice_eq +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 == b2)); +}; + +template +struct ice_ne +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 != b2)); +}; } // namespace type_traits @@ -66,3 +77,4 @@ struct ice_and + diff --git a/include/boost/type_traits/type_traits_test.hpp b/include/boost/type_traits/type_traits_test.hpp index 8dd3a34..d4caa33 100644 --- a/include/boost/type_traits/type_traits_test.hpp +++ b/include/boost/type_traits/type_traits_test.hpp @@ -224,7 +224,7 @@ struct nested_test #define NESTED_DECL(what)\ template \ struct BOOST_TT_JOIN(nested_tester_,what){\ - nested_test< (0 != ::boost::what::value)> tester;\ + nested_test< (::boost::type_traits::ice_ne<0, ::boost::what::value>::value)> tester;\ BOOST_TT_JOIN(nested_tester_,what)(const char* s) : tester(::boost::what::value, s){}\ }; #define NESTED_TEST(what, with)\ @@ -360,3 +360,4 @@ struct non_empty : boost::noncopyable +