[cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7

Richard Smith via cfe-dev cfe-dev at lists.llvm.org
Tue Jul 11 06:02:28 PDT 2017


On 8 July 2017 at 06:16, Katsuhiko Nishimra <ktns.87 at gmail.com> wrote:

> On Fri, Jul 07, 2017 at 12:50:24PM -0700, Richard Smith wrote:
> > __has_builtin detects builtin functions. __is_aggregate is not a builtin
> > function -- it's not a function at all, since it takes a type, not a
> value.
> > But if libstdc++7 is assuming that __has_builtin can be used to detect
> type
> > trait keywords, perhaps we should make it so; it's not unreasonable to
> > expect it to be usable for this purpose.
>
> I see. Sorry to have misunderstood.
> >
> > Would you be interested in providing a patch to Clang to implement this?
>
> I don't know much about Clang's codebase, so I think it's better to send
> one to libstdc++. But how can I detect if __is_aggregate macro is
> usable? I've tried #ifdef directive but with no luck.
>

I think !__is_identifier(__is_aggregate) is the only way we have to detect
this right now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170711/662b1b8f/attachment.html>


More information about the cfe-dev mailing list