forked from boostorg/type_traits
Merge branch 'develop' into Version2
This commit is contained in:
commit
4fb3457fe2
6 files changed
+59
-3
No files matched your search
@@ -266,6 +266,34 @@
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_volatile.hpp>
|
||||
|
||||
# define BOOST_IS_UNION(T) __oracle_is_union(T)
|
||||
# define BOOST_IS_POD(T) __oracle_is_pod(T)
|
||||
# define BOOST_IS_EMPTY(T) __oracle_is_empty(T)
|
||||
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference<T>::value && ! ::boost::is_volatile<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __oracle_has_trivial_destructor(T)
|
||||
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T))
|
||||
# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_reference<T>::value)
|
||||
# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_const<T>::value)
|
||||
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T)
|
||||
|
||||
# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T)
|
||||
//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
|
||||
# define BOOST_IS_CLASS(T) __oracle_is_class(T)
|
||||
# define BOOST_IS_ENUM(T) __oracle_is_enum(T)
|
||||
# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T)
|
||||
# define BOOST_ALIGNMENT_OF(T) __alignof__(T)
|
||||
# define BOOST_IS_FINAL(T) __oracle_is_final(T)
|
||||
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
@@ -31,6 +31,17 @@ struct is_virtual_base_of_impl
|
||||
template<typename Base, typename Derived>
|
||||
struct is_virtual_base_of_impl<Base, Derived, true_type>
|
||||
{
|
||||
union max_align
|
||||
{
|
||||
unsigned u;
|
||||
unsigned long ul;
|
||||
void* v;
|
||||
double d;
|
||||
long double ld;
|
||||
#ifndef BOOST_NO_LONG_LONG
|
||||
long long ll;
|
||||
#endif
|
||||
};
|
||||
#ifdef __BORLANDC__
|
||||
struct boost_type_traits_internal_struct_X : public virtual Derived, public virtual Base
|
||||
{
|
||||
@@ -38,6 +49,7 @@ struct is_virtual_base_of_impl<Base, Derived, true_type>
|
||||
boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
|
||||
boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
|
||||
~boost_type_traits_internal_struct_X()throw();
|
||||
max_align data[4];
|
||||
};
|
||||
struct boost_type_traits_internal_struct_Y : public virtual Derived
|
||||
{
|
||||
@@ -45,6 +57,7 @@ struct is_virtual_base_of_impl<Base, Derived, true_type>
|
||||
boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
|
||||
boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
|
||||
~boost_type_traits_internal_struct_Y()throw();
|
||||
max_align data[4];
|
||||
};
|
||||
#else
|
||||
struct boost_type_traits_internal_struct_X : public Derived, virtual Base
|
||||
@@ -53,6 +66,7 @@ struct is_virtual_base_of_impl<Base, Derived, true_type>
|
||||
boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
|
||||
boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
|
||||
~boost_type_traits_internal_struct_X()throw();
|
||||
max_align data[16];
|
||||
};
|
||||
struct boost_type_traits_internal_struct_Y : public Derived
|
||||
{
|
||||
@@ -60,6 +74,7 @@ struct is_virtual_base_of_impl<Base, Derived, true_type>
|
||||
boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
|
||||
boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
|
||||
~boost_type_traits_internal_struct_Y()throw();
|
||||
max_align data[16];
|
||||
};
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(boost_type_traits_internal_struct_X)==sizeof(boost_type_traits_internal_struct_Y)));
|
||||
|
||||
@@ -84,7 +84,7 @@ struct type_with_alignment
|
||||
typedef typename boost::detail::char_alignment<Align, boost::alignment_of<char>::value >= Align>::type type;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_TT_DISABLE_INTRINSICS)
|
||||
#if (defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130))) && !defined(BOOST_TT_DISABLE_INTRINSICS)
|
||||
namespace tt_align_ns {
|
||||
struct __attribute__((__aligned__(2))) a2 {};
|
||||
struct __attribute__((__aligned__(4))) a4 {};
|
||||
|
||||
Reference in new issue
Block a user