summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/ptrmem3.C
blob: 0f6bf0bd90f1e3fc2e0d3fff0d864094dce4b98a (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
26
27
28
29
30
31
32
// Build don't link: 
// GROUPS passed pointers-to-members
template<class T> class TemplA {
    T t;
};


template<class T> class TemplB {
public:    
    typedef void (T::*TClassMethod)();

private:
/*
   This line should not crash cuz of the get_decl_list change in this:
	* cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
	have TYPE_PTRMEMFUNC_P set before we try to build its
	CLASSTYPE_ID_AS_LIST.
	(get_decl_list): Likewise, when trying to read it.
*/
    TemplA<TClassMethod> Tmethod;  
};


class C {
    int a;
};

int main(int, char**) {

    TemplB<C> test;
}