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

Placement new-expression incorrect for overloaded operator& and operator new #39

Open
jwakely opened this issue Jul 18, 2024 · 5 comments
Assignees

Comments

@jwakely
Copy link

jwakely commented Jul 18, 2024

https://github.com/beman-project/Optional26/blob/bfeb9080c0d9c501965ae857a1decf7ed74686f5/include/Beman/Optional26/optional.hpp#L441

This needs to use (void*)std::addressof(value_)

@jwakely
Copy link
Author

jwakely commented Jul 18, 2024

@steve-downey
Copy link
Member

Also indicates missing test cases that ought not to have compiled, then.

@steve-downey steve-downey self-assigned this Jul 18, 2024
@jwakely
Copy link
Author

jwakely commented Jul 18, 2024

It's a very sneaky one to test for.

@steve-downey
Copy link
Member

steve-downey commented Jul 21, 2024

construct_at, which was needed for some constexpr cases, avoids the problem.

@steve-downey
Copy link
Member

Holding off closing until the changes actually land here on main.

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

No branches or pull requests

2 participants