Skip to content

Commit

Permalink
boost::uint_t<64>::fast is unsigned long under macOS, but uint_leas…
Browse files Browse the repository at this point in the history
…t64_t is `unsigned long long`
  • Loading branch information
pdimov committed Sep 3, 2024
1 parent 56b3d95 commit bd22b63
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion include/boost/crc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,23 @@ struct uint_t_32
typedef std::uint_least32_t fast; // matches boost::uint_t<32>::fast
};

template<class T> struct remap_long_long
{
typedef T type;
};

#if ULONG_MAX == ULLONG_MAX

template<> struct remap_long_long<unsigned long long>
{
typedef unsigned long type;
};

#endif

struct uint_t_64
{
typedef std::uint_least64_t fast; // matches boost::uint_t<64>::fast
typedef remap_long_long<std::uint_least64_t>::type fast; // matches boost::uint_t<64>::fast
};

struct uint_t_none
Expand Down

0 comments on commit bd22b63

Please sign in to comment.