1 // { dg-do compile { target c++11 } } 2 // { dg-options "-g" } 3 4 template<class T> struct R { using type = T; }; r(typename R<F>::type f)5template<class F> F r(typename R<F>::type f) { return f; } s(F)6template<class F> void s(F) {} t(F f)7template<bool, class F> void t(F f) { s(r<F>(f)); } 8 template<bool> struct S {}; 9 template<class> struct P { constexpr static bool value = false; }; 10 template<class D> g()11void g() 12 { 13 constexpr static bool H = P<D>::value; 14 using X = S<H>; 15 []() -> X 16 { 17 t<false>([]{}); 18 return X{}; 19 }(); 20 } main()21int main() { g<int>(); } 22