diff --git a/include/boost/type_traits/fwd.hpp b/include/boost/type_traits/fwd.hpp index 660fdf9..5701f85 100644 --- a/include/boost/type_traits/fwd.hpp +++ b/include/boost/type_traits/fwd.hpp @@ -35,15 +35,49 @@ // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect -#define BOOST_IS_CLASS(T) false -#define BOOST_IS_ENUM(T) false -#define BOOST_IS_UNION(T) false -#define BOOST_IS_POD(T) false -#define BOOST_IS_EMPTY(T) false -#define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false -#define BOOST_HAS_TRIVIAL_COPY(T) false -#define BOOST_HAS_TRIVIAL_ASSIGN(T) false -#define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false +#ifdef BOOST_HAS_SGI_TYPE_TRAITS +# define BOOST_IS_POD(T) ::boost::is_same< ::__type_traits::is_POD_type, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< ::__type_traits::has_trivial_default_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< ::__type_traits::has_trivial_destructor, ::__true_type>::value +#endif + +#ifndef BOOST_IS_CLASS +# define BOOST_IS_CLASS(T) false +#endif + +#ifndef BOOST_IS_ENUM +# define BOOST_IS_ENUM(T) false +#endif + +#ifndef BOOST_IS_UNION +# define BOOST_IS_UNION(T) false +#endif + +#ifndef BOOST_IS_POD +# define BOOST_IS_POD(T) false +#endif + +#ifndef BOOST_IS_EMPTY +# define BOOST_IS_EMPTY(T) false +#endif + +#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false +#endif + +#ifndef BOOST_HAS_TRIVIAL_COPY +# define BOOST_HAS_TRIVIAL_COPY(T) false +#endif + +#ifndef BOOST_HAS_TRIVIAL_ASSIGN +# define BOOST_HAS_TRIVIAL_ASSIGN(T) false +#endif + +#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false +#endif namespace boost{ diff --git a/include/boost/type_traits/object_traits.hpp b/include/boost/type_traits/object_traits.hpp index 3997243..c55314e 100644 --- a/include/boost/type_traits/object_traits.hpp +++ b/include/boost/type_traits/object_traits.hpp @@ -31,6 +31,11 @@ #include #endif +#ifdef BOOST_HAS_SGI_TYPE_TRAITS +# include +# include +#endif + namespace boost{ /********************************************** diff --git a/include/boost/type_traits/type_traits_test.hpp b/include/boost/type_traits/type_traits_test.hpp index b155cba..be8c672 100644 --- a/include/boost/type_traits/type_traits_test.hpp +++ b/include/boost/type_traits/type_traits_test.hpp @@ -110,6 +110,7 @@ struct type_checker #define value_fail(v, x) \ ++test_count; \ ++failures; \ + ++expected_failures;\ std::cout << "checking value of " << #x << "...failed" << std::endl; \ std::cout << " " #x " does not compile on this compiler" << std::endl;