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

P2374R4: views::cartesian_product #3561

Merged
merged 47 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
92a9735
Feature test macro
JMazurkiewicz Feb 20, 2023
d7ea13d
Implement `views::cartesian_product`
JMazurkiewicz Mar 11, 2023
550cb1d
Simplify `_Cartesian_product_is_common`
JMazurkiewicz Mar 13, 2023
c1c2c8c
Apply @tylerbrawl's suggestion
JMazurkiewicz Mar 13, 2023
0e22346
Merge remote-tracking branch 'upstream/main' into descartes
JMazurkiewicz Mar 14, 2023
9c9ad33
Remove workaround for GH-3550
JMazurkiewicz Mar 14, 2023
86a83e5
Merge branch 'main' into descartes
StephanTLavavej Mar 19, 2023
cb8b529
Make `_Left` and `_Right` arguments const in `_(Multiply/Add)_with_ov…
JMazurkiewicz Mar 21, 2023
f3bb665
Remove `static` from `_Cartesian_product_optimal_size_type`
JMazurkiewicz Mar 21, 2023
72d6cbf
`_Range_size` -> `_Size`
JMazurkiewicz Mar 21, 2023
c9b6490
`*((*this) + _Off)` -> `*(*this + _Off)`
JMazurkiewicz Mar 21, 2023
f5f502f
`operator-`: `difference_type _Off` should be const
JMazurkiewicz Mar 21, 2023
8525f6b
`iter_swap` should be just `friend`
JMazurkiewicz Mar 21, 2023
95a9d02
`_FirstBase, _OtherBases` -> `_First_base, _Other_bases`
JMazurkiewicz Mar 21, 2023
31035c3
Add `^^^` for `_CONTAINER_DEBUG_LEVEL == 0` comment
JMazurkiewicz Mar 21, 2023
1e01347
Add LLVM banner and remove link to file - permalink is too long :(
JMazurkiewicz Mar 21, 2023
428d3e4
Add alias for `_Difference_type` in `_Advance`
JMazurkiewicz Mar 21, 2023
6a93338
Yeet away internal assertion
JMazurkiewicz Mar 21, 2023
759879c
🐿️ ⚔ `^`
JMazurkiewicz Mar 21, 2023
8923a30
Don't mention internal machinery: `_Size_type<>` -> `size type`
JMazurkiewicz Mar 21, 2023
eab66c1
`consteval` -> `_CONSTEVAL` for both `cartesian_product` and `adjacen…
JMazurkiewicz Mar 21, 2023
3a3f595
Use permalink to LLVM code
JMazurkiewicz Mar 21, 2023
e18ae03
Cast to `_Int` to avoid truncation warnings
JMazurkiewicz Mar 21, 2023
90ed880
Fix formatting
JMazurkiewicz Mar 21, 2023
fcf5469
Change overflow detection method
JMazurkiewicz Mar 21, 2023
feb062c
Fix CI
JMazurkiewicz Mar 21, 2023
91284ba
Perform overflow checking in the iterator for IDL != 0.
StephanTLavavej Mar 21, 2023
8d727c7
`ranges::input_range` was repeated.
StephanTLavavej Mar 21, 2023
41bfec1
`ranges::iterator_t` was unnecessarily qualified.
StephanTLavavej Mar 21, 2023
1a0562c
Improve clang-formatting.
StephanTLavavej Mar 21, 2023
98b3a7d
Comment nitpicks.
StephanTLavavej Mar 21, 2023
a916aef
Fix `is_iter_swap_nothrow()` to call `ranges::iter_swap` with 2 args.
StephanTLavavej Mar 21, 2023
0296071
Test modifiable elements to exercise `is_iter_swap_nothrow`.
StephanTLavavej Mar 21, 2023
d9e4dfa
We take `input_range First` so this is guaranteed.
StephanTLavavej Mar 21, 2023
7b91690
`cartesian_view` => `cartesian_product_view`
StephanTLavavej Mar 21, 2023
16b2db4
Include `<tuple>`, `<utility>`.
StephanTLavavej Mar 21, 2023
ce0f0b3
Drop unnecessary parens.
StephanTLavavej Mar 21, 2023
83866ac
`size` => `expected_size`
StephanTLavavej Mar 21, 2023
931f348
Check `forward_range<const VFirst>` when testing const iterators.
StephanTLavavej Mar 21, 2023
b9b776e
Drop copy-pasted code that isn't testing mixed comparisons.
StephanTLavavej Mar 21, 2023
198b5f1
Add missing `const`s when calling `is_iter_swap_nothrow`.
StephanTLavavej Mar 21, 2023
11f61e1
Drop `Indices` in `is_iter_move_nothrow`, `is_iter_swap_nothrow`.
StephanTLavavej Mar 21, 2023
530b69f
Extend `test_iter_swap()` to check `is_iter_swap_nothrow`.
StephanTLavavej Mar 21, 2023
bcd5814
Don't need to check `defined(_MT)`.
StephanTLavavej Mar 21, 2023
f1832eb
Merge branch 'main' into descartes
StephanTLavavej Mar 24, 2023
528b2a9
Merge branch 'main' into descartes
StephanTLavavej Mar 30, 2023
0fc54a9
Work around `/analyze` bugs.
StephanTLavavej Mar 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
602 changes: 600 additions & 2 deletions stl/inc/ranges

Large diffs are not rendered by default.

39 changes: 21 additions & 18 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@
// P2302R4 ranges::contains, ranges::contains_subrange
// P2321R2 zip
// P2322R6 ranges::fold_left, ranges::fold_right, Etc.
// P2374R4 views::cartesian_product
// P2387R3 Pipe Support For User-Defined Range Adaptors
// P2404R3 Move-Only Types For Comparison Concepts
// P2417R2 More constexpr bitset
Expand All @@ -357,6 +358,7 @@
// P2499R0 string_view Range Constructor Should Be explicit
// P2505R5 Monadic Functions For expected
// P2539R4 Synchronizing print() With The Underlying Stream
// P2540R1 Empty Product For Certain Views
// P2549R1 unexpected<E>::error()
// P2652R2 Disallowing User Specialization Of allocator_traits

Expand Down Expand Up @@ -1727,24 +1729,25 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_move_only_function 202110L

#ifdef __cpp_lib_concepts
#define __cpp_lib_out_ptr 202106L
#define __cpp_lib_print 202207L
#define __cpp_lib_ranges_as_const 202207L
#define __cpp_lib_ranges_as_rvalue 202207L
#define __cpp_lib_ranges_chunk 202202L
#define __cpp_lib_ranges_chunk_by 202202L
#define __cpp_lib_ranges_contains 202207L
#define __cpp_lib_ranges_enumerate 202302L
#define __cpp_lib_ranges_find_last 202207L
#define __cpp_lib_ranges_fold 202207L
#define __cpp_lib_ranges_iota 202202L
#define __cpp_lib_ranges_join_with 202202L
#define __cpp_lib_ranges_repeat 202207L
#define __cpp_lib_ranges_slide 202202L
#define __cpp_lib_ranges_starts_ends_with 202106L
#define __cpp_lib_ranges_stride 202207L
#define __cpp_lib_ranges_to_container 202202L
#define __cpp_lib_ranges_zip 202110L
#define __cpp_lib_out_ptr 202106L
#define __cpp_lib_print 202207L
#define __cpp_lib_ranges_as_const 202207L
#define __cpp_lib_ranges_as_rvalue 202207L
#define __cpp_lib_ranges_cartesian_product 202207L
#define __cpp_lib_ranges_chunk 202202L
#define __cpp_lib_ranges_chunk_by 202202L
#define __cpp_lib_ranges_contains 202207L
#define __cpp_lib_ranges_enumerate 202302L
#define __cpp_lib_ranges_find_last 202207L
#define __cpp_lib_ranges_fold 202207L
#define __cpp_lib_ranges_iota 202202L
#define __cpp_lib_ranges_join_with 202202L
#define __cpp_lib_ranges_repeat 202207L
#define __cpp_lib_ranges_slide 202202L
#define __cpp_lib_ranges_starts_ends_with 202106L
#define __cpp_lib_ranges_stride 202207L
#define __cpp_lib_ranges_to_container 202202L
#define __cpp_lib_ranges_zip 202110L
#endif // __cpp_lib_concepts

#define __cpp_lib_spanstream 202106L
Expand Down
2 changes: 2 additions & 0 deletions tests/std/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ tests\P2321R2_views_adjacent_transform
tests\P2321R2_views_zip
tests\P2321R2_views_zip_transform
tests\P2322R6_ranges_alg_fold
tests\P2374R4_views_cartesian_product
tests\P2374R4_views_cartesian_product_death
tests\P2387R3_bind_back
tests\P2387R3_pipe_support_for_user_defined_range_adaptors
tests\P2401R0_conditional_noexcept_for_exchange
Expand Down
4 changes: 4 additions & 0 deletions tests/std/tests/P2374R4_views_cartesian_product/env.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

RUNALL_INCLUDE ..\strict_concepts_latest_matrix.lst
Loading