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

[specialized.algorithms] remove voidify completely #6167

Closed

Conversation

blackteahamburger
Copy link
Contributor

After LWG3870, voidify can now simply be replaced by addressof.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwakely , do you want such changes to the standard library without an LWG issue?

@jwakely
Copy link
Member

jwakely commented Mar 11, 2023

I don't think the change is correct anyway. A program can provide ::operator new(size_t, X*) and then use vector<X>. We don't want the placement new expressions used to create vector elements to match the program's overload of operator new. You need to cast the pointer to void*, which voidify does.

@tkoeppe
Copy link
Contributor

tkoeppe commented Mar 12, 2023

As @jwakely said, this does not seem like a correct change.

@tkoeppe tkoeppe closed this Mar 12, 2023
@blackteahamburger blackteahamburger deleted the no-voidify branch March 19, 2023 04:16
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.

None yet

4 participants