Skip to content

P2602R2 Poison Pills Are Too Toxic - #3215

Merged
Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:mainfrom
CaseyCarter:p2606r2
Dec 6, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:mainfrom
CaseyCarter:p2606r2

Conversation

@CaseyCarter

@CaseyCarter Casey Carter (CaseyCarter) commented Nov 15, 2022

Copy link
Copy Markdown
Contributor

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 Casey Carter (CaseyCarter) added the cxx23 C++23 feature label Nov 15, 2022
@CaseyCarter
Casey Carter (CaseyCarter) requested a review from a team as a code owner November 15, 2022 01:56
@JMazurkiewicz

Jakub Mazurkiewicz (JMazurkiewicz) commented Nov 15, 2022

Copy link
Copy Markdown
Contributor

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

@CaseyCarter Casey Carter (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
Comment thread stl/inc/xutility Outdated
Comment thread tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp Outdated
Comment thread stl/inc/concepts Outdated
Comment thread stl/inc/xutility Outdated
Comment thread stl/inc/compare Outdated
Comment thread stl/inc/compare
Comment thread tests/std/tests/P0896R4_ranges_range_machinery/test.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rest LGTM

Comment thread tests/std/tests/P0896R4_ranges_range_machinery/test.cpp Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 214e014 into microsoft:main Dec 6, 2022
@StephanTLavavej

Copy link
Copy Markdown
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