This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-01-02
Consider:
template<typename T, typename U> concept C = true; template<typename T> C<T> auto f() { return 0; } template C<int> auto f();
Is that valid? Or is the following needed:
template C<int> auto f<int>();
The specification neither discusses deduction from a type-constraint nor treating it as a non-deduced context.
Possible resolution:
Change in 13.10.3.6 [temp.deduct.type] paragraph 5 as follows:
The non-deduced contexts are:
- The nested-name-specifier of a type that was specified using a qualified-id.
- A pack-index-specifier or a pack-index-expression.
- A type-constraint.
- The expression of a decltype-specifier.
- ...