From b333f246e4178158a05af6ff3079a1ab4abdc8f4 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 11 Aug 2000 09:28:08 +0000 Subject: [PATCH] * g++.old-deja/g++.pt/explicit81.C: New test. From-SVN: r35630 --- gcc/testsuite/ChangeLog | 4 ++ .../g++.old-deja/g++.pt/explicit81.C | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/explicit81.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b8d10e89ce..d2d1d7ffd18 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-08-11 Nathan Sidwell + + * g++.old-deja/g++.pt/explicit81.C: New test. + 2000-08-11 Nathan Sidwell * g++.old-deja/g++.pt/typename26.C: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit81.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit81.C new file mode 100644 index 00000000000..56b8aacb6d2 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit81.C @@ -0,0 +1,43 @@ +// Build don't link: +// +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 10 Aug 2000 + +// bug 371 We failed to subst explicit template args before trying to +// deduce the template. + +namespace N +{ +enum E { e0 }; + +template< E e > void nf(); + +} + +template< N::E e > void gf(); + +struct X { + template void xfn (); + template static void sfn (); +}; + +template < class C > +void tf(C *ptr) +{ + N::nf(); + gf(); + ptr->X::xfn (); + ptr->C::template xfn (); + ptr->template xfn (); + ptr->X::sfn (); + ptr->C::template sfn (); + ptr->template sfn (); + X::sfn (); + C::template sfn (); +} + +void f(X *ptr) +{ + ptr->xfn (); + tf(ptr); +} -- 2.30.2