1// { dg-do run  }
2template<class T>
3class Set {
4  public:
5    typedef int (*Compare)(const T&, const T&);
6    static Compare cmp1;
7    static int (*cmp2)(const T&, const T&);
8};
9
10template<class T>
11int gen_cmp(const T& a, const T& b) {
12    if (a<b) return -1;
13    else if (a==b) return 0;
14    else return 1;
15}
16
17template<class T>
18typename Set<T>::Compare Set<T>::cmp1 = &gen_cmp;
19
20template<class T>
21int (*Set<T>::cmp2)(const T&, const T&) = &gen_cmp;
22
23int main() {
24    Set<int> s;
25}
26