Created on 2016-06-25.00:00:00 last changed 4 months ago
Notes from the June, 2016 meeting:
CWG decided to refer this question to EWG for their consideration.
EWG 2022-11-11
This is tracked in github issue cplusplus/papers#1377. See also paper P2285 (Are default function arguments in the immediate context?), tracked by github issue cplusplus/papers#976.
Consider the following example (taken from issue 3 of paper P0348R0):
template <typename U> void fun(U u = U()); struct X { X(int) {} }; template <class T> decltype(fun<T>()) g(int) { } template<> void g(long) { } int main() { g<X>(0); }
When is the substitution into the return type done? The current specification makes this example ill-formed because the failure to instantiate the default argument in the decltype operand is not in the immediate context of the substitution, although a plausible argument for making this a SFINAE case can be made.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-06-29 11:27:33 | admin | set | messages: + msg7768 |
2022-11-25 06:54:20 | admin | set | status: extension -> open |
2018-02-27 00:00:00 | admin | set | messages: + msg6035 |
2016-06-25 00:00:00 | admin | create |