tmp/tmpt84h8uf6/{from.md → to.md}
RENAMED
|
@@ -15,11 +15,11 @@ it is equivalent to the associated type obtained by substitution of its
|
|
| 15 |
[*Example 1*:
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
template<class T> struct Alloc { ... };
|
| 19 |
template<class T> using Vec = vector<T, Alloc<T>>;
|
| 20 |
-
Vec<int> v; // same as vector<int, Alloc<int>
|
| 21 |
|
| 22 |
template<class T>
|
| 23 |
void process(Vec<T>& v)
|
| 24 |
{ ... }
|
| 25 |
|
|
@@ -32,11 +32,11 @@ template<template<class> class TT>
|
|
| 32 |
|
| 33 |
f(v); // error: Vec not deduced
|
| 34 |
|
| 35 |
template<template<class,class> class TT>
|
| 36 |
void g(TT<int, Alloc<int>>);
|
| 37 |
-
g(v); // OK
|
| 38 |
```
|
| 39 |
|
| 40 |
— *end example*]
|
| 41 |
|
| 42 |
However, if the *template-id* is dependent, subsequent template argument
|
|
|
|
| 15 |
[*Example 1*:
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
template<class T> struct Alloc { ... };
|
| 19 |
template<class T> using Vec = vector<T, Alloc<T>>;
|
| 20 |
+
Vec<int> v; // same as vector<int, Alloc<int>> v;
|
| 21 |
|
| 22 |
template<class T>
|
| 23 |
void process(Vec<T>& v)
|
| 24 |
{ ... }
|
| 25 |
|
|
|
|
| 32 |
|
| 33 |
f(v); // error: Vec not deduced
|
| 34 |
|
| 35 |
template<template<class,class> class TT>
|
| 36 |
void g(TT<int, Alloc<int>>);
|
| 37 |
+
g(v); // OK, TT = vector
|
| 38 |
```
|
| 39 |
|
| 40 |
— *end example*]
|
| 41 |
|
| 42 |
However, if the *template-id* is dependent, subsequent template argument
|