Hi Everyone,
The following code fails to compile in gcc 7, in C++17 mode (call to f(s) is ambiguous):
template <class T, class U = int>
class C
{};
template <class T, class U>
void f(const C<T, U>&) {}
template <class T, template <class> class CT>
void f(CT<T>) {}
int main()
{
C<int> s;
f(s);
}
It does not fail in C++14, nor does it fail in clang.
I wonder if this is a bug in GCC or clang, or if the standard gives implementers freedom here.
Regards,
&rzej;