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_t
is used. But the implementation offlat_map
requires 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 long
to<unsigned type of smaller size>
. The bug is easily fixed by definingAnd replacing the
size_t
withska::size_t
in the implementation.Also note that when
size_t
is of size4
one gets a warning for overflow in some expressions.