diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C')
-rwxr-xr-x | gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C new file mode 100755 index 0000000..e99103f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C @@ -0,0 +1,21 @@ +// Build don't link: + +template <class T> +class S +{ +protected: + template <class U> + void f(U); // ERROR - is protected + +private: + template <class U> + void g(U); // ERROR - is private +}; + + +void f() +{ + S<double> s; + s.f(3); // ERROR - within this context + s.g(2.0); // ERROR - within this context +} |