Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert cvector_at changes #76

Merged
merged 1 commit into from
Feb 13, 2025

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