aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-01-10 19:00:49 -0500
committerPatrick Palka <ppalka@redhat.com>2024-01-10 19:00:49 -0500
commitc84363b8c5c8b545ea922fd2aa12f14f17990815 (patch)
tree70bc08ba89de55cb10e1e223dae39530e74a6d03
parent3b8ef3f25ed68790f77eea8ea445b7c9144c8ca6 (diff)
downloadgcc-c84363b8c5c8b545ea922fd2aa12f14f17990815.zip
gcc-c84363b8c5c8b545ea922fd2aa12f14f17990815.tar.gz
gcc-c84363b8c5c8b545ea922fd2aa12f14f17990815.tar.bz2
libstdc++: Use _GLIBCXX_USE_BUILTIN_TRAIT for _Nth_type
Since _Nth_type has a fallback native implementation, use _GLIBCXX_USE_BUILTIN_TRAIT when checking for __type_pack_element so that we can easily toggle which implementation to use. libstdc++-v3/ChangeLog: * include/bits/utility.h (_Nth_type): Use _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
-rw-r--r--libstdc++-v3/include/bits/utility.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/utility.h b/libstdc++-v3/include/bits/utility.h
index 45d7241..d8a5fb9 100644
--- a/libstdc++-v3/include/bits/utility.h
+++ b/libstdc++-v3/include/bits/utility.h
@@ -225,7 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // C++17
-#if __has_builtin(__type_pack_element)
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__type_pack_element)
template<size_t _Np, typename... _Types>
struct _Nth_type
{ using type = __type_pack_element<_Np, _Types...>; };