You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\pnum
A template type argument cannot be deduced from the type of a non-type
\grammarterm{template-argument}.
\pnum
\enterexample
\begin{codeblock}
template<class T, T i> void f(double a[10][i]);
int v[10][20];
f(v); // error: argument for template-parameter \tcode{T} cannot be deduced
\end{codeblock}
\exitexample
Shouldn't that double read int, or vice versa? Otherwise I don't think anyone would intuitively think that Tought to be deducible; the call to f is just clearly ill-formed.
The text was updated successfully, but these errors were encountered:
templates.tex contains the following example:
Shouldn't that
double
readint
, or vice versa? Otherwise I don't think anyone would intuitively think thatT
ought to be deducible; the call tof
is just clearly ill-formed.The text was updated successfully, but these errors were encountered: