C++ Logo

sg10

Advanced search

Re: [SG10] Updating SD-6 before Jacksonville

From: Aaron Ballman <aaron_at_[hidden]>
Date: Mon, 16 Nov 2015 17:16:56 -0500
On Mon, Nov 16, 2015 at 5:12 PM, Richard Smith <richard_at_[hidden]> wrote:
> On Mon, Nov 16, 2015 at 1:12 PM, Aaron Ballman <aaron_at_[hidden]>
> wrote:
>>
>> On Fri, Nov 13, 2015 at 8:58 PM, Nelson, Clark <clark.nelson_at_[hidden]>
>> wrote:
>> > Here is a draft of SD-6, updated with decisions from the Kona meeting.
>> > But
>> > naturally, there are lot of places I mark guesses that I have made.
>> >
>> > Unfortunately, because the redlining is relative to the published SD-6,
>> > it
>> > might be less than obvious what is really new -- except that we changed
>> > from
>> > N-numbers to P-numbers at this meeting.
>> >
>> > As always, corrections and contributions are most earnestly welcomed.
>>
>> I am slightly confused about:
>>
>> N4266: Attributes for namespaces and enumerators
>>
>> Example:
>>
>> enum {
>> old_val
>> #if __cpp_enumerator_attributes
>> [[deprecated]]
>> #endif
>> , new_val };
>>
>> The notion of feature testing macros for C++ attributes was not voted
>> favorably by EWG in Kona, and what I understand from reading the
>> discussion (which could be me horribly misunderstanding the feeling in
>> the room) was that there was insufficient motivation for such a thing.
>> However, this is a feature testing macro... for an attribute, just
>> with a different spelling than what SG-10 proposed.
>>
>> If we need this feature testing macro (which I believe we do), can we
>> use this as a motivating case for EWG to reconsider as to why
>> __has_cpp_attribute is valuable?
>
>
> This is feature-testing for the ability to apply an attribute to an
> enumeration, not for the [[deprecated]] attribute itself. Without the
> #ifdef, the above code would fail to parse in compilers that do not
> implement the change allowing attributes on enumerators.

And that's where my confusion used to lie. ;-) Thank you for
clarifying, Richard.

~Aaron

Received on 2015-11-16 23:16:58