Skip to content

Commit

Permalink
fix more error
Browse files Browse the repository at this point in the history
  • Loading branch information
changkhothuychung committed Nov 19, 2024
1 parent 4416a4a commit 898fa3a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions libcxx/include/__ranges/concat_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ concept concatable = requires { // exposition only

template <bool Const, class... Rs>
concept concat_is_random_access =
(all_random_access<Const, Rs...>) &&
(sized_range<maybe_const<Const, Rs>> && ...);
(random_access_range<__maybe_const<_Const, _Rs>> && ...)
&&
(sized_range<__maybe_const<Const, Rs>> && ...);

template <class R>
concept constant_time_reversible = // exposition only
Expand All @@ -138,9 +139,9 @@ concept constant_time_reversible = // exposition only
template <bool Const, class... Rs>
concept concat_is_bidirectional =
(
(bidirectional_range<maybe_const<Const, Rs>> && ... )
(bidirectional_range<__maybe_const<Const, Rs>> && ... )
&&
(constant_time_reversible<maybe_const<Const, Rs>> && ... )
(constant_time_reversible<__maybe_const<Const, Rs>> && ... )
);


Expand All @@ -161,7 +162,7 @@ class concat_view : public view_interface<concat_view<Views...>>

constexpr explicit concat_view(Views... views): views_(views...) {}

constexpr iterator<false> begin() requires(!(simple_view<Views> && ...))
constexpr iterator<false> begin() requires(!(__simple_view<Views> && ...))
{
iterator<false> it(this, in_place_index<0>, ranges::begin(get<0>(views_)));
it.template satisfy<0>();
Expand All @@ -176,7 +177,7 @@ class concat_view : public view_interface<concat_view<Views...>>
return it;
}

constexpr auto end() requires(!(simple_view<Views> && ...))
constexpr auto end() requires(!(__simple_view<Views> && ...))
{
if constexpr (common_range<typename last_view<Views...>::type>) {
// last_view to be implemented
Expand Down Expand Up @@ -234,9 +235,9 @@ template <input_range... Views>
public:
//using iterator_category = see below; // not always present.

using derive_pack_random_iterator = derived_from_pack<iterator_traits<iterator_t<__maybe_const<Const, Views>>>::iterator_category..., random_access_iterator_tag>::value;
using derive_pack_bidirectional_iterator = derived_from_pack<iterator_traits<iterator_t<__maybe_const<Const, Views>>>::iterator_category..., bidirectional_iterator_tag>::value;
using derive_pack_forward_iterator = derived_from_pack<iterator_traits<iterator_t<__maybe_const<Const, Views>>>::iterator_category..., forward_iterator_tag>::value;
using derive_pack_random_iterator = derived_from_pack<iterator_traits<typename iterator_t<__maybe_const<Const, Views>>>::iterator_category..., random_access_iterator_tag>::value;
using derive_pack_bidirectional_iterator = derived_from_pack<iterator_traits<typename iterator_t<__maybe_const<Const, Views>>>::iterator_category..., bidirectional_iterator_tag>::value;
using derive_pack_forward_iterator = derived_from_pack<iterator_traits<typename iterator_t<__maybe_const<Const, Views>>>::iterator_category..., forward_iterator_tag>::value;
using iterator_concept = _If<!is_reference_v<concat_reference_t<__maybe_const<Const, Views>...>>,
input_iterator_tag,
_If<derive_pack_random_iterator,
Expand Down

0 comments on commit 898fa3a

Please sign in to comment.