Created on 2012-06-28.00:00:00 last changed 147 months ago
Notes from the October, 2012 meeting:
CWG determined that the entire deduction fails in this case.
According to 13.10.3.2 [temp.deduct.call] paragraph 1,
If removing references and cv-qualifiers from P gives std::initializer_list<P'> for some P' and the argument is an initializer list (9.4.5 [dcl.init.list]), then deduction is performed instead for each element of the initializer list, taking P' as a function template parameter type and the initializer element as its argument. Otherwise, an initializer list argument causes the parameter to be considered a non-deduced context (13.10.3.6 [temp.deduct.type]).
It is not entirely clear whether the deduction for an initializer list meeting a std::initializer_list<T> is a recursive subcase, or part of the primary deduction. A relevant question is: if the deduction on that part fails, does the entire deduction fail, or is the parameter to be considered non-deduced?
See also issue 2326.
History | |||
---|---|---|---|
Date | User | Action | Args |
2012-11-03 00:00:00 | admin | set | messages: + msg4111 |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-06-28 00:00:00 | admin | create |