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

P2602R2 Poison Pills Are Too Toxic #3215

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented Nov 15, 2022

Replace poison pills with unqualified name lookup blocks per P2602R2.

Consistently annotate throughout with // intentional ADL and // Block unqualified name lookup.

Drive-by:

  • Feature-test macro test fixes:
    • __cpp_lib_concepts should not be defined in sub-C++20-modes
    • __cpp_lib_ranges should not be defined in sub-C++20 modes even if __cpp_lib_concepts is defined. (This is redundant with the previous fix, but it doesn't hurt anything.)

Fixes #3209

For review purposes: P2602R2.zip

@CaseyCarter CaseyCarter added the cxx23 C++23 feature label Nov 15, 2022
@CaseyCarter CaseyCarter requested a review from a team as a code owner November 15, 2022 01:56
@JMazurkiewicz
Copy link
Contributor

JMazurkiewicz commented Nov 15, 2022

Title and comment: it's P2602R2, not P2606.

@CaseyCarter CaseyCarter changed the title P2606R2 Poison Pills Are Too Toxic P2602R2 Poison Pills Are Too Toxic Nov 15, 2022
Consistently annotate throughout with `// intentional ADL` and `// Block unqualified name lookup`.

Drive-by:
* Consistently use east `const` in `P0896R4_ranges_machinery`.
* Feeature-test macro test fixes:
  * `__cpp_lib_concepts` should not be defined in sub-C++20-modes
  * `__cpp_lib_ranges` should not be defined in sub-C++20 modes even if `__cpp_lib_concepts` is defined. (This is redundant with the previous fix, but it doesn't hurt anything.)

Fixes microsoft#3209
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/concepts Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/compare Outdated Show resolved Hide resolved
stl/inc/compare Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_range_machinery/test.cpp Outdated Show resolved Hide resolved
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.

Rest LGTM

tests/std/tests/P0896R4_ranges_range_machinery/test.cpp Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Nov 30, 2022
@StephanTLavavej StephanTLavavej removed their assignment Dec 5, 2022
@StephanTLavavej StephanTLavavej self-assigned this Dec 5, 2022
@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 214e014 into microsoft:main Dec 6, 2022
@StephanTLavavej
Copy link
Member

💀 💊 ☣️ 📉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx23 C++23 feature ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P2602R2 Poison Pills Are Too Toxic
5 participants