Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
lint
  • Loading branch information
huixie90 committed Jul 19, 2025
commit 0049ed53369dd077aaa08d1ef95ef55162fec908
2 changes: 1 addition & 1 deletion libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ set(files
__ranges/transform_view.h
__ranges/view_interface.h
__ranges/views.h
__ranges/zip_view.h
__ranges/zip_transform_view.h
__ranges/zip_view.h
__split_buffer
__std_mbstate_t.h
__stop_token/atomic_unique_lock.h
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__ranges/zip_transform_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
#include <tuple> // for std::apply

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ constexpr bool test() {

{
// underlying const R is not a range
using View = std::ranges::zip_transform_view<MakeTuple, SimpleCommon, NoConstBeginView>;
static_assert(HasBegin<View>);
static_assert(!HasConstBegin<View>);
using ZTV = std::ranges::zip_transform_view<MakeTuple, SimpleCommon, NoConstBeginView>;
static_assert(HasBegin<ZTV>);
static_assert(!HasConstBegin<ZTV>);
}

{
// Fn cannot be invoked on const range
using View = std::ranges::zip_transform_view<NonConstOnlyFn, ConstNonConstDifferentView>;
static_assert(HasBegin<View>);
static_assert(!HasConstBegin<View>);
using ZTV = std::ranges::zip_transform_view<NonConstOnlyFn, ConstNonConstDifferentView>;
static_assert(HasBegin<ZTV>);
static_assert(!HasConstBegin<ZTV>);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ constexpr bool test() {

{
// underlying const R is not a range
using View = std::ranges::zip_transform_view<MakeTuple, SimpleCommon, NoConstBeginView>;
static_assert(HasEnd<View>);
static_assert(!HasConstEnd<View>);
using ZTV = std::ranges::zip_transform_view<MakeTuple, SimpleCommon, NoConstBeginView>;
static_assert(HasEnd<ZTV>);
static_assert(!HasConstEnd<ZTV>);
}

{
// Fn cannot invoke on const range
using View = std::ranges::zip_transform_view<NonConstOnlyFn, ConstNonConstDifferentView>;
static_assert(HasEnd<View>);
static_assert(!HasConstEnd<View>);
using ZTV = std::ranges::zip_transform_view<NonConstOnlyFn, ConstNonConstDifferentView>;
static_assert(HasEnd<ZTV>);
static_assert(!HasConstEnd<ZTV>);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ constexpr bool test() {
int buffer2[2] = {1, 2};

std::ranges::zip_transform_view v{MakeTuple{}, InputCommonView(buffer1), InputCommonView(buffer2)};
using View = decltype(v);
static_assert(!std::ranges::forward_range<View>);
static_assert(std::ranges::input_range<View>);
static_assert(std::ranges::common_range<View>);
using ZTV = decltype(v);
static_assert(!std::ranges::forward_range<ZTV>);
static_assert(std::ranges::input_range<ZTV>);
static_assert(std::ranges::common_range<ZTV>);

auto it1 = v.begin();
auto it2 = v.end();
Expand Down