c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / nontype-class54.C
blob8127b1f54267257d8369f5abd5df938fe8303f50
1 // PR c++/104278
2 // { dg-do compile { target c++20 } }
4 struct foo {
5   int value;
6   constexpr foo modify() const { return { value + 1 }; }
7 };
9 template<foo f, bool Enable = f.value & 1>
10 struct bar {
11   static void run() { }
14 template<foo f>
15 struct qux {
16   static void run() {
17     bar<f.modify()>::run();
18   }
21 int main() {
22   qux<foo{}>::run();