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 algorithms in [alg.nonmodifying] #4138

Merged

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Oct 31, 2023

Towards #140 and #1596, separated from #4004.

The std::search overload taking a searcher is not yet handled. I'll created another PR for standard searchers.

  • The modification of _Adl_verify_range is adopted from <algorithm>: unqualified calls to _Adl_verify_range incorrectly cause instantiation #1596 (comment) (thanks to @miscco).
  • A single commit adding _STD, _RANGES, and ::-qualifications.
    • I decided to add :: for __std_meow functions because _CSTD __std_meow looks very weird to me.
  • A single commit removing ADL-dependent structured binding declarations (where the unnamed variables are pairs).
    • I'm not sure whether we should avoid structured bindings or change the return type of _Equal_rev_pred to avoid ADL.
  • A single commit speculatively implementing LWG-3969.
  • A single commit for Clang-formatting.

Notes:

  • Some _Ugly function names in <execution> are not yet qualified, because they take either no arguments or only integers.
  • _Ubegin and _Uend are not qualified because they are function objects.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner October 31, 2023 17:33
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Oct 31, 2023
stl/inc/atomic Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Oct 31, 2023
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej removed their assignment Nov 9, 2023
@StephanTLavavej
Copy link
Member

Thanks for the fine-grained commits, this was very easy to review! I pushed a couple of fixes. I think it needs only one maintainer approval.

@StephanTLavavej StephanTLavavej self-assigned this Nov 9, 2023
@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 1e46514 into microsoft:main Nov 10, 2023
35 checks passed
@StephanTLavavej
Copy link
Member

Thanks for adding defenses against our eternal nemesis, ADL! 🛡️ 📈 🎉

@frederick-vs-ja frederick-vs-ja deleted the adl-proof-alg-nonmodifying branch November 11, 2023 02:30
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants