C++ Logo

std-discussion

Advanced search

Re: The standard does not specify when to supply default arguments as template arguments

From: jim x <xmh970252187_at_[hidden]>
Date: Fri, 17 Jul 2020 00:16:32 +0800
Peter, it seems to the parameter is declared as if it likes Test<T,T>,
change the argument of the function call to Test<int,char>{}, The three
compiler all report the deduced T is conflicting , T = int vs T= char. So,
I wonder the compiler process Test<T> as Test<T, T>, according to the
outcome report.

Received on 2020-07-16 11:20:04