From e07a105b7cbd78407bbbe772ab9df9271eae51c2 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 11 May 2015 11:54:53 +0100 Subject: [PATCH] Test availability of __has_feature macro --- src/common.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common.cc b/src/common.cc index c1474390..6bc403a2 100755 --- a/src/common.cc +++ b/src/common.cc @@ -14,9 +14,11 @@ #error GCC version 4.6+ is required for C++11 features - see https://github.com/lovell/sharp#prerequisites #endif -#if (defined(__clang__) && !__has_feature(cxx_range_for)) +#if (defined(__clang__) && defined(__has_feature)) +#if (!__has_feature(cxx_range_for)) #error clang version 3.0+ is required for C++11 features - see https://github.com/lovell/sharp#prerequisites #endif +#endif namespace sharp {