* inc/typeinfo (type_info::type_info(const char*)): Make
`explicit'.
From-SVN: r22235
1998-09-04 Mark Mitchell <mark@markmitchell.com>
+ * inc/typeinfo (type_info::type_info(const char*)): Make
+ `explicit'.
+
* cp-tree.h (hash_tree_cons_simple): New macro.
* pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
(coerce_template_parms): Use make_temp_vec, instead of
type_info (const type_info&);
protected:
- type_info (const char *n): _name (n) { }
+ explicit type_info (const char *n): _name (n) { }
const char *_name;
--- /dev/null
+// Build don't link:
+
+#include <typeinfo>
+
+struct S {
+ S (const char*);
+};
+
+void f(S s);
+void f(type_info);
+
+void g()
+{
+ f("abc");
+}