This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Use __is_same_as for std::is_same and std::is_same_v
- From: Romain Geissler <romain dot geissler at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Oct 2019 18:15:09 +0200
- Subject: Re: [PATCH] Use __is_same_as for std::is_same and std::is_same_v
- References: <20191011155009.GA20051@redhat.com> <CAF+LTedXm+12G=VMjx-KKSzxcbg--wt5qtyhn6f4AQBLez2ZQg@mail.gmail.com>
Le sam. 12 oct. 2019 à 17:44, Romain Geissler
<romain.geissler@gmail.com> a écrit :
>
> It looks like this creates the following error when I try to bootstrap
> clang 9.0.0 using the latest gcc and libstdc++ from trunk. Note that
> with g++, there is no problem, however it looks like clang++ has some
> problem with the new header. I don't know if this is an issue on
> libstdc++ side or clang++ side.
__is_same_as is not implemented as a compiler builtin in clang++
unlike g++, thus the error on clang 9.0.0 side. It looks like current
clang trunk doesn't define __is_same_as either. Until clang implements
this support (if it ever will), usage of __is_same_as in libstdc++
shall be conditional, only when __has_builtin(__is_same_as) is true
(however that would require that gcc implements __has_builtin, as
implemented here:
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00062.html )
Cheers,
Romain