Fix BOOST_HAS_PRAGMA_DETECT_MISSMATCH detection for Clang

This commit is contained in:
Antony Polukhin
2014-08-18 20:35:42 +04:00
parent 3087b80a77
commit 6ea485e9f1

View File

@ -9,7 +9,15 @@
// Clang compiler setup.
#define BOOST_HAS_PRAGMA_ONCE
#define BOOST_HAS_PRAGMA_DETECT_MISSMATCH
// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used.
#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
// Ignoring the checks on APPLE platform because someone made __clang_major__ equal to
// LLVM version rather than compiler version.
# ifndef __APPLE__
# define BOOST_HAS_PRAGMA_DETECT_MISSMATCH
# endif
#endif
// When compiling with clang before __has_extension was defined,
// even if one writes 'defined(__has_extension) && __has_extension(xxx)',