C++ Logo

sg10

Advanced search

Re: [SG10] __has_[cpp_]attribute

From: Stephen Kelly <steveire_at_[hidden]>
Date: Sun, 15 Jun 2014 08:56:05 +0200
Stephen Kelly wrote:

> 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.
>

Here's something I didn't expect: User libraries defining the __foo macros
themselves:

 https://codereview.qt-project.org/#/c/87474/1//ALL,unified

Should that be encouraged or discouraged?

Thanks,

Steve.

Received on 2014-06-15 08:56:11