On 03/10/2015 01:03 PM, Paolo Carlini wrote:
Good question, but we don't have this issue, because for that we emit
anyway:
65370.C:11:36: error: default argument specified in explicit
specialization [-fpermissive]
C<int>::C(const C<U>&, bool = false);
nothing changes about that kind of testcase, usual behavior.
Ah. So here we can ignore any template instantiation or specialization,
with a comment that check_explicit_specialization will handle them. But
I suspect that checking the decl itself will be better; I would expect
checking the context to lead you to accept
template<> class C<int> {
template <typename U>
C(const C<U>&, bool);
};
template <typename U> C<int>::C(const C<U>&, bool = false);
Since here C<int> is a specialization of C, but the constructor is not
itself a partial instantiation.
Jason