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