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

Turn niebloids into function objects #4098

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented Oct 17, 2023

The core language doesn't seem to be any closer to providing first-class overload sets, and we're starting to get "bug" reports (DevCom-10450794) since the other standard library implementations simply implement these as (semiregular?) function objects.

This change removes the type std::_Not_quite_object, promoting its member _Construct_tag to namespace scope since it is also used in the implementation of join_view and join_with_view.

Fixes #4097

The core language doesn't seem to be any closer to providing first-class overload sets, and we're starting to get "bug" reports (DevCom-10450794) since the other standard library implementations simply implement these as (semiregular?) function objects. I'm not motivated to carry the battle to EWG, so let's just give up the dream and make these function objects.
@CaseyCarter CaseyCarter added enhancement Something can be improved ranges C++20/23 ranges labels Oct 17, 2023
@CaseyCarter CaseyCarter requested a review from a team as a code owner October 17, 2023 01:59
@fsb4000
Copy link
Contributor

fsb4000 commented Oct 17, 2023

Am I correct and this change also fixes #3995 ?

@CaseyCarter
Copy link
Member Author

Am I correct and this change also fixes #3995 ?

I don't think we can "fix" something that's not a bug, but I can confirm that the repro from #3995 compiles and runs just fine with this change.

@StephanTLavavej StephanTLavavej self-assigned this Oct 19, 2023
@StephanTLavavej
Copy link
Member

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

Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

I'm very happy about this haha

@StephanTLavavej StephanTLavavej merged commit 9966fcc into microsoft:main Oct 20, 2023
37 checks passed
@StephanTLavavej
Copy link
Member

Thanks for increasing global implementation consistency! 🌍 🌎 🌏

@CaseyCarter CaseyCarter deleted the niebloids-are-objects branch October 23, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_Not_quite_object has outlived its usefulness
4 participants