C++ Logo

SG10

Advanced search

Subject: Re: [SG10] __has_[cpp_]attribute
From: Stephen Kelly (steveire_at_[hidden])
Date: 2014-06-10 10:56:50


Richard Smith wrote:

> 1) That's a *lot* of macros. We might be able to get away with the cost
> of
> the number of macros that SG10 is currently proposing, but I would be
> *seriously* concerned about a measurable performance cost (on compiling an
> empty file, which is not actually an irrelevant concern) of predefining
> hundreds of __has_attribute macros.
>
> 2) Either of those identifiers could contain underscores, and there is no
> other separator character that works.
>
> [3) It's ugly.]

Good points.

I agree that those are more important than consistency, especially as it can
be more consistent in the future if __has_builtin() or anything else is
added in the future.

Then only the language/library feature tests would be 'inconsistent' by the
absence of __has_feature().

Thanks,

Steve.


SG10 list run by sg10-owner@lists.isocpp.org