Index: boost/type_traits/intrinsics.hpp =================================================================== --- boost/type_traits/intrinsics.hpp (revision 74056) +++ boost/type_traits/intrinsics.hpp (working copy) @@ -124,6 +124,69 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +#if defined(BOOST_CLANG) && defined(__has_feature) +# include +# include +# include + +# if __has_feature(is_union) +# define BOOST_IS_UNION(T) __is_union(T) +# endif +// # if __has_feature(is_pod) +// # define BOOST_IS_POD(T) __is_pod(T) +// # endif +// # if __has_feature(is_empty) +// # define BOOST_IS_EMPTY(T) __is_empty(T) +// # endif +# if __has_feature(has_trivial_constructor) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# endif +# if __has_feature(has_nothrow_assign) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_virtual_destructor) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) +# endif + +# if __has_feature(is_abstract) +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# endif +# if __has_feature(is_base_of) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# endif +# if __has_feature(is_class) +# define BOOST_IS_CLASS(T) __is_class(T) +# endif +# if __has_feature(is_convertible_to) +# include +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract::value) +# endif +# if __has_feature(is_enum) +# define BOOST_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(is_polymorphic) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# endif +# define BOOST_ALIGNMENT_OF(T) __alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) # include # include