From c2bcb313542ab168c24447c0f5addcb5a9b04f50 Mon Sep 17 00:00:00 2001 From: Masashi Fujita Date: Wed, 25 Feb 2015 20:40:28 +0900 Subject: [PATCH] Avoid error C2156 under VC++2013 --- format.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/format.h b/format.h index 03ed6853..50aa5f7d 100644 --- a/format.h +++ b/format.h @@ -56,10 +56,14 @@ inline uint32_t clz(uint32_t x) { return 31 - r; } # define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n) + +# ifdef _WIN64 +# pragma intrinsic(_BitScanReverse64) +# endif + inline uint32_t clzll(uint64_t x) { unsigned long r = 0; # ifdef _WIN64 -# pragma intrinsic(_BitScanReverse64) _BitScanReverse64(&r, x); # else // Scan the high 32 bits.