From Jason Turner

[dcl.attr.deprecated]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpmaq1js9o/{from.md → to.md} +37 -0
tmp/tmpmaq1js9o/{from.md → to.md} RENAMED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Deprecated attribute <a id="dcl.attr.deprecated">[[dcl.attr.deprecated]]</a>
2
+
3
+ The *attribute-token* `deprecated` can be used to mark names and
4
+ entities whose use is still allowed, but is discouraged for some reason.
5
+ in particular, `deprecated` is appropriate for names and entities that
6
+ are deemed obsolescent or unsafe. It shall appear at most once in each
7
+ *attribute-list*. An *attribute-argument-clause* may be present and, if
8
+ present, it shall have the form:
9
+
10
+ ``` cpp
11
+ ( string-literal )
12
+ ```
13
+
14
+ the *string-literal* in the *attribute-argument-clause* could be used to
15
+ explain the rationale for deprecation and/or to suggest a replacing
16
+ entity.
17
+
18
+ The attribute may be applied to the declaration of a class, a
19
+ *typedef-name*, a variable, a non-static data member, a function, an
20
+ enumeration, or a template specialization.
21
+
22
+ A name or entity declared without the `deprecated` attribute can later
23
+ be re-declared with the attribute and vice-versa. Thus, an entity
24
+ initially declared without the attribute can be marked as deprecated by
25
+ a subsequent redeclaration. However, after an entity is marked as
26
+ deprecated, later redeclarations do not un-deprecate the entity.
27
+ Redeclarations using different forms of the attribute (with or without
28
+ the *attribute-argument-clause* or with different
29
+ *attribute-argument-clause*s) are allowed.
30
+
31
+ Implementations may use the `deprecated `attribute to produce a
32
+ diagnostic message in case the program refers to a name or entity other
33
+ than to declare it, after a declaration that specifies the attribute.
34
+ The diagnostic message may include the text provided within the
35
+ *attribute-argument-clause* of any `deprecated` attribute applied to the
36
+ name or entity.
37
+