https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109606

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Alexander from comment #0)
> This commit
> (https://github.com/gcc-mirror/gcc/commit/
> 17855eed7fc76b2cee7fbbc26f84d3c8b99be13c) introduces new helper function
> `__find_uniq_type_in_pack` that uses `__is_same` builtin. However, this
> builtin is only supported since gcc-10. There's no `#ifdef`-guard so this
> code won't compile using gcc-9 or any other compiler that doesn't provide
> `__is_same` builtin. Is it expected behaviour?

Yes. Using libstdc++ headers with older **or newer** versions of GCC is
completely unsupported. For other compilers, they need to be sufficiently close
to GCC, which means they should support built-ins added to GCC 10 by now.


> In contrast, current implementation of `std::is_same`
> (https://github.com/gcc-mirror/gcc/blob/
> b98c63e9e8ceaf9e04c28d83500f98313284c7f8/libstdc%2B%2B-v3/include/std/
> type_traits#L1392-L1406) correctly checks for
> `_GLIBCXX_HAVE_BUILTIN_IS_SAME` flag:

That was added some years ago, and I've been thinking of simplifying it.

Do you actually see a problem with any real compiler?

Reply via email to