Open ephere opened 1 year ago
Sorry, I incorrectly posted this from my company's account.
Agreed, this is a bug, thank you! Feel free to submit a PR with that fix.
Sorry, I haven't used GitHub for development yet, it will take time until I figure out how to submit PRs...
Here's a failing test:
It doesn't work because the specialization of
get_idx
innode/detail/impl.h
is enabled onstd::is_signed
condition, which returns true for floating-point types, while theKey
template parameter ofget_idx
is expected to be integral. The result is thatget_idx
succeeds and the node is converted to a sequence instead of a map, with the value added at index 0.This can be fixed by adding
&& std::is_integral<Key>::value
to thestd::enable_if<std::is_signed<Key>::value>
specialization ofget_idx
innode/detail/impl.h
. I suppose the same same has to be done for the specialization ofremove_idx
in the same file.