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

fix: direct-init const ref instead of list-init #1175

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

carsonRadtke
Copy link
Collaborator

fixes: #1162

gcc has a bug that generates a call to the copy constructor when list initializing a const reference. This PR offers a workaround which is to direct initialize the value.

see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117900

fixes: microsoft#1162

gcc has a bug that generates a call to the copy constructor when list
initializing a const reference. This PR offers a workaround which is to
direct initialize the value.

see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117900
@carsonRadtke
Copy link
Collaborator Author

This seems to work locally. I will rebase and merge #1160 which adds a test for this.

@carsonRadtke carsonRadtke self-assigned this Dec 13, 2024
@carsonRadtke carsonRadtke added Priority: Medium Should be addressed in due course Type: Bug Indicates a bug or error Status: Review Needed Needs review from GSL maintainers labels Dec 13, 2024
@carsonRadtke carsonRadtke merged commit 8a0e3d8 into microsoft:main Dec 13, 2024
83 checks passed
@carsonRadtke carsonRadtke deleted the gh-1162 branch December 13, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Should be addressed in due course Status: Review Needed Needs review from GSL maintainers Type: Bug Indicates a bug or error
Projects
Development

Successfully merging this pull request may close these issues.

not_null<std::unique_ptr<>> not working in v4.1.0 with g++-10
1 participant