https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92439
--- Comment #2 from Dimitri Gorokhovik <dimitri.gorokhovik at free dot fr> --- Hi Andrew, could the diagnostics in your patch be further improved? For example, in this invalid code: template <typename ...> constexpr bool r () { return true; }; template <typename ... Ts> requires r <Ts...> () constexpr inline static const unsigned s = true; The error messages are: test-2.cpp:39:10: error: constraint expression does not have type ‘bool’ 39 | requires r <Ts...> () | ^~~~~~~~~ test-2.cpp:39:21: error: expected unqualified-id before ‘)’ token 39 | requires r <Ts...> () | ^ which is misleading: r <Ts...> () does have 'bool' type. Instead, it does not form a valid primary expression. Maybe something could be done about reporting it specifically as such?