From 42a989fad8c0f52d5afa482afc5b531ed34887d2 Mon Sep 17 00:00:00 2001 From: Miroslav Crnic Date: Wed, 11 Oct 2017 01:43:41 -0700 Subject: [PATCH] Add support for clang intrinsic constexpr Summary: Newer versions of clang >=3.4 support intrinsic constexpr Reviewed By: Orvid Differential Revision: D6008856 fbshipit-source-id: 4e40a7032464216d181d76a854cafb2ab4be1be0 --- folly/Bits.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/folly/Bits.h b/folly/Bits.h index 63eaa4a1..4b71c189 100644 --- a/folly/Bits.h +++ b/folly/Bits.h @@ -54,12 +54,11 @@ #pragma once -#if !defined(__clang__) && !(defined(_MSC_VER) && (_MSC_VER < 1900)) -#define FOLLY_INTRINSIC_CONSTEXPR constexpr -#else -// GCC and MSVC 2015+ are the only compilers with -// intrinsics constexpr. +// MSVC does not support intrinsics constexpr +#if defined(_MSC_VER) #define FOLLY_INTRINSIC_CONSTEXPR const +#else +#define FOLLY_INTRINSIC_CONSTEXPR constexpr #endif #include -- 2.34.1