aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/nest3.C
blob: d390bc485825c29103c18a3e8d278305f2c42747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Build don't link: 
// GROUPS passed nest
#include <iostream>

struct inner {
  static void f() { std::cout << "inner::f()\n";}
};

struct outer {

  struct inner {
    static void f() { std::cout << "outer::inner::f()\n";}
  };

  static void f() {
    inner::f();     //call of outer::inner::f()
    ::inner::f();   //(try to) call inner::f() => parse error
  }
};

int main() {
  outer::f();
  std::cout << std::endl;
  return 0;
}