From Jason Turner

[temp.arg.type]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpi2bdzkfc/{from.md → to.md} +5 -14
tmp/tmpi2bdzkfc/{from.md → to.md} RENAMED
@@ -1,10 +1,12 @@
1
  ### Template type arguments <a id="temp.arg.type">[[temp.arg.type]]</a>
2
 
3
  A *template-argument* for a *template-parameter* which is a type shall
4
  be a *type-id*.
5
 
 
 
6
  ``` cpp
7
  template <class T> class X { };
8
  template <class T> void f(T t) { }
9
  struct { } unnamed_obj;
10
 
@@ -20,21 +22,10 @@ void f() {
20
  f(unnamed_obj); // OK
21
  f(b); // OK
22
  }
23
  ```
24
 
25
- A template type argument may be an incomplete type ([[basic.types]]).
26
 
27
- If a declaration acquires a function type through a type dependent on a
28
- *template-parameter* and this causes a declaration that does not use the
29
- syntactic form of a function declarator to have function type, the
30
- program is ill-formed.
31
-
32
- ``` cpp
33
- template<class T> struct A {
34
- static T t;
35
- };
36
- typedef int function();
37
- A<function> a; // ill-formed: would declare A<function>::t
38
- // as a static member function
39
- ```
40
 
 
1
  ### Template type arguments <a id="temp.arg.type">[[temp.arg.type]]</a>
2
 
3
  A *template-argument* for a *template-parameter* which is a type shall
4
  be a *type-id*.
5
 
6
+ [*Example 1*:
7
+
8
  ``` cpp
9
  template <class T> class X { };
10
  template <class T> void f(T t) { }
11
  struct { } unnamed_obj;
12
 
 
22
  f(unnamed_obj); // OK
23
  f(b); // OK
24
  }
25
  ```
26
 
27
+ *end example*]
28
 
29
+ [*Note 1*: A template type argument may be an incomplete type (
30
+ [[basic.types]]). *end note*]
 
 
 
 
 
 
 
 
 
 
 
31