Skip to content

[libc++][ranges] P2542R8: Implement views::concat #120920

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

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
cda974f
initial commit
changkhothuychung Dec 22, 2024
daf965a
Merge pull request #2 from changkhothuychung/concat
changkhothuychung Dec 22, 2024
5cfcf49
Revert "implement views::concat (P2542) "
changkhothuychung Dec 22, 2024
59c609c
Merge pull request #3 from changkhothuychung/revert-2-concat
changkhothuychung Dec 22, 2024
11ec4bc
initial commit
changkhothuychung Dec 22, 2024
c155a3b
fix
changkhothuychung Dec 23, 2024
7d9b059
clang format
changkhothuychung Dec 23, 2024
020c09f
cxx03
changkhothuychung Dec 23, 2024
c41a46b
modulemap
changkhothuychung Dec 23, 2024
c9b9f0c
fix
changkhothuychung Dec 23, 2024
c73cc63
Merge branch 'main' into views-concat
changkhothuychung Dec 23, 2024
ad8a1ff
fix some includes
changkhothuychung Dec 24, 2024
03e0424
Merge branch 'views-concat' of https://github.com/changkhothuychung/l…
changkhothuychung Dec 24, 2024
a1e2823
clang format
changkhothuychung Dec 24, 2024
3167c0d
remove cxx03 version
changkhothuychung Dec 27, 2024
bfca49c
fix ugly names
changkhothuychung Dec 27, 2024
df76233
clang-format
changkhothuychung Dec 27, 2024
60a09f6
some fix
changkhothuychung Dec 27, 2024
dc2dbbf
clang format
changkhothuychung Dec 27, 2024
39a649a
update
changkhothuychung Dec 31, 2024
19f0ef1
clang format
changkhothuychung Dec 31, 2024
1a864b0
some fixes
changkhothuychung Dec 31, 2024
096f939
some fix
changkhothuychung Jan 4, 2025
b884d99
use c++26 pack indexing
changkhothuychung Jan 4, 2025
e6b93af
more name uglifications fix
changkhothuychung Jan 4, 2025
6ca2e58
clang-format
changkhothuychung Jan 4, 2025
e4cd32d
fix
changkhothuychung Jan 4, 2025
f160d0f
export concat view in modules
changkhothuychung Jan 6, 2025
302c24d
conditional pack indexing
changkhothuychung Jan 8, 2025
05dd08e
clang-format
changkhothuychung Jan 8, 2025
00d3d24
some fix
changkhothuychung Jan 8, 2025
d220232
update test files to reflect c++26 support
changkhothuychung Jan 8, 2025
a1f9610
some fix
changkhothuychung Jan 9, 2025
fa930a0
missing clang-format
changkhothuychung Jan 9, 2025
342dcea
fix constexpr and add test
changkhothuychung Jan 10, 2025
e7da221
add FTM
changkhothuychung Feb 15, 2025
1846f4f
Merge branch 'main' into views-concat
changkhothuychung Feb 15, 2025
a01a971
add release notes
changkhothuychung Feb 15, 2025
391e424
Merge branch 'main' into views-concat
changkhothuychung Feb 15, 2025
798b417
Merge branch 'main' into views-concat
changkhothuychung Feb 15, 2025
633707e
Merge branch 'main' into views-concat
changkhothuychung Feb 16, 2025
029bee0
implement LWG4082
changkhothuychung Feb 16, 2025
62e7ead
LWG4082
changkhothuychung Feb 16, 2025
54d76a6
Merge branch 'views-concat' of https://github.com/changkhothuychung/l…
changkhothuychung Feb 16, 2025
7ba3151
code formatting
changkhothuychung Feb 16, 2025
012364f
code formatting
changkhothuychung Feb 16, 2025
295226c
fix operator()
changkhothuychung Feb 16, 2025
5752cf8
fix test
changkhothuychung Feb 17, 2025
87a30db
code formatting
changkhothuychung Feb 17, 2025
8757ff1
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Feb 17, 2025
bd2eb73
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Feb 17, 2025
82679af
Update libcxx/docs/Status/Cxx2cPapers.csv
changkhothuychung Feb 17, 2025
4f1b9f5
code formatting
changkhothuychung Feb 17, 2025
01fd829
fix comment in tests
changkhothuychung Feb 18, 2025
b874880
update adaptor test
changkhothuychung Feb 18, 2025
9d2d42c
code formatting
changkhothuychung Feb 18, 2025
4fad575
Update libcxx/docs/ReleaseNotes/21.rst
changkhothuychung Feb 20, 2025
2344e77
some updates
changkhothuychung Feb 20, 2025
5483077
Merge branch 'views-concat' of https://github.com/changkhothuychung/l…
changkhothuychung Feb 20, 2025
bab36e0
code formatting
changkhothuychung Feb 20, 2025
d0174fb
LWG407
changkhothuychung Feb 21, 2025
023d4ed
Merge branch 'main' into views-concat
changkhothuychung Feb 22, 2025
f3bbcd9
valueless test
changkhothuychung Feb 27, 2025
f46aef1
Merge branch 'views-concat' of https://github.com/changkhothuychung/l…
changkhothuychung Feb 27, 2025
857897a
status doc
changkhothuychung Feb 27, 2025
26e4fa3
change to __unchecked_get and visit value with hardened checks
changkhothuychung Mar 1, 2025
68dc7a8
update tests
changkhothuychung Mar 1, 2025
43c7265
back to std::get for tuple
changkhothuychung Mar 1, 2025
3ae866a
clang format
changkhothuychung Mar 1, 2025
f0d152d
some fixes
changkhothuychung Mar 1, 2025
01994bd
fix
changkhothuychung Mar 1, 2025
73ed437
exceptions
changkhothuychung Mar 1, 2025
c680eb7
unix headers
changkhothuychung Mar 2, 2025
5fdeb86
return statement
changkhothuychung Mar 2, 2025
1685b76
fix test
changkhothuychung Mar 2, 2025
344183d
more valueless_by_exception cases
changkhothuychung Mar 2, 2025
eeee5c7
hardening tests to libcxx/test/libcxx
changkhothuychung Mar 2, 2025
6c587ad
fix includes
changkhothuychung Mar 2, 2025
5448182
remove check assertions
changkhothuychung Mar 2, 2025
510ab36
change name test file and remove header file
changkhothuychung Mar 7, 2025
6a823e0
Merge branch 'main' into views-concat
changkhothuychung Mar 8, 2025
c77f47d
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
67023db
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
18f829c
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
a0a5aae
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
82603c6
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
42d1b58
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
8c9d071
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
de99485
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
e43f970
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
93e0aa3
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
4ef9656
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
10d0e89
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
2a20f2b
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
29114a2
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
d1deb23
Update libcxx/include/__ranges/concat_view.h
changkhothuychung Mar 8, 2025
d0ed3b8
merge hardening checks
changkhothuychung Mar 8, 2025
ea26c34
fix test file name
changkhothuychung Mar 8, 2025
865f6d9
clang format
changkhothuychung Mar 8, 2025
8630f6c
some updates
changkhothuychung Mar 9, 2025
833ce3e
Merge branch 'main' into views-concat
changkhothuychung Mar 9, 2025
da4bbaf
typo fix
changkhothuychung Mar 9, 2025
f370264
Merge branch 'views-concat' of https://github.com/changkhothuychung/l…
changkhothuychung Mar 9, 2025
d41cf3b
remove unwated include's and files
changkhothuychung Mar 20, 2025
c9fa00b
change from typedef to using
changkhothuychung Mar 26, 2025
b0dcc2e
typo
changkhothuychung Mar 26, 2025
601216f
update test
changkhothuychung May 11, 2025
e4e3d97
update test
changkhothuychung May 11, 2025
f63f6a0
constructor test
changkhothuychung May 11, 2025
a034e4b
__distance to distance
changkhothuychung May 11, 2025
d9807b7
fix FTM
changkhothuychung May 11, 2025
901a0ea
clang format
changkhothuychung May 11, 2025
e966d30
rm file no longer exists
changkhothuychung May 11, 2025
ff04d82
fix libcpp nodebug
changkhothuychung May 11, 2025
aa0f740
Merge branch 'main' into views-concat
changkhothuychung May 11, 2025
26f0922
Update libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator…
changkhothuychung May 12, 2025
7ca8220
Update libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator…
changkhothuychung May 12, 2025
45fc342
Update libcxx/test/std/ranges/range.adaptors/range.concat/begin.pass.cpp
changkhothuychung May 13, 2025
66cd9cd
fix syntax test file
changkhothuychung May 13, 2025
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
2 changes: 1 addition & 1 deletion libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_philox_engine`` *unimplemented*
---------------------------------------------------------- -----------------
``__cpp_lib_ranges_concat`` *unimplemented*
``__cpp_lib_ranges_concat`` ``202403L``
---------------------------------------------------------- -----------------
``__cpp_lib_ratio`` ``202306L``
---------------------------------------------------------- -----------------
Expand Down
2 changes: 2 additions & 0 deletions libcxx/docs/ReleaseNotes/21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ Implemented Papers
- N4258: Cleaning-up noexcept in the Library (`Github <https://github.com/llvm/llvm-project/issues/99937>`__)
- P0767R1: Deprecate POD (`Github <https://github.com/llvm/llvm-project/issues/104013>`__)
- P1361R2: Integration of chrono with text formatting (`Github <https://github.com/llvm/llvm-project/issues/100014>`__)
- P2542R8: ``views::concat`` (`Github <https://github.com/llvm/llvm-project/issues/105419>`__)
- P2255R2: A type trait to detect reference binding to temporary (implemented the type traits only) (`Github <https://github.com/llvm/llvm-project/issues/105180>`__)
- P2562R1: ``constexpr`` Stable Sorting (`Github <https://github.com/llvm/llvm-project/issues/105360>`__)
- P0472R3: Put std::monostate in <utility> (`Github <https://github.com/llvm/llvm-project/issues/127874>`__)
- P1222R4: A Standard ``flat_set`` (`Github <https://github.com/llvm/llvm-project/issues/105193>`__)
- P2897R7: ``aligned_accessor``: An mdspan accessor expressing pointer over-alignment (`Github <https://github.com/llvm/llvm-project/issues/118372>`__)
- P3247R2: Deprecate the notion of trivial types (`Github <https://github.com/llvm/llvm-project/issues/118387>`__)


Improvements and New Features
-----------------------------

Expand Down
4 changes: 2 additions & 2 deletions libcxx/docs/Status/Cxx2cIssues.csv
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"`LWG4071 <https://wg21.link/LWG4071>`__","``reference_wrapper`` comparisons are not SFINAE-friendly","2024-06 (St. Louis)","|Complete|","19",""
"`LWG4074 <https://wg21.link/LWG4074>`__","``compatible-joinable-ranges`` is underconstrained","2024-06 (St. Louis)","","",""
"`LWG4076 <https://wg21.link/LWG4076>`__","``concat_view`` should be freestanding","2024-06 (St. Louis)","","",""
"`LWG4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","2024-06 (St. Louis)","","",""
"`LWG4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","2024-06 (St. Louis)","","",""
"`LWG4079 <https://wg21.link/LWG4079>`__","Missing Preconditions in ``concat_view::iterator``\`s conversion constructor","2024-06 (St. Louis)","|Complete|","21",""
"`LWG4082 <https://wg21.link/LWG4082>`__","``views::concat(r)`` is well-formed when ``r`` is an ``output_range``","2024-06 (St. Louis)","|Complete|","21",""
Comment on lines +71 to +72
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have tests for these two LWG issues?

"`LWG4083 <https://wg21.link/LWG4083>`__","``views::as_rvalue`` should reject non-input ranges","2024-06 (St. Louis)","","",""
"`LWG4096 <https://wg21.link/LWG4096>`__","``views::iota(views::iota(0))`` should be rejected","2024-06 (St. Louis)","","",""
"`LWG4098 <https://wg21.link/LWG4098>`__","``views::adjacent<0>`` should reject non-forward ranges","2024-06 (St. Louis)","","",""
Expand Down
2 changes: 1 addition & 1 deletion libcxx/docs/Status/Cxx2cPapers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"`P3142R0 <https://wg21.link/P3142R0>`__","Printing Blank Lines with ``println``","2024-03 (Tokyo)","|Complete|","19","Implemented as a DR against C++23. (MSVC STL and libstdc++ will do the same.)"
"`P2845R8 <https://wg21.link/P2845R8>`__","Formatting of ``std::filesystem::path``","2024-03 (Tokyo)","","",""
"`P0493R5 <https://wg21.link/P0493R5>`__","Atomic minimum/maximum","2024-03 (Tokyo)","","",""
"`P2542R8 <https://wg21.link/P2542R8>`__","``views::concat``","2024-03 (Tokyo)","","",""
"`P2542R8 <https://wg21.link/P2542R8>`__","``views::concat``","2024-03 (Tokyo)","|Complete|","21",""
"`P2591R5 <https://wg21.link/P2591R5>`__","Concatenation of strings and string views","2024-03 (Tokyo)","|Complete|","19",""
"`P2248R8 <https://wg21.link/P2248R8>`__","Enabling list-initialization for algorithms","2024-03 (Tokyo)","","",""
"`P2810R4 <https://wg21.link/P2810R4>`__","``is_debugger_present`` ``is_replaceable``","2024-03 (Tokyo)","","",""
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ set(files
__ranges/as_rvalue_view.h
__ranges/chunk_by_view.h
__ranges/common_view.h
__ranges/concat_view.h
__ranges/concepts.h
__ranges/container_compatible_range.h
__ranges/counted.h
Expand Down
Loading
Loading