Currently removeIndex copies the removed value into removed and then destructs the original, which can cause significant performance costs when removing a large tree by index. This change causes removeIndex to std::move the removed value into removed instead, avoiding this copy and destruction overhead. removeMember already moves its result in this way.
Currently removeIndex copies the removed value into removed and then destructs the original, which can cause significant performance costs when removing a large tree by index. This change causes removeIndex to std::move the removed value into removed instead, avoiding this copy and destruction overhead. removeMember already moves its result in this way.