Closed
Description
See https://compiler-explorer.com/z/xjxWbKTs7.
template<class T> struct X { T x; };
auto x = X(0);
<source>:2:10: error: no viable constructor or deduction guide for deduction of template arguments of 'X'
2 | auto x = X(0);
| ^
<source>:1:26: note: candidate template ignored: could not match 'X<T>' against 'int'
1 | template<class T> struct X { T x; };
| ^
<source>:1:26: note: candidate function template not viable: requires 0 arguments, but 1 was provided
1 error generated.
Compiler returned: 1