Skip to content

Improve NonRelocatable vector annotations and move-assignment state #601

Description

@4og

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions