From 70c58cce50c0fdab52f5c8616508f0b1908e05f7 Mon Sep 17 00:00:00 2001 From: Nicholas Guarracino Date: Fri, 13 Nov 2015 09:54:27 -0500 Subject: [PATCH] Check if __GCC__ is defined first --- include/gsl.h | 2 +- include/span.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gsl.h b/include/gsl.h index 6eb29ce..68a725d 100644 --- a/include/gsl.h +++ b/include/gsl.h @@ -45,7 +45,7 @@ #endif // _MSC_VER -#if (__GNUC__ < 5) && !defined(__clang__) +#if defined(__GNUC__) && (__GNUC__ < 5) && !defined(__clang__) #define constexpr /* nothing */ #endif diff --git a/include/span.h b/include/span.h index d094496..5014e6c 100644 --- a/include/span.h +++ b/include/span.h @@ -60,7 +60,7 @@ #endif // _MSC_VER -#if (__GNUC__ < 5) && !defined(__clang__) +#if defined(__GNUC__) && (__GNUC__ < 5) && !defined(__clang__) #define constexpr /* nothing */ #endif @@ -231,7 +231,7 @@ private: #ifndef _MSC_VER -#if (__GNUC__ < 5) && !defined(__clang__) +#if defined(__GNUC__) && (__GNUC__ < 5) && !defined(__clang__) const std::ptrdiff_t dynamic_range = -1; #else struct static_bounds_dynamic_range_t