Hi,

On 03/10/2015 05:19 PM, Jason Merrill wrote:
On 03/10/2015 11:50 AM, Paolo Carlini wrote:
+  /* Don't get fooled by, eg:
+
+     template <typename> class C
+     {
+       template <typename U>
+       C(const C<U>&, bool = false);
+     };
+
+     template <>
+     template <typename U>
+     C<int>::C(const C<U>&, bool);  */
+
+  if (DECL_FUNCTION_MEMBER_P (decl)
+ && CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P (DECL_CONTEXT (decl)))
+    return;

Wouldn't this also allow

template<>
template<typename U>
C<int>::C(const C<U>&, bool = false);

?
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.

Thanks,
Paolo.

Reply via email to