From 2ae804bf9dbc3a139cd267f123be909d07e70b78 Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Wed, 9 Aug 2017 21:37:52 +0000 Subject: [PATCH] Fix test for __is_aggregate support in Clang 2017-08-09 Katsuhiko Nishimra * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use __is_identifier instead of __has_builtin. From-SVN: r251008 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/std/type_traits | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 75a454718df..db0d38e78cb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2017-08-09 Katsuhiko Nishimra + + * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use + __is_identifier instead of __has_builtin. + 2017-08-09 Jonathan Wakely PR libstdc++/79820 diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 390b6f40af5..ee9c75bafbd 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -2894,9 +2894,9 @@ template #if __GNUC__ >= 7 # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 -#elif defined __has_builtin +#elif defined(__is_identifier) // For non-GNU compilers: -# if __has_builtin(__is_aggregate) +# if ! __is_identifier(__is_aggregate) # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # endif #endif -- 2.30.2