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
review
  • Loading branch information
huixie90 committed Jul 19, 2025
commit 908fb3f6e7effcdc93f5681850ac2133e3561ce2
1 change: 0 additions & 1 deletion libcxx/docs/ReleaseNotes/21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Implemented Papers
- P2711R1: Making multi-param constructors of ``views`` ``explicit`` (`Github <https://github.com/llvm/llvm-project/issues/105252>`__)
- P2770R0: Stashing stashing ``iterators`` for proper flattening (`Github <https://github.com/llvm/llvm-project/issues/105250>`__)
- P2655R3: ``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type (`Github <https://github.com/llvm/llvm-project/issues/105260>`__)
- P2321R2: ``zip`` (`Github <https://github.com/llvm/llvm-project/issues/105169>`__) (The paper is partially implemented. ``zip_transform_view`` is implemented in this release)

Improvements and New Features
-----------------------------
Expand Down
1 change: 1 addition & 0 deletions libcxx/docs/ReleaseNotes/22.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ What's New in Libc++ 22.0.0?
Implemented Papers
------------------

- P2321R2: ``zip`` (`Github <https://github.com/llvm/llvm-project/issues/105169>`__) (The paper is partially implemented. ``zip_transform_view`` is implemented in this release)

Improvements and New Features
-----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ constexpr bool test(CPO& o, Args&&...) {
static_assert(std::is_trivially_copyable_v<CPO>);
static_assert(std::is_trivially_default_constructible_v<CPO>);

auto p = o;
auto p = o;
using T = decltype(p);

// The type of a customization point object, ignoring cv-qualifiers, shall model semiregular.
Expand Down Expand Up @@ -89,11 +89,12 @@ static_assert(test(std::views::counted, a, 10));
static_assert(test(std::views::drop, a, 10));
//static_assert(test(std::views::drop_while, a, [](int x){ return x < 10; }));
//static_assert(test(std::views::elements<0>, pairs));
static_assert(test(std::views::filter, a, [](int x){ return x < 10; }));
static_assert(test(std::views::filter, a, [](int x) { return x < 10; }));
static_assert(test(std::views::join, arrays));
//static_assert(test(std::views::split, a, 4));
static_assert(test(std::views::lazy_split, a, 4));
static_assert(test(std::views::reverse, a));
static_assert(test(std::views::take, a, 10));
//static_assert(test(std::views::take_while, a, [](int x){ return x < 10; }));
static_assert(test(std::views::transform, a, [](int x){ return x + 1; }));
static_assert(test(std::views::transform, a, [](int x) { return x + 1; }));
static_assert(test(std::views::zip_transform, [](int x, int y) { return x + y; }, a, a));
Comment thread
huixie90 marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "test_macros.h"
#include "test_iterators.h"
#include "test_range.h"
#include "../types.h"
#include "../range_adaptor_types.h"

#if TEST_STD_VER <= 20
# error "range.zip.transform/types.h" can only be included in builds supporting C++20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <tuple>
#include <utility>

#include "../types.h"
#include "../range_adaptor_types.h"

template <class T>
concept HasConstBegin = requires(const T& ct) { ct.begin(); };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <type_traits>
#include <utility>

#include "../types.h"
#include "../range_adaptor_types.h"

static_assert(std::is_invocable_v<decltype((std::views::zip))>);
static_assert(!std::is_invocable_v<decltype((std::views::zip)), int>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <ranges>
#include <tuple>

#include "../types.h"
#include "../range_adaptor_types.h"

template <class T>
void conversion_test(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ranges>
#include <tuple>

#include "../types.h"
#include "../range_adaptor_types.h"

// ID | simple | common | bidi | random | sized | #views | v.end() | as_const(v)
// | | | | access | | | | .end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <concepts>
#include <functional>

#include "../../types.h"
#include "../../range_adaptor_types.h"

template <class T, class U>
concept canPlusEqual = requires(T& t, U& u) { t += u; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "test_iterators.h"
#include "test_range.h"

#include "../../types.h"
#include "../../range_adaptor_types.h"

// This is for testing that zip iterator never calls underlying iterator's >, >=, <=, !=.
// The spec indicates that zip iterator's >= is negating zip iterator's < instead of calling underlying iterator's >=.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

struct PODIter {
int i; // deliberately uninitialised
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <cassert>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

using ConstIterIncompatibleView = BasicView<forward_iterator<int*>, forward_iterator<int*>,
random_access_iterator<const int*>, random_access_iterator<const int*>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

template <class Iter>
concept canDecrement = requires(Iter it) { --it; } || requires(Iter it) { it--; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

constexpr bool test() {
std::array a{1, 2, 3, 4};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

struct InputRange : IntBufferView {
using IntBufferView::IntBufferView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

struct ThrowingMove {
ThrowingMove() = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cassert>
#include <ranges>

#include "../../types.h"
#include "../../range_adaptor_types.h"

struct ThrowingMove {
ThrowingMove() = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "test_iterators.h"

#include "../../types.h"
#include "../../range_adaptor_types.h"

template <class T>
struct ForwardView : std::ranges::view_base {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

struct ThrowOnIncrementIterator {
int* it_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ranges>
#include <cassert>

#include "../../types.h"
#include "../../range_adaptor_types.h"

constexpr bool test() {
int buffer[8] = {1, 2, 3, 4, 5, 6, 7, 8};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <tuple>
#include <utility>

#include "../types.h"
#include "../range_adaptor_types.h"

void testConceptPair() {
int buffer1[2] = {1, 2};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <cassert>
#include <ranges>

#include "../../types.h"
#include "../../range_adaptor_types.h"

template <class T>
struct convertible_sentinel_wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"
#include "test_range.h"

using Iterator = random_access_iterator<int*>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <ranges>
#include <tuple>

#include "../../types.h"
#include "../../range_adaptor_types.h"

template <class Base = int*>
struct convertible_forward_sized_iterator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <utility>

#include "test_iterators.h"
#include "../types.h"
#include "../range_adaptor_types.h"

int buffer[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
struct View : std::ranges::view_base {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
Comment thread
huixie90 marked this conversation as resolved.
Outdated
//===----------------------------------------------------------------------===//

#ifndef TEST_STD_RANGES_RANGE_ADAPTORS_TYPES_H
#define TEST_STD_RANGES_RANGE_ADAPTORS_TYPES_H
#ifndef TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_ADAPTOR_TYPES_H
#define TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_ADAPTOR_TYPES_H

#include <functional>
#include <ranges>
Expand Down Expand Up @@ -465,4 +465,4 @@ struct IterMoveSwapRange {
};
} // namespace adltest

#endif // TEST_STD_RANGES_RANGE_ADAPTORS_TYPES_H
#endif // TEST_STD_RANGES_RANGE_ADAPTORS_RANGE_ADAPTOR_TYPES_H
Loading