From: Miroslav Crnic Date: Wed, 11 Oct 2017 08:43:41 +0000 (-0700) Subject: Add support for clang intrinsic constexpr X-Git-Tag: v2017.10.16.00~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=42a989fad8c0f52d5afa482afc5b531ed34887d2;p=folly.git 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 --- 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