| 1 |
// Verify pretty printing of class NTTP objects. |
| 2 |
// PR c++/111471 |
| 3 |
// { dg-do compile { target c++20 } } |
| 4 |
|
| 5 |
struct A { bool value; }; |
| 6 |
|
| 7 |
template<A V> |
| 8 |
requires (V.value) // { dg-message {'\(V\).value \[with V = A\{false\}\]'} } |
| 9 |
void f(); |
| 10 |
|
| 11 |
template<A V> struct B { static constexpr auto value = V.value; }; |
| 12 |
|
| 13 |
template<class T> |
| 14 |
requires T::value // { dg-message {'T::value \[with T = B<A\{false\}>\]'} } |
| 15 |
void g(); |
| 16 |
|
| 17 |
int main() { |
| 18 |
f<A{false}>(); // { dg-error "no match" } |
| 19 |
g<B<A{false}>>(); // { dg-error "no match" } |
| 20 |
} |