|| in ifdef

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
because its giving me error while compiling...
"source/lib/taap/src/messageMMap.cpp", line 419: Error: There is extra text on this line.
..
So i am not sure..
You cannot use it with #ifdef ...
You must use it with #if
Duos and moorecm thanks for your reply.
Do u wanted to do like
#if _WIN32 //|| #if GNU
this??
#if defined(_WIN32) || defined(GNU)
just like the example moorecm has already given you.

Good luck!
Topic archived. No new replies allowed.