forked from boostorg/type_traits
Merge branch 'develop' of https://github.com/boostorg/type_traits into develop
This commit is contained in:
commit
383c44d577
3 files changed
+36
-2
No files matched your search
@@ -17,6 +17,10 @@
|
||||
#include <boost/type_traits/detail/ice_or.hpp>
|
||||
#include <boost/type_traits/detail/ice_not.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
#include <boost/type_traits/is_copy_constructible.hpp>
|
||||
#endif
|
||||
|
||||
// should be the last #include
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
@@ -28,7 +32,11 @@ template <typename T>
|
||||
struct has_trivial_copy_impl
|
||||
{
|
||||
#ifdef BOOST_HAS_TRIVIAL_COPY
|
||||
# ifdef __clang__
|
||||
BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T) && boost::is_copy_constructible<T>::value);
|
||||
# else
|
||||
BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T));
|
||||
# endif
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
(::boost::type_traits::ice_and<
|
||||
@@ -38,6 +46,16 @@ struct has_trivial_copy_impl
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __clang__
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct has_trivial_copy_impl<T[N]>
|
||||
{
|
||||
static const bool value = has_trivial_copy_impl<T>::value;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl<T>::value)
|
||||
|
||||
@@ -181,8 +181,7 @@
|
||||
# define BOOST_IS_CLASS(T) __is_class(T)
|
||||
# endif
|
||||
# if __has_feature(is_convertible_to)
|
||||
# include <boost/type_traits/is_abstract.hpp>
|
||||
# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract<U>::value)
|
||||
# define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U)
|
||||
# endif
|
||||
# if __has_feature(is_enum)
|
||||
# define BOOST_IS_ENUM(T) __is_enum(T)
|
||||
|
||||
Reference in new issue
Block a user