diff options
author | Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> | 2001-10-13 15:00:44 +0000 |
---|---|---|
committer | Kriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org> | 2001-10-13 15:00:44 +0000 |
commit | 4f96ff63b3d9df3742469382152174daea6a337f (patch) | |
tree | 5dad59220cde90d7f9cdd09b28c873388d1758f8 /gcc/cp/pt.c | |
parent | 11e74ea6c6c709e8e6329bdfe7d121bfa100cf29 (diff) | |
download | gcc-4f96ff63b3d9df3742469382152174daea6a337f.zip gcc-4f96ff63b3d9df3742469382152174daea6a337f.tar.gz gcc-4f96ff63b3d9df3742469382152174daea6a337f.tar.bz2 |
pt.c (lookup_template_class): Build complete template arguments for BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (lookup_template_class): Build complete template arguments
for BOUND_TEMPLATE_TEMPLATE_PARM.
From-SVN: r46245
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cd68629..e2904b5 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3913,6 +3913,19 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain) parmlist = DECL_INNERMOST_TEMPLATE_PARMS (template); + /* Consider an example where a template template parameter declared as + + template <class T, class U = std::allocator<T> > class TT + + The template parameter level of T and U are one level larger than + of TT. To proper process the default argument of U, say when an + instantiation `TT<int>' is seen, we need to build the full + arguments containing {int} as the innermost level. Outer levels + can be obtained from `current_template_args ()'. */ + + if (processing_template_decl) + arglist = add_to_template_args (current_template_args (), arglist); + arglist2 = coerce_template_parms (parmlist, arglist, template, complain, /*require_all_args=*/1); if (arglist2 == error_mark_node) |