Namespaces
Variants
Views
Actions

Difference between revisions of "Talk:cpp/language/attributes/deprecated"

From cppreference.com
(r)
Line 7: Line 7:
 
: A static data member is a variable, and thus can have this attribute.
 
: A static data member is a variable, and thus can have this attribute.
 
: The standard says "a variable or a non-static data member" which is a bit misleading, but it actually does include static data members. --[[User:D41D8CD98F|D41D8CD98F]] ([[User talk:D41D8CD98F|talk]]) 00:19, 13 January 2024 (PST)
 
: The standard says "a variable or a non-static data member" which is a bit misleading, but it actually does include static data members. --[[User:D41D8CD98F|D41D8CD98F]] ([[User talk:D41D8CD98F|talk]]) 00:19, 13 January 2024 (PST)
 +
 +
Thanks! The only reason I mention this is because there is a paper making its way through the committee that disagrees with that interpretation: [[https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2552r3.pdf P2552]]. I have emailed the author about the discrepancy.
 +
 +
[[User:Hawkinsw|hawkinsw]] ([[User talk:Hawkinsw|talk]]) 11:01, 13 January 2024 (PST)hawkinsw

Revision as of 11:01, 13 January 2024

It looks like during the reformatting between [104386 and 104484], there was a typo introduced in where the [[deprecated]] attribute can appear. According to the standard, [[deprecated]] cannot appear in the declaration of a static data member.

Should this be corrected?

hawkinsw (talk) 23:44, 12 January 2024 (PST)hawkinsw

A static data member is a variable, and thus can have this attribute.
The standard says "a variable or a non-static data member" which is a bit misleading, but it actually does include static data members. --D41D8CD98F (talk) 00:19, 13 January 2024 (PST)

Thanks! The only reason I mention this is because there is a paper making its way through the committee that disagrees with that interpretation: [P2552]. I have emailed the author about the discrepancy.

hawkinsw (talk) 11:01, 13 January 2024 (PST)hawkinsw