From: Christopher Dykes Date: Thu, 11 Aug 2016 21:25:18 +0000 (-0700) Subject: Disable the constexpr tests for findFirstSet, findLastSet and nextPowTwo under MSVC X-Git-Tag: v2016.08.15.00~10 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4027e2c635201333dee0ebf92d51b62422c4a57e;p=folly.git 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 --- 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 {