OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / access7.C
1 // { dg-do compile }
2
3 // PR c++/3663
4 // Enforce access of nested type.
5
6 template <typename A>
7 class S {
8   class T {};                           // { dg-error "private" }
9 };
10
11 template <typename A>
12 typename A::T* f (A) {                  // { dg-error "this context" }
13   return 0;
14 }
15
16 void g () {
17   f (S<int> ());                        // { dg-message "instantiated" }
18 }