Hello,
Everything is in the title, the following code compiles and shows
"Windows" even though I'm running Fedora 28. I can't understand.
#include <iostream>
#include <boost/predef.h>
int main()
{
#if defined(BOOST_OS_WINDOWS)
puts("Windows");
#endif
}
I'm using Boost 1.66 with GCC 8.0.1.
Regards,
--
David
Hi David,
The correct way to check is not if BOOST_OS_WINDOWS is defined or not, but whether it's non-zero or not.
#include <iostream>
#include <boost/predef.h>
int main()
{
#if BOOST_OS_WINDOWS
puts("Windows");
#endif
}
-- chris