| 1 |
// PR c++/88752 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
|
| 4 |
template <int a> struct b { static constexpr int c = a; }; |
| 5 |
class d; |
| 6 |
template <typename> struct e { typedef d f; }; |
| 7 |
template <typename g> using h = typename e<g>::f; |
| 8 |
template <typename> constexpr bool i = b<true>::c; |
| 9 |
class d { |
| 10 |
public: |
| 11 |
using j = float; |
| 12 |
}; |
| 13 |
template <typename> void k(); |
| 14 |
int main() { k<d>(); } |
| 15 |
template <class l> l m; |
| 16 |
template <class, class r> void n(r o) { |
| 17 |
[](int) {}(o(m<d>)); |
| 18 |
} |
| 19 |
template <typename> void k() { |
| 20 |
n<int>([](auto inputs) { |
| 21 |
auto p(inputs); |
| 22 |
using s = h<decltype(p)>; |
| 23 |
s q; |
| 24 |
if constexpr (i<typename s::j>) |
| 25 |
[&] { return q; }(); |
| 26 |
return 42; |
| 27 |
}); |
| 28 |
} |