You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attribute may be applied to the declaration of a class, a typedef-name, a variable (including a structured binding declaration), a non-static data member, a function, a namespace, an enumeration, an enumerator, a concept, or a template specialization.
PS: The wording seemingly allows deprecating local variables, which seems of questionable usefulness.
The text was updated successfully, but these errors were encountered:
This a (small) feature request, and thus needs a paper to EWG. I believe there is no doubt the status quo wording in the Working Draft is clear that this is ill-formed.
And the wording doesn't do what you want it to do; the "variable" here refers to the hidden variable that is declared by a structured binding declaration, where G refers to a subobject of that variable.
[dcl.attr.deprecated]
Issue description:
The following code seem somewhat sensible, and there does not seem to be a a good reason for it to be disallowed
Suggested resolution:
The proposed warning mirror that of
[[maybe_unused]]
Edit [dcl.attr.deprecated]/p2
The attribute may be applied to the declaration of a class, a typedef-name, a variable (including a structured binding declaration), a non-static data member, a function, a namespace, an enumeration, an enumerator, a concept, or a template specialization.
PS: The wording seemingly allows deprecating local variables, which seems of questionable usefulness.
The text was updated successfully, but these errors were encountered: