On 16/11/20 09:23 -0700, Tom Tromey wrote:
Jakub> If it is done in the library, it will be defined only if any of the 
library
Jakub> headers are included.
Jakub> The https://eel.is/c++draft/cpp.predefined wording doesn't look like it
Jakub> would allow defining it only if certain headers are included
Jakub> (unlike e.g. the __cpp_lib_* macros which have associated list of headers
Jakub> that should define those).

Also I was wondering if there's a C analogue.
I found http://www.open-std.org/jtc1/sc22/WG14/www/docs/n2069.pdf but I
have no idea whether this is just a paper or was adopted.

C11 and later say:

_ _STDC_NO_THREADS_ _ The integer constant 1, intended to indicate that the
implementation does not support the <threads.h> header.

You can probably guess how useful it is in practice:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769


Reply via email to