mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 18:28:20 +00:00
Avoid error C2156 under VC++2013
This commit is contained in:
parent
de92f5d8a7
commit
c2bcb31354
6
format.h
6
format.h
@ -56,10 +56,14 @@ inline uint32_t clz(uint32_t x) {
|
|||||||
return 31 - r;
|
return 31 - r;
|
||||||
}
|
}
|
||||||
# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n)
|
# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n)
|
||||||
|
|
||||||
|
# ifdef _WIN64
|
||||||
|
# pragma intrinsic(_BitScanReverse64)
|
||||||
|
# endif
|
||||||
|
|
||||||
inline uint32_t clzll(uint64_t x) {
|
inline uint32_t clzll(uint64_t x) {
|
||||||
unsigned long r = 0;
|
unsigned long r = 0;
|
||||||
# ifdef _WIN64
|
# ifdef _WIN64
|
||||||
# pragma intrinsic(_BitScanReverse64)
|
|
||||||
_BitScanReverse64(&r, x);
|
_BitScanReverse64(&r, x);
|
||||||
# else
|
# else
|
||||||
// Scan the high 32 bits.
|
// Scan the high 32 bits.
|
||||||
|
Loading…
Reference in New Issue
Block a user