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);
?
Would it work to avoid calling this function if the DECL_SOURCE_LOCATION
of the new decl matches the location of the old decl?
Jason