more tentative type_traits fixes for EDG front end

[SVN r9289]
This commit is contained in:
John Maddock
2001-02-20 12:56:26 +00:00
parent 8c6c6fd022
commit a4007ce6ea
3 changed files with 16 additions and 1 deletions

View File

@ -12,6 +12,7 @@
#define ALIGNMENT_TYPE_TRAITS_HPP
#include <cstdlib>
#include <cstddef>
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
@ -80,3 +81,4 @@ struct alignment_of<const volatile void>
#endif // ALIGNMENT_TYPE_TRAITS_HPP

View File

@ -56,6 +56,17 @@ struct ice_and<true, true, true, true, true, true, true>
BOOST_STATIC_CONSTANT(bool, value = true);
};
template <bool b1, bool b2>
struct ice_eq
{
BOOST_STATIC_CONSTANT(bool, value = (b1 == b2));
};
template <bool b1, bool b2>
struct ice_ne
{
BOOST_STATIC_CONSTANT(bool, value = (b1 != b2));
};
} // namespace type_traits
@ -66,3 +77,4 @@ struct ice_and<true, true, true, true, true, true, true>

View File

@ -224,7 +224,7 @@ struct nested_test
#define NESTED_DECL(what)\
template <class T> \
struct BOOST_TT_JOIN(nested_tester_,what){\
nested_test< (0 != ::boost::what<T>::value)> tester;\
nested_test< (::boost::type_traits::ice_ne<0, ::boost::what<T>::value>::value)> tester;\
BOOST_TT_JOIN(nested_tester_,what)(const char* s) : tester(::boost::what<T>::value, s){}\
};
#define NESTED_TEST(what, with)\
@ -360,3 +360,4 @@ struct non_empty : boost::noncopyable