1999-05-19 Mark Mitchell <mark@codesourcery.com>
+ * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
+
* decl2.c (start_static_storage_duration_function): Fix comment.
(finish_file): Create static storage duration functions lazily.
DECL_CLASS_CONTEXT (tmpl) = DECL_CLASS_CONTEXT (decl);
DECL_STATIC_FUNCTION_P (tmpl) = DECL_STATIC_FUNCTION_P (decl);
DECL_CONSTRUCTOR_P (tmpl) = DECL_CONSTRUCTOR_P (decl);
+ DECL_NONCONVERTING_P (tmpl) = DECL_NONCONVERTING_P (decl);
}
return tmpl;
--- /dev/null
+// Build don't link:
+// Origin: Chris Heath <cheath@math.lsa.umich.edu>
+
+struct A {
+ template<typename T> explicit A(T t) {}
+};
+
+void f(A a) {}
+
+int main() {f(1);} // ERROR - no conversion from int to A.