Commit 11f98788 by Mark Mitchell Committed by Mark Mitchell

* pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.

From-SVN: r27034
parent 550c2492
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.
......
......@@ -1950,6 +1950,7 @@ build_template_decl (decl, parms)
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;
......
// 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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment