From Jason Turner

[temp.concept]

Diff to HTML by rtfpessoa

tmp/tmpxwf833_o/{from.md → to.md} RENAMED
@@ -3,20 +3,21 @@
3
  A *concept* is a template that defines constraints on its template
4
  arguments.
5
 
6
  ``` bnf
7
  concept-definition:
8
- concept concept-name '=' constraint-expression ';'
9
  ```
10
 
11
  ``` bnf
12
  concept-name:
13
  identifier
14
  ```
15
 
16
  A *concept-definition* declares a concept. Its *identifier* becomes a
17
- *concept-name* referring to that concept within its scope.
 
18
 
19
  [*Example 1*:
20
 
21
  ``` cpp
22
  template<typename T>
@@ -32,20 +33,21 @@ template<C T> // C, as a type-constraint, constrains f2(T)
32
  T f2(T x) { return x; }
33
  ```
34
 
35
  — *end example*]
36
 
37
- A *concept-definition* shall appear at namespace scope
38
  [[basic.scope.namespace]].
39
 
40
  A concept shall not have associated constraints [[temp.constr.decl]].
41
 
42
  A concept is not instantiated [[temp.spec]].
43
 
44
  [*Note 1*: A concept-id [[temp.names]] is evaluated as an expression. A
45
  concept cannot be explicitly instantiated [[temp.explicit]], explicitly
46
- specialized [[temp.expl.spec]], or partially specialized. — *end note*]
 
47
 
48
  The *constraint-expression* of a *concept-definition* is an unevaluated
49
  operand [[expr.context]].
50
 
51
  The first declared template parameter of a concept definition is its
 
3
  A *concept* is a template that defines constraints on its template
4
  arguments.
5
 
6
  ``` bnf
7
  concept-definition:
8
+ concept concept-name attribute-specifier-seqₒₚₜ '=' constraint-expression ';'
9
  ```
10
 
11
  ``` bnf
12
  concept-name:
13
  identifier
14
  ```
15
 
16
  A *concept-definition* declares a concept. Its *identifier* becomes a
17
+ *concept-name* referring to that concept within its scope. The optional
18
+ *attribute-specifier-seq* appertains to the concept.
19
 
20
  [*Example 1*:
21
 
22
  ``` cpp
23
  template<typename T>
 
33
  T f2(T x) { return x; }
34
  ```
35
 
36
  — *end example*]
37
 
38
+ A *concept-definition* shall inhabit a namespace scope
39
  [[basic.scope.namespace]].
40
 
41
  A concept shall not have associated constraints [[temp.constr.decl]].
42
 
43
  A concept is not instantiated [[temp.spec]].
44
 
45
  [*Note 1*: A concept-id [[temp.names]] is evaluated as an expression. A
46
  concept cannot be explicitly instantiated [[temp.explicit]], explicitly
47
+ specialized [[temp.expl.spec]], or partially specialized
48
+ [[temp.spec.partial]]. — *end note*]
49
 
50
  The *constraint-expression* of a *concept-definition* is an unevaluated
51
  operand [[expr.context]].
52
 
53
  The first declared template parameter of a concept definition is its