updated boost on windows
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
#ifndef BOOST_MP_DETAIL_BITSCAN_HPP
|
||||
#define BOOST_MP_DETAIL_BITSCAN_HPP
|
||||
|
||||
#include <boost/detail/endian.hpp>
|
||||
#include <boost/predef/other/endian.h>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#include <intrin.h>
|
||||
@@ -143,11 +144,14 @@ BOOST_FORCEINLINE unsigned find_msb(boost::ulong_long_type mask, mpl::int_<3> co
|
||||
return sizeof(boost::ulong_long_type) * CHAR_BIT - 1 - __builtin_clzll(mask);
|
||||
}
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_FORCEINLINE unsigned find_msb(unsigned __int128 mask, mpl::int_<0> const&)
|
||||
|
||||
__extension__ typedef unsigned __int128 uint128_type;
|
||||
|
||||
BOOST_FORCEINLINE unsigned find_msb(uint128_type mask, mpl::int_<0> const&)
|
||||
{
|
||||
union { unsigned __int128 v; boost::uint64_t sv[2]; } val;
|
||||
union { uint128_type v; boost::uint64_t sv[2]; } val;
|
||||
val.v = mask;
|
||||
#ifdef BOOST_LITTLE_ENDIAN
|
||||
#if BOOST_ENDIAN_LITTLE_BYTE
|
||||
if(val.sv[1])
|
||||
return find_msb(val.sv[1], mpl::int_<3>()) + 64;
|
||||
return find_msb(val.sv[0], mpl::int_<3>());
|
||||
@@ -157,11 +161,11 @@ BOOST_FORCEINLINE unsigned find_msb(unsigned __int128 mask, mpl::int_<0> const&)
|
||||
return find_msb(val.sv[1], mpl::int_<3>());
|
||||
#endif
|
||||
}
|
||||
BOOST_FORCEINLINE unsigned find_lsb(unsigned __int128 mask, mpl::int_<0> const&)
|
||||
BOOST_FORCEINLINE unsigned find_lsb(uint128_type mask, mpl::int_<0> const&)
|
||||
{
|
||||
union { unsigned __int128 v; boost::uint64_t sv[2]; } val;
|
||||
union { uint128_type v; boost::uint64_t sv[2]; } val;
|
||||
val.v = mask;
|
||||
#ifdef BOOST_LITTLE_ENDIAN
|
||||
#if BOOST_ENDIAN_LITTLE_BYTE
|
||||
if(val.sv[0] == 0)
|
||||
return find_lsb(val.sv[1], mpl::int_<3>()) + 64;
|
||||
return find_lsb(val.sv[0], mpl::int_<3>());
|
||||
|
||||
Reference in New Issue
Block a user