From 4027e2c635201333dee0ebf92d51b62422c4a57e Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 11 Aug 2016 14:25:18 -0700 Subject: [PATCH] Disable the constexpr tests for findFirstSet, findLastSet and nextPowTwo under MSVC Summary: Because they aren't currently constexpr under MSVC. Reviewed By: yfeldblum Differential Revision: D3705095 fbshipit-source-id: ea266ebd9677fb2ba232476160f7c10a23954db9 --- folly/test/BitsTest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/folly/test/BitsTest.cpp b/folly/test/BitsTest.cpp index cdce5201..2b2a1401 100644 --- a/folly/test/BitsTest.cpp +++ b/folly/test/BitsTest.cpp @@ -23,12 +23,15 @@ using namespace folly; // Test constexpr-ness. -#ifndef __clang__ +#if !defined(__clang__) && !defined(_MSC_VER) static_assert(findFirstSet(2u) == 2, "findFirstSet"); static_assert(findLastSet(2u) == 2, "findLastSet"); static_assert(nextPowTwo(2u) == 2, "nextPowTwo"); +#endif + +#ifndef __clang__ static_assert(isPowTwo(2u), "isPowTwo"); -#endif // __clang__ +#endif namespace { -- 2.34.1