Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/nullptr.C

raw
1 // PR c++/97517
2 // { dg-do compile { target c++20 } }
3 // Test that we print "decltype(nullptr)" correctly.
4
5 template<typename T> struct Trait { static constexpr bool value = false; };
6 template<typename T> concept Concept = Trait<T>::value; // { dg-message {\[with T = std::nullptr_t\]} }
7 static_assert( Concept<decltype(nullptr)> ); // { dg-error "static assertion failed" }
8 // { dg-message "constraints not satisfied" "" { target *-*-* } .-1 }