移动std::deque后引用/指针是否保证有效?

Are references / pointers guaranteed to be valid after moving std::deque?

可以安全地假设在使用移动构造函数将双端队列移动到另一个双端队列后,我必须指向 std::deque 内部元素的任何指针仍然有效吗?

对于 std::vector,我看不出有什么理由不会,但我对 std::deque 不够熟悉,无法确定我是否可以做出相同的假设。

指向元素的指针将保持有效。在move construction之后:

After container move construction (overload (8)), 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 [container.requirements.general]/12, and a more direct guarantee is under consideration via LWG 2321.