Skip to content

Commit bd22b63

Browse files
committed
boost::uint_t<64>::fast is unsigned long under macOS, but uint_least64_t is unsigned long long
1 parent 56b3d95 commit bd22b63

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

include/boost/crc.hpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,23 @@ struct uint_t_32
6363
typedef std::uint_least32_t fast; // matches boost::uint_t<32>::fast
6464
};
6565

66+
template<class T> struct remap_long_long
67+
{
68+
typedef T type;
69+
};
70+
71+
#if ULONG_MAX == ULLONG_MAX
72+
73+
template<> struct remap_long_long<unsigned long long>
74+
{
75+
typedef unsigned long type;
76+
};
77+
78+
#endif
79+
6680
struct uint_t_64
6781
{
68-
typedef std::uint_least64_t fast; // matches boost::uint_t<64>::fast
82+
typedef remap_long_long<std::uint_least64_t>::type fast; // matches boost::uint_t<64>::fast
6983
};
7084

7185
struct uint_t_none

0 commit comments

Comments
 (0)