Skip to content

Revert cvector_at changes#76

Merged
eteran merged 1 commit intoeteran:masterfrom
smlavine:revert-cvector_at-refactor
Feb 13, 2025
Merged

Revert cvector_at changes#76
eteran merged 1 commit intoeteran:masterfrom
smlavine:revert-cvector_at-refactor

Conversation

@smlavine
Copy link
Contributor

It is more idiomatic for cvector_at to return a reference. This allows mutability of the element at the given index, and allows for the existence of an element at a given index to be expressed in a different way than explicitly checking the size of the vector.

This also corrects the documentation for cvector_front and cvector_back, as those were still documented as returning references, not values.

It is more idiomatic for cvector_at to return a reference. This allows
mutability of the element at the given index, and allows for the
existence of an element at a given index to be expressed in a different
way than explicitly checking the size of the vector.

This also corrects the documentation for cvector_front and cvector_back,
as those were still documented as returning references, not values.
@smlavine smlavine mentioned this pull request Feb 12, 2025
@eteran eteran merged commit 4b45a9d into eteran:master Feb 13, 2025
5 checks passed
@smlavine smlavine deleted the revert-cvector_at-refactor branch February 13, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants