summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C
blob: 51bf0ec33528a0ff0becb8ed98f8a7b773298dcd (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
// PR c++/65727
// { dg-do compile { target c++11 } }

struct type_a { void(*cb)(); };

struct type_b
{
    type_b(type_a p);
    void dummy();
};

template<class T>
constexpr T function_c(T**t) {return **t;}

class type_d {
    public:
        static void dummy();
};
class type_e {
    public:
        static type_b b;
        type_d *d[1];
};

type_b type_e::b = {{[](){decltype(function_c(type_e::d))::dummy();}}};