Commit 2d763763 by Jonathan Wakely Committed by Jonathan Wakely

Fix test for __has_unique_object_representations support in Clang

	* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
	Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
	__is_identifier to set it.

From-SVN: r251009
parent 2ae804bf
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
__is_identifier to set it.
2017-08-09 Katsuhiko Nishimra <ktns.87@gmail.com> 2017-08-09 Katsuhiko Nishimra <ktns.87@gmail.com>
* include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use
......
...@@ -2873,14 +2873,16 @@ template <typename _Base, typename _Derived> ...@@ -2873,14 +2873,16 @@ template <typename _Base, typename _Derived>
template <typename _From, typename _To> template <typename _From, typename _To>
inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
#ifdef __has_builtin #if __GNUC__ >= 7
# if !__has_builtin(__has_unique_object_representations) # define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1
// Try not to break non-GNU compilers that don't support the built-in: #elif defined(__is_identifier)
# define _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP 1 // For non-GNU compilers:
# if ! __is_identifier(__has_unique_object_representations)
# define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1
# endif # endif
#endif #endif
#ifndef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
# define __cpp_lib_has_unique_object_representations 201606 # define __cpp_lib_has_unique_object_representations 201606
/// has_unique_object_representations /// has_unique_object_representations
template<typename _Tp> template<typename _Tp>
...@@ -2890,7 +2892,7 @@ template <typename _From, typename _To> ...@@ -2890,7 +2892,7 @@ template <typename _From, typename _To>
)> )>
{ }; { };
#endif #endif
#undef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP #undef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
#if __GNUC__ >= 7 #if __GNUC__ >= 7
# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment