In the implementation size_t is used. But the implementation of flat_maprequires this type to be the same size as unsigned long long. But this is not true on all platforms (e.g. emscripten). Hence, when compiling one gets a hard-error for narrowing conversions from unsigned long long to <unsigned type of smaller size>.
The bug is easily fixed by defining
using ska::size_t = unsigned long long
And replacing the size_t with ska::size_t in the implementation.
Also note that when size_t is of size 4 one gets a warning for overflow in some expressions.
In the implementation
size_tis used. But the implementation offlat_maprequires this type to be the same size asunsigned long long. But this is not true on all platforms (e.g. emscripten). Hence, when compiling one gets a hard-error for narrowing conversions fromunsigned long longto<unsigned type of smaller size>.The bug is easily fixed by defining
And replacing the
size_twithska::size_tin the implementation.Also note that when
size_tis of size4one gets a warning for overflow in some expressions.