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