summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const9.C
blob: 0724ae15d88474d18821f26b891004e4bf13ac56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/86147
// { dg-do compile { target c++11 } }

template <class T, T N> struct X { };

struct A { static constexpr int value = 0; };

template<class C>
void foo() {
    constexpr int N = C::value;
    auto f = [&]{  X<int, N> a; };
}

int main() { 
    foo<A>();
    return 0;
}