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

ADL-proof implementation of function, move_only_function, packaged_task, promise, and optional #4430

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Mar 2, 2024

Towards #140 and #3100.

Unblocks one libcxx test:

  • std/utilities/function.objects/func.wrap/func.wrap.func/robust_against_adl.pass.cpp

Also contains some drive-by and previously missed changes.

  • Handling for array destruction in algorithms (valid since C++20) was missed in ADL-proof implementation of uninitialized memory algorithms #4374.
  • _STD-qualification for one shared_ptr-related _Unfancy call (which is not strictly necessary).
  • _STD-qualification for _Deallocate and _Make_unique_alloc calls (which are not strictly necessary IIUC).
  • Moving _Global_new from <xmemory> to <functional> because it is only used for function.

Remaining unqualified _Construct_in_place and _Destroy_in_place calls after this PR are all in containers and valarray.

@AlexGuteniev
Copy link
Contributor

Is move_only_function affected at all?

@frederick-vs-ja
Copy link
Contributor Author

Is move_only_function affected at all?

Yes. The _Function_new_large call used for move_only_function needs to be qualified.

@StephanTLavavej StephanTLavavej removed their assignment Mar 5, 2024
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in Code Reviews Mar 5, 2024
@StephanTLavavej StephanTLavavej self-assigned this Mar 6, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 6affdd3 into microsoft:main Mar 8, 2024
37 checks passed
Code Reviews automation moved this from Ready To Merge to Done Mar 8, 2024
@StephanTLavavej
Copy link
Member

Thanks for fixing another libcxx failure and qualifying all the things! 🛠️ 📈 🎉

@frederick-vs-ja frederick-vs-ja deleted the adl-proof-function-future-optional branch March 8, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants