Description
Follow up on the review feedback from PR #599 for the NonRelocatable vector API.
Review the remaining methods and add [[nodiscard]] where ignoring a return value is likely unintended. Update move-assignment behavior so that a moved-from vector has both its size and capacity reset to zero.
Acceptance criteria
- Applicable
NonRelocatable vector methods use [[nodiscard]] consistently with surrounding container APIs.
- Following move assignment, the source vector reports
size() == 0 and capacity() == 0. (⚠️ Check if it make sense to reset the capacity)
- Tests cover the moved-from object's size and capacity after move assignment.
References
Description
Follow up on the review feedback from PR #599 for the
NonRelocatablevector API.Review the remaining methods and add
[[nodiscard]]where ignoring a return value is likely unintended. Update move-assignment behavior so that a moved-from vector has both its size and capacity reset to zero.Acceptance criteria
NonRelocatablevector methods use[[nodiscard]]consistently with surrounding container APIs.size() == 0andcapacity() == 0. (References