mirror-llvm-project/libcxx/include/__ranges
Hristo Hristov 11b58f0e4c
[libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891)
Implements https://wg21.link/P3059R2 (DR)

Closes #189599

1. Made constructors of iterator and sentinel types of the following
views private:
  - `iota_view`
  - `basic_istream_view`
  - `filter_view`
  - `transform_view`
  - `take_view`
  - `take_while_view`
  - `join_view`
  - `lazy_split_view`
  - `split_view`
  - `elements_view`
2. Updated all relevant tests to fix the usages of the now private
constructor, including:
   1. Removed now obsolete tests (files and cases).
2. Updated all relevant tests to get the iterators and the sentinels via
`begin()` and `end()`, wherever applicable .
   3. Added test cases to confirm that P3059R2 was implemented properly.
   4. Minor other (necessary) tweaks.

---------

Co-authored-by: Hristo Hristov <zingam@outlook.com>
Co-authored-by: A. Jiang <de34@live.cn>
2026-07-30 17:57:11 +03:00
..
access.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
adjacent_transform_view.h [libc++][ranges] Applied [[nodiscard]] to adjacent_transform_view (#205900) 2026-07-07 08:41:28 +03:00
adjacent_view.h [libc++][ranges] Applied [[nodiscard]] to adjacent_view (#205206) 2026-06-29 19:46:49 +08:00
all.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
as_rvalue_view.h [libc++][ranges] Applied [[nodiscard]] to as_rvalue_view (#173145) 2025-12-23 18:47:37 +02:00
chunk_by_view.h [libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464) 2026-07-10 10:33:36 +02:00
common_view.h [libc++][ranges] Applied [[nodiscard]] to common_view (#173176) 2025-12-23 18:47:53 +02:00
concat_view.h [libc++][ranges] P2542R8: Implement views::concat (#120920) 2026-05-30 23:26:16 +01:00
concepts.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
container_compatible_range.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
counted.h
dangling.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
data.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
drop_view.h [libc++][ranges] Backport P2711R1: Making multi-param constructors of views explicit (#190513) 2026-06-23 11:39:28 -04:00
drop_while_view.h [libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464) 2026-07-10 10:33:36 +02:00
elements_of.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
elements_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
empty.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
empty_view.h [libc++][ranges] Applied [[nodiscard]] to empty_view (#173215) 2025-12-23 18:49:01 +02:00
enable_borrowed_range.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
enable_view.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
enumerate_view.h [libc++][ranges] Fix missing forward in views::enumerate (#197635) 2026-05-15 12:19:45 +03:00
filter_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
from_range.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
iota_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
istream_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
join_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
join_with_view.h [libc++][ranges] Updated [[nodiscard]] implementation for subrange and join_with_view (#176936) 2026-01-27 11:03:07 +02:00
lazy_split_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
movable_box.h
non_propagating_cache.h
owning_view.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
range_adaptor.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
rbegin.h
ref_view.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
rend.h
repeat_view.h [libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464) 2026-07-10 10:33:36 +02:00
reverse_view.h [libc++][ranges] Applied [[nodiscard]] to reverse_view (#205186) 2026-06-24 12:48:55 +03:00
single_view.h [libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464) 2026-07-10 10:33:36 +02:00
size.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
split_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
stride_view.h [libc++] Implement P1899 ranges::stride_view (#65200) 2026-04-25 06:51:37 -04:00
subrange.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
take_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
take_while_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
to.h
transform_view.h [libc++][ranges] P3059R2: Making user-defined constructors of view iterators/sentinels private (#193891) 2026-07-30 17:57:11 +03:00
view_interface.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
views.h [libc++] Consistently use version guards outside namespace macros (#181136) 2026-06-29 14:44:44 +02:00
zip_transform_view.h [libc++][ranges] Applied [[nodiscard]] to views::zip_transform (#207120) 2026-07-06 23:19:20 +03:00
zip_view.h [libc++][ranges] Applied [[nodiscard]] to zip_view (#207667) 2026-07-07 19:00:58 +03:00