Информация об изменениях

Сообщение Re: валидность итератора при move контейнера от 26.02.2019 15:48

Изменено 26.02.2019 16:06 niXman

Re: валидность итератора при move контейнера
глупый как-то вопрос получился

https://en.cppreference.com/w/cpp/container/vector/vector

After container move construction (overload (6)), references, pointers, and iterators (other than the end iterator) to other remain valid, but refer to elements that are now in *this. The current standard makes this guarantee via the blanket statement in §23.2.1[container.requirements.general]/12, and a more direct guarantee is under consideration via LWG 2321.

Re: валидность итератора при move контейнера
глупый какой-то вопрос получился

https://en.cppreference.com/w/cpp/container/vector/vector

After container move construction (overload (6)), references, pointers, and iterators (other than the end iterator) to other remain valid, but refer to elements that are now in *this. The current standard makes this guarantee via the blanket statement in §23.2.1[container.requirements.general]/12, and a more direct guarantee is under consideration via LWG 2321.