From d93172bee81ce18cd3ea4675907d204502d7ff49 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 28 Nov 2014 19:09:21 +0100 Subject: Compiler.h: add macro CLANG_OR_GCC_VERSION() --- src/util/Cast.hxx | 4 ++-- src/util/Manual.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/util') diff --git a/src/util/Cast.hxx b/src/util/Cast.hxx index 887137da4..647171970 100644 --- a/src/util/Cast.hxx +++ b/src/util/Cast.hxx @@ -84,7 +84,7 @@ ContainerAttributeOffset(const A C::*p) * Cast the given pointer to a struct member to its parent structure. */ template -#if defined(__clang__) || GCC_CHECK_VERSION(4,7) +#if CLANG_OR_GCC_VERSION(4,7) constexpr #endif static inline C & @@ -97,7 +97,7 @@ ContainerCast(A &a, A C::*member) * Cast the given pointer to a struct member to its parent structure. */ template -#if defined(__clang__) || GCC_CHECK_VERSION(4,7) +#if CLANG_OR_GCC_VERSION(4,7) constexpr #endif static inline const C & diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx index fa4b00615..153851aba 100644 --- a/src/util/Manual.hxx +++ b/src/util/Manual.hxx @@ -41,7 +41,7 @@ #include -#if defined(__clang__) || GCC_CHECK_VERSION(4,7) +#if CLANG_OR_GCC_VERSION(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif @@ -114,7 +114,7 @@ public: } }; -#if defined(__clang__) || GCC_CHECK_VERSION(4,7) +#if CLANG_OR_GCC_VERSION(4,7) #pragma GCC diagnostic pop #endif -- cgit v1.2.3