Tweak preprocessor blocks.

This commit is contained in:
Patrick Johnmeyer 2016-01-29 22:48:36 -06:00
parent f82c403768
commit bb7555c718
9 changed files with 90 additions and 87 deletions

View file

@ -13,33 +13,33 @@ using namespace std;
/* test for c++11 support */
#ifndef _MSC_VER
/* Test for clang >= 3.3 */
#ifdef __clang__
#if (__clang__ == 1) && (__clang_major__ > 3 || (__clang_major__ == 3 && (__clang_minor__ > 2 )))
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#endif
/* Test for clang >= 3.3 */
#ifdef __clang__
#if (__clang__ == 1) && (__clang_major__ > 3 || (__clang_major__ == 3 && (__clang_minor__ > 2 )))
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#endif
#ifndef __clang__
/* Test for GCC >= 4.8.0 */
#ifdef __GNUC__
#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ > 7 ))
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#endif
#endif
#ifndef __clang__
/* Test for GCC >= 4.8.0 */
#ifdef __GNUC__
#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ > 7 ))
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#endif
#endif
#elif _MSC_VER
#if (_MSC_VER > 1800)
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#if (_MSC_VER > 1800)
#define _NOEXCEPT_OP(x) noexcept(x)
#else
#define _NOEXCEPT_OP(x)
#endif
#endif