Skip to content

Commit

Permalink
Merge pull request #121 from objectx/VC2013
Browse files Browse the repository at this point in the history
Avoid error C2156 under VC++2013
  • Loading branch information
vitaut committed Feb 25, 2015
2 parents 642b72c + c2bcb31 commit f8fd34a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f8fd34a

Please sign in to comment.