| 1 |
// PR c++/87765 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
// { dg-additional-options "-fchecking" } |
| 4 |
|
| 5 |
template <int N> |
| 6 |
using foo = int; |
| 7 |
|
| 8 |
struct A { |
| 9 |
constexpr int bar() const { return 42; } |
| 10 |
}; |
| 11 |
|
| 12 |
void baz(A a) { |
| 13 |
[=](auto c) { return foo<a.bar()> { }; }; } |