Commit db3ef87b by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and tsubst_expr for…

pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and tsubst_expr for default template arguments.

2001-07-22  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-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>

	* g++.old-deja/g++.pt/defarg14.C: New test.

From-SVN: r44396
parent fa397dda
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
......
......@@ -5377,8 +5377,9 @@ tsubst_template_parms (parms, args, complain)
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.
......
// 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;
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