Document number:P0283R2
Date: 2016-06-22
Audience: Core Working Group


J. Daniel Garcia (josedaniel.garcia@uc3m.es)




Standard and non-standard attributes

Context

This paper provides wording for proposal P0283. For rationale and background information, please, refer to P0283R1 [1].

Proposed Wording Changes

Modify paragraph 7.6.1/3:

In an attribute-list, an ellipsis may appear only if that attribute's specification permits it. An attribute followed by an ellipsis is a pack expansion (14.5.3). An attribute-specifier that contains no attributes has no effect. The order in which the attribute-tokens appear in an attribute-list is not significant. If a keyword (2.11) or an alternative token (2.5) that satisfies the syntactic requirements of an identifier (2.10) is contained in an attribute-token, it is considered an identifier. No name lookup (3.4) is performed on any of the identifiers contained in an attribute-token. The attribute-token determines additional requirements on the attribute-argument-clause (if any). The use of an attribute-scoped-token is conditionally-supported, with implementation-defined behavior. [ Note: Each implementation should choose a distinctive name for the attribute-namespace in an attribute-scoped-token. — end note]

Modify paragraph 7.6.1/5:

For an attribute-token (including an attribute-scoped-token) not specified in this International Standard, the behavior is implementation-defined. Any attribute-token that is not recognized by the implementation is ignored. [Note: Each implementation should choose a distinctive name for the attribute-namespace in an attribute-scoped-token. — end note]

Acknowledgements

The work from J. Daniel Garcia has received funding from the European Union Seventh Framework Programme (FP7/2007-2013) under grant agreement n. 609666.

Thanks to Jens Maurer for reviewing and suggestions of the wording. Thanks to Chandler Carruth for pointing out initial ideas. Thanks to Bjarne Stroustrup, Michael Wong, Richard Smith, and Daveed Vandevoorde for useful feedback prior to the writing of this paper.

References

[1] J. Daniel Garcia. Standard and non-standard attributes. Technical Proposal P0283R1, ISO/IEC JTC1/SC22/WG21, March 2016.