Created on 2025-10-23.00:00:00 last changed 1 month ago
Proposed resolution (approved by CWG 2025-11-04):
Change in 13.7.8 [temp.alias] paragraph 2 as follows:
Athat designates the specialization of an alias template is equivalent to the associated type obtained by substitution of its template-arguments for the template-parameter s in the defining-type-id of the alias template. Any other template-id that names a specialization of an alias template is a typedef-name for a type alias; such a template-id is ill-formed if forming the associated type results in substitution failure. ...
- template-id that is not the operand of a reflect-expression or
- splice-specialization-specifier
(From submission #782.)
P2996 added the idea that a type alias can result from instantiation of an alias template; however, the timing of the instantiation (and its relation to the immediate context) is unspecified.
Consider:
#include <meta> using namespace std::meta; template <typename T> using A = T *; template <auto> struct Sink; template <typename T> void f(Sink<^^A<T> > * = 0); // immediately instantiated and considered as part of the immediate context? template <typename T> void f(int = 0); void g() { f<int &>(); } constexpr auto x = substitute(^^A, {^^int &}); // valid until dealias?
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-06 23:04:52 | admin | set | status: tentatively ready -> ready |
| 2025-11-05 12:07:23 | admin | set | status: open -> tentatively ready |
| 2025-10-23 20:05:39 | admin | set | messages: + msg8169 |
| 2025-10-23 00:00:00 | admin | create | |