From: Benjamin Kosnik Date: Sat, 29 Aug 1998 01:17:36 +0000 (+0000) Subject: � X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d7fcc041030eeaf87357e32c45c999e78f54f08;p=gcc.git � more tests From-SVN: r22073 --- 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 00000000000..100de748985 --- /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