projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1c5974
)
Add support for clang intrinsic constexpr
author
Miroslav Crnic
<mcrnic@fb.com>
Wed, 11 Oct 2017 08:43:41 +0000
(
01:43
-0700)
committer
Facebook Github Bot
<facebook-github-bot@users.noreply.github.com>
Wed, 11 Oct 2017 08:49:49 +0000
(
01:49
-0700)
Summary: Newer versions of clang >=3.4 support intrinsic constexpr
Reviewed By: Orvid
Differential Revision:
D6008856
fbshipit-source-id:
4e40a7032464216d181d76a854cafb2ab4be1be0
folly/Bits.h
patch
|
blob
|
history
diff --git
a/folly/Bits.h
b/folly/Bits.h
index 63eaa4a1e9dd2de79080e71209f4554ef74367cd..4b71c18963600ebdd74b4eadc076d98cbf5fbb96 100644
(file)
--- 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 <cassert>