Can we use || operator in ifdef??
e.g. #ifdef _WIN32 || GNU
I haven't taken notice of that specifically using an #ifdef, but I have seen things like this in the Boost source:
1 2 3
|
# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE)
//...
# endif
|
Last edited on
You cannot use it with #ifdef
...
You must use it with #if
#if defined(_WIN32) || defined(GNU)
just like the example moorecm has already given you.
Good luck!