Patch from Albert J. Wong to make type_traits take advantage of gcc intrinsics in 4.7 and later. No functionality change when using clang.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@211755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -339,7 +339,11 @@ typedef __char32_t char32_t;
|
||||
#endif
|
||||
|
||||
#if __has_feature(underlying_type)
|
||||
# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
|
||||
# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
|
||||
#endif
|
||||
|
||||
#if __has_feature(is_literal)
|
||||
# define _LIBCPP_IS_LITERAL(T) __is_literal(T)
|
||||
#endif
|
||||
|
||||
// Inline namespaces are available in Clang regardless of C++ dialect.
|
||||
@@ -363,6 +367,11 @@ namespace std {
|
||||
|
||||
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
||||
|
||||
#if _GNUC_VER >= 407
|
||||
#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
|
||||
#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
|
||||
#endif
|
||||
|
||||
#if !__EXCEPTIONS
|
||||
#define _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user