111
|
1 // { dg-do compile { target c++11 } }
|
|
2 // { dg-options "-g" }
|
|
3
|
|
4 template<class T> struct R { using type = T; };
|
|
5 template<class F> F r(typename R<F>::type f) { return f; }
|
|
6 template<class F> void s(F) {}
|
|
7 template<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>
|
|
11 void 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 }
|
|
21 int main() { g<int>(); }
|