]> git.ipfire.org Git - thirdparty/gcc.git/commit
Only use GCC-specific __is_same_as built-in conditionally
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Oct 2019 10:26:05 +0000 (10:26 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Oct 2019 10:26:05 +0000 (10:26 +0000)
commitdd114a9a128a759a93911f0389fb735f6a099d20
treecb601b79c1cdca52fd0dfccc8addf287e5b99c97
parent3384dcbc6dd2ee52d58773bc764f0896e3ff63d0
Only use GCC-specific __is_same_as built-in conditionally

Clang doesn't support __is_same_as but provides __is_same instead.
Restore the original implementation (pre r276891) when neither of those
built-ins is available.

* include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
one of __is_same_as or __is_same when available.
* include/std/concepts (__detail::__same_as): Use std::is_same_v.
* include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
Use new macro instead of __is_same_as.
(is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
specialization.
(is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
(is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277058 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/std/concepts
libstdc++-v3/include/std/type_traits