Skip to content

FIX: list_of operator[] missing const modifiers. #303

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

Merged
merged 1 commit into from
May 17, 2023

Conversation

tcpan
Copy link
Contributor

@tcpan tcpan commented Jan 11, 2023

Read only version of list_of operator[] functions was missing const modifiers. As a result, when trying to access list elements, 1. const list_of ends up calling list's operator[] functions thus without auto type conversion, and 2 if forcing to use list_of::operator[], we encounter compiler error that the call "discards const-ness".

@romainfrancois
Copy link
Collaborator

Thanks.

@romainfrancois romainfrancois merged commit 32eef66 into r-lib:main May 17, 2023
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