C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [+externe Mail+] Re: [isocpp-core] Ignorability of attributes: draft wording, and concern about __has_c_attribute

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Wed, 8 Feb 2023 18:59:24 +0000
Am Mittwoch, dem 08.02.2023 um 18:31 +0000 schrieb Herring, Davis via Liaison:
> > Feel free to file a comment for CD2, but I'd be strongly opposed to
> > it. I've been asking around to see what less senior programmers think
> > of the EWG direction on the poll yesterday. I've yet to find someone
> > who understands it, even after I explain the reasoning as best I can.
> > Universally, the response has been "but I thought __has_cpp_attribute
> > told me if the attribute does the thing, why would I care if it parses
> > but doesn't do anything?". I think the current direction is going to
> > break a lot of user expectations.
>
> I'm not sure why this is different from any other feature-test macro. If I check __cpp_lib_execution, that means that I have that feature -- which is defined as "you can, syntactically,
> supply an ExecutionPolicy, and it might make the code faster". I don't find out whether it's faster; I find out whether I can ask for it to be faster. If I check
> __has_cpp_attribute(assume), that means that I have that feature -- which is defined as "you can, syntactically, supply assumptions, and it might make the code faster". I don't find out
> whether it's faster; I find out whether I can ask for it to be faster.


What would be the use case for this?

Martin

Received on 2023-02-08 18:59:28