Skip to content
Commit 5c0ea748 authored by Arthur O'Dwyer's avatar Arthur O'Dwyer
Browse files

[libc++] Enable the optimized _IsSame on GCC as well as Clang.

However, there's a problem on both GCC and Clang: they can't mangle
`__is_same(T,U)` if it appears anywhere that affects mangling. That's
a hard error. And it turns out that GCC puts dependent return types
into the mangling more aggressively than Clang, so for GCC's benefit
we need to avoid using raw `_IsSame` in the return type of
`swap(tuple&, tuple&)`. Therefore, make `__all` into a named type
instead of an alias.

If we ever need to support a compiler without the __is_same builtin,
we can make this an alias template for `is_same<T,U>::type`.

Differential Revision: https://reviews.llvm.org/D115100
parent 50187d2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment