From what I understand, swapping a std::vector is a constant time operation because the only pointers are being swapped, but in the case of an std::array the swapping is element-wise. Is it possible to swap the pointers of an std::array?
Apologies if this has been asked to death already. If so kindly point me in the right direction, thanks.
Aucun commentaire:
Enregistrer un commentaire