summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
blob: 12ffde724e8e497851c2ee8447561c66363a38e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/47049
// { dg-options -std=c++0x }

enum { E = 0, F = 1 };
template <int N, int M = ((N == 1) ? F : E)> class S {};
template <int N>
struct T
{
  static void
  foo (S<N> *p)
  {
    S<N> u;
    [&u] ()->bool {} ();
  }
};

int main()
{
  T<0>().foo(0);
}