aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
blob: 29f63afe0df415dd22a78b24eb74cde08fef174b (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-do compile { target c++11 } }

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);
}