forked from boostorg/type_traits
Updated type_traits intrinsic support for VC8/9.
Updated type_traits intrinsics docs. [SVN r44017]
This commit is contained in:
1 parent
713516cd7d
commit
4298d36237
94 files changed
+747
-809
No files matched your search
@@ -39,6 +39,7 @@
|
||||
// BOOST_IS_ABSTRACT(T) true if T is an abstract type
|
||||
// BOOST_IS_BASE_OF(T,U) true if T is a base class of U
|
||||
// BOOST_IS_CLASS(T) true if T is a class type
|
||||
// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U
|
||||
// BOOST_IS_ENUM(T) true is T is an enum
|
||||
// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type
|
||||
|
||||
@@ -81,6 +82,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
|
||||
# define BOOST_IS_UNION(T) __is_union(T)
|
||||
# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
|
||||
# define BOOST_IS_EMPTY(T) __is_empty(T)
|
||||
@@ -92,6 +95,16 @@
|
||||
# define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T)
|
||||
# define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T)
|
||||
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
|
||||
# define BOOST_IS_ABSTRACT(T) __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) __is_class(T)
|
||||
// This one doesn't quite always do the right thing:
|
||||
// # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U)
|
||||
# define BOOST_IS_ENUM(T) __is_enum(T)
|
||||
// This one doesn't quite always do the right thing:
|
||||
// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
|
||||
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
@@ -133,6 +146,8 @@
|
||||
# define BOOST_IS_CLASS(T) __is_class(T)
|
||||
# define BOOST_IS_ENUM(T) __is_enum(T)
|
||||
# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
|
||||
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_IS_UNION
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
#ifndef BOOST_IS_CONVERTIBLE
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <boost/type_traits/config.hpp>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
@@ -28,11 +30,15 @@
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_IS_CONVERTIBLE
|
||||
|
||||
// should be always the last #include directive
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
#ifndef BOOST_IS_CONVERTIBLE
|
||||
|
||||
// is one type convertable to another?
|
||||
//
|
||||
// there are multiple versions of the is_convertible
|
||||
@@ -411,6 +417,12 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,v
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch<From,To>::value))
|
||||
|
||||
#else
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To))
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
|
||||
Reference in new issue
Block a user