Closed
Description
Clang 19 seems to define __cpp_deleted_function
even in pre-C++26 modes. However using it results in a warning:
void f() = delete
#if __cpp_deleted_function >= 202403L
("reason")
#endif
;
<source>:3:6: warning: '= delete' with a message is a C++2c extension [-Wc++26-extensions]
3 | ("reason")
| ^~~~~~~~
1 warning generated.
Compiler returned: 0
https://godbolt.org/z/Esqh5aPfb
It sounds a bit strange to claim support for a given language feature (by setting the corresponding feature-define macro), but then warn if that feature is used? Would it be possible, in pre-C++26 modes, to support the syntax and warn but not set the macro?