summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/anon1.C
blob: ff5c9ea1553cb3ea7f20b87c234603110a4f2f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
struct x {
    int foo () { return 0; }
};

template <class T>
struct vector {
    T& bar () { static T a; return a; }
};

template <class T>
struct y {
    typedef struct {   
        x t;
    } s;
    
    vector<s> array;

    int foo ()
      { return array.bar().t.foo(); }
};
int i = y<x>().foo ();