C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Defined STL containers moved-from state

From: Gia Phan <repulseshipp_at_[hidden]>
Date: Wed, 22 Jan 2025 10:03:27 -0800
Ohhh, so it's basically UB for:
- Anything that requires reading any member or content of the moved
containers,
- Modifications like append, push(_back) to it without resetting all of its
member/content to a deterministic state (assigning new value,
reconstructing)

I'll keep these in mind. I was just confused because it's not mentioned
anywhere. Thank you!

Received on 2025-01-22 18:03:39