+2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
+ tsubst_expr for default template arguments.
+
2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (yylex): Only copy the token's lineno, if it is
TREE_VALUE (TREE_VEC_ELT (TREE_VALUE (parms), i));
TREE_VEC_ELT (new_vec, i)
- = build_tree_list (tsubst (default_value, args, complain,
- NULL_TREE),
+ = build_tree_list (maybe_fold_nontype_arg (
+ tsubst_expr (default_value, args, complain,
+ NULL_TREE)),
tsubst (parm_decl, args, complain,
NULL_TREE));
}
+2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * g++.old-deja/g++.pt/defarg14.C: New test.
+
2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/lineno5.C: New test.
--- /dev/null
+// Build don't link:
+
+// Origin: Larry Evans <jcampbell3@prodigy.net>
+
+// Bug: enum in default template arguments are not properly handled.
+
+enum Enum0 { E0, E1, E2 };
+enum Enum1 { E3=E2+1, E4=E3+1 };
+
+template <Enum0 Out_FARG0> class OutTmpl
+{
+ public:
+ template <Enum0 In_FARG0, Enum1 In_FARG1=E4> class InTmpl
+ {
+ };
+};
+
+OutTmpl<E1> m;