From 3d7fcc041030eeaf87357e32c45c999e78f54f08 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Sat, 29 Aug 1998 01:17:36 +0000 Subject: =?UTF-8?q?=EF=BF=BD=20more=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From-SVN: r22073 --- gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C | 177 ++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C b/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C new file mode 100644 index 0000000..100de74 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C @@ -0,0 +1,177 @@ +// Build don't link: +// 980827 bkoz +// template parameter redeclaration bugs, part two: +// template template params and expanded template non-type parms + +// 14.1 Template parameters +// p 13 +// The scope of a template-parameter extens from its point of +// declartion until the end of its template. In particular, a +// template-parameter can be used in the declaration of subsequent +// template-parameters and their default arguments. + +// 14.6.1 Locally declared names +// p 4 +// A template-parameter shall not be redeclared within its scope +// (including nested scopes). A template-parameter shall not have the +// same name as the template name. + +// 14 +// declared friend template (v3, template type parameters) +template // ERROR - .* +class Xfourteen { +protected: + T4 value; +public: + Xfourteen(T4 init): value(init) {} + template