はじめに(Introduction)
N4910 Working Draft, Standard for Programming Language C++
n4910は、ISO/IEC JTC1 SC22 WG21の作業原案(Working Draft)です。
公式のISO/IEC 14882原本ではありません。
ISO/IEC JTC1 SC22 WG21では、可能な限り作業文書を公開し、幅広い意見を求めています。
一連の記事はコード断片をコンパイルできる形にする方法を検討してコンパイル、リンク、実行して、規格案の原文と処理系(g++, Clang++)との違いを確認し、技術内容を検討し、ISO/IEC JTC1 SC22 WG21にフィードバックするために用います。
また、CERT C++, MISRA C++等のコーディング標準のコード断片をコンパイルする際の参考にさせていただこうと考えています。CERT C++, MISRA C++が標準化の動きとの時間的なずれがあれば確認できれば幸いです。また、boostライブラリとの関連、Linux OS, TOPPERSカーネル、g++(GCC), clang++(LLVM)との関係も調査中です。
何か、抜け漏れ、耳より情報がありましたらおしらせくださると幸いです。
<この項は書きかけです。順次追記します。>
背景(back ground)
C/C++でコンパイルエラーが出ると、途方にくれることがしばしばあります。
何回かに1回は、該当するエラーが検索できます。
ただ、条件が違っていて、そこでの修正方法では目的を達成しないこともしばしばです。いろいろな条件のコンパイルエラーとその対応方法について、広く記録することによって、いつか同じエラーに遭遇した時にやくに立つことを目指しています。
この半年の間で、三度、自分のネットでの記録に助けられたことがあります。
また過去に解決できなかった記録を10種類以上、最近になって解決できたことがあります。それは、主に次の3つの情報に基づいています。
cpprefjp - C++日本語リファレンス
コンパイラの実装状況
また
https://researchmap.jp/joub9b3my-1797580/#_1797580
に記載したサイトのお世話になっています。
作業方針(sequence)
Clang++では-std=c++03, C++2bの2種類
g++では-std=c++03, c++2bの2種類
でコンパイルし、
1)コンパイルエラーを収集する。
2)コンパイルエラーをなくす方法を検討する。
コンパイルエラーになる例を示すだけが目的のコードは、コンパイルエラーをなくすのではなく、コンパイルエラーの種類を収集するだけにする。
文法を示すのが目的のコード場合に、コンパイルエラーをなくすのに手間がかかる場合は、順次作業します。
3)リンクエラーをなくす方法を検討する。
文法を示すのが目的のコード場合に、リンクエラーをなくすのに手間がかかる場合は、順次作業します。
4)意味のある出力を作る。
コンパイル、リンクが通っても、意味のある出力を示そうとすると、コンパイル・リンクエラーが出て収拾できそうにない場合がある。順次作業します。
1)だけのものから4)まで進んだものと色々ある状態です。一歩でも前に進むご助言をお待ちしています。「検討事項」の欄に現状を記録するようにしています。
C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list
C++N4606, 2016符号断片編纂一覧(example code compile list)
C++N4606, 2016 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/
C++N3242, 2011 sample code compile list on clang++ and g++
編纂器(Compiler)
clang++ --version
Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin
g++- --version
g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26.7 Range adaptors [range.adaptors] C++N4910:2022 (655) p1059.cpp
算譜(source code)
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "26.7 Range adaptors [range.adaptors] C++N4910:2022 (655) p1059.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. OGAWA Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91
#include "N4910.h"
using namespace std;
// 26.7.1 General [range.adaptors.general]
// Subclause 26.7 defines range adaptors, which are utilities that transform a range into a view with custom behaviors. These adaptors can be chained to create pipelines of range transformations that evaluate lazily as the resulting view is iterated.
// Range adaptors are declared in namespace std::ranges::views.
// The bitwise OR operator is overloaded for the purpose of creating adaptor chain pipelines. The adaptors also support function call syntax with equivalent semantics.
// [Example 1 :
vector<int> ints{0,1,2,3,4,5};
auto even = [](int i) {
return 0 == i % 2;
};
auto square = [](int i) {
return i * i;
};
for (int i : ints | views::filter(even) | views::transform(square)) {
cout << i << ' '; //prints: 0416 }
assert(ranges::equal(ints | views::filter(even), views::filter(ints, even)));
}
// 26.7.2 Range adaptor objects [range.adaptor.object]
// A range adaptor closure object is a unary function object that accepts a range argument. For a range adaptor closure object C and an expression R such that decltype((R)) models range, the following expressions are equivalent: C(R) R|C
// Given an additional range adaptor closure object D, the expression C | D produces another range adaptor closure object E. E is a perfect forwarding call wrapper (22.10.4) with the following properties:
// The expression C | D is well-formed if and only if the initializations of the state entities of E are all well-formed. // Given an object t of type T, where
// — t is a unary function object that accepts a range argument,
// — T models derived_from<range_adaptor_closure<T>>,
// — T has no other base classes of type range_adaptor_closure<U> for any other type U, and — T does not model range
// The behavior of a program that adds a specialization for range_adaptor_closure is undefined.
// A range adaptor object is a customization point object (16.3.3.3.6) that accepts a viewable_range as its first argument and returns a view.
// If a range adaptor object accepts only one argument, then it is a range adaptor closure object.
// If a range adaptor object adaptor accepts more than one argument, then let range be an expression such that decltype((range)) models viewable_range, let args... be arguments such that adaptor(range, args...) is a well-formed expression as specified in the rest of subclause 26.7, and let BoundArgs be a then the implementation ensures that t is a range adaptor closure object.
// — copyable-box<T> constrains its type parameter T with copy_constructible<T> && is_object_- v<T>.
// — The default constructor of copyable-box <T> is equivalent to:
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
copyable-box{in_place} {}
// — If copyable<T> is not modeled, the copy assignment operator is equivalent to:
constexpr copyable-box& operator=(const copyable-box& that) noexcept(is_nothrow_copy_constructible_v<T>) {
if (this != addressof(that)) {
if (that) emplace(*that);
else reset();
}
return *this;
}
// — If movable<T> is not modeled, the move assignment operator is equivalent to:
constexpr copyable-box& operator=(copyable-box&& that) noexcept(is_nothrow_move_constructible_v<T>) {
if (this != addressof(that)) {
if (that) emplace(std::move(*that));
else reset();
}
return *this;
}
// — non-propagating-cache <T> constrains its type parameter T with is_object_v<T>. — The copy constructor is equivalent to:
constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
constexpr non-propagating-cache(non-propagating-cache&& other) noexcept {
other.reset();
}
// — The copy assignment operator is equivalent to:
constexpr non-propagating-cache& operator=(const non-propagating-cache& other) noexcept {
if (addressof(other) != this)
}
// pack that denotes decay_t<decltype((args))>.... The expression adaptor(args...) produces a range adaptor closure object f that is a perfect forwarding call wrapper (22.10.4) with the following properties:
//
// — Its target object is a copy of adaptor.
// — Its bound argument entities bound_args consist of objects of types BoundArgs... direct-non-list- initialized with std::forward<decltype((args))>(args)..., respectively.
// — Its call pattern is adaptor(r, bound_args...), where r is the argument used in a function call
// Many types in this subclause are specified in terms of an exposition-only class template copyable-box. copyable-box <T> behaves exactly like optional<T> with the following differences: expression of f.
// The expression adaptor(args...) is well-formed if and only if the initialization of the bound argument entities of the result, as specified above, are all well-formed.
// 26.7.3 Copyable wrapper [range.copy.wrap]
// Recommended practice: copyable-box <T> should store only a T if either T models copyable or is_nothrow_- move_constructible_v<T> && is_nothrow_copy_constructible_v<T> is true.
// 26.7.4 Non-propagating cache [range.nonprop.cache]
// Some types in subclause 26.7 are specified in terms of an exposition-only class template non-propagating- cache . non-propagating-cache <T> behaves exactly like optional<T> with the following differences:
reset();
return *this;
}
// — The move assignment operator is equivalent to:
constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
reset();
other.reset();
return *this;
}
// — non-propagating-cache <T> has an additional member function template specified as follows: template<class I>
constexpr T& emplace-deref (const I& i); // exposition only
// Mandates: The declaration T t(*i); is well-formed for some invented variable t.
// [Note 1: If *i is a prvalue of type cv T, there is no requirement that it is movable (9.4.1). —end note] Effects: Calls reset(). Then direct-non-list-initializes the contained value with *i. Postconditions: *this contains a value.
// Returns: A reference to the new contained value.
// Throws: Any exception thrown by the initialization of the contained value.
// Remarks: If an exception is thrown during the initialization of T, *this does not contain a value, and the previous value (if any) has been destroyed.
// [Note 2: non-propagating-cache enables an input view to temporarily cache values as it is iterated over. —end note ]
// 26.7.5 All view [range.all]
// 26.7.5.1 General [range.all.general]
// views::all returns a view that includes all elements of its range argument.
// The name views::all denotes a range adaptor object (26.7.2). Given a subexpression E, the expression views::all(E) is expression-equivalent to:
// — decay-copy(E) if the decayed type of E models view.
// — Otherwise, ref_view{E} if that expression is well-formed. // — Otherwise, owning_view{E}.
// 26.7.5.2 Class template ref_view [range.ref.view]
// ref_view is a view of the elements of some other range.
namespace std::ranges {
template<range R>
requires is_object_v<R>
class ref_view : public view_interface<ref_view<R>> {
private:
R* r_; // exposition only public:
template<different-from<ref_view> T> requires see_below
constexpr ref_view(T&& t);
constexpr R& base() const {
return *r_;
}
constexpr iterator_t<R> begin() const {
return ranges::begin(*r_);
} constexpr sentinel_t<R> end() const {
return ranges::end(*r_);
}
constexpr bool empty() const
requires requires {
ranges::empty(*r_);
}
{
return ranges::empty(*r_);
}
constexpr auto size() const requires sized_range<R>
{
return ranges::size(*r_);
}
}
}
// Effects: Initializes r_ with addressof(static_cast<R&>(std::forward<T>(t))). Remarks: Let FUN denote the exposition-only functions
void FUN(R&);
void FUN(R&&) = delete;
// The expression in the requires-clause is equivalent to:
convertible_to<T, R&> && requires { FUN(declval<T>()); }
constexpr auto data() const requires contiguous_range<R>
{
return ranges::data(*r_);
}
};
template<class R>
ref_view(R&) -> ref_view<R>;
}
template<different-from<ref_view> T> requires see_below
constexpr ref_view(T&& t);
// 26.7.5.3 Class template owning_view [range.owning.view]
// owning_view is a move-only view of the elements of some other range.
namespace std::ranges {
template<range R>
requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
{ private:
R r_ = R(); // exposition only
public:
owning_view() requires default_initializable<R> = default;
constexpr owning_view(R&& t);
owning_view(owning_view&&) = default;
owning_view& operator=(owning_view&&) = default;
constexpr R& base() & noexcept { return r_; }
constexpr const R& base() const & noexcept {
return r_;
}
constexpr R&& base() && noexcept { return std::move(r_); }
constexpr const R&& base() const && noexcept {
return std::move(r_);
}
constexpr iterator_t<R> begin() {
return ranges::begin(r_);
}
constexpr sentinel_t<R> end() {
return ranges::end(r_);
}
constexpr auto begin() const requires range<const R> { return ranges::begin(r_); }
constexpr auto end() const requires range<const R>
{ return ranges::end(r_); }
constexpr bool empty() requires requires { ranges::empty(r_); }
{ return ranges::empty(r_); }
constexpr bool empty() const requires requires {
ranges::empty(r_);
} {
return ranges::empty(r_);
}
constexpr auto size() requires sized_range<R>
{ return ranges::size(r_); }
constexpr auto size() const requires sized_range<const R> { return ranges::size(r_); }
constexpr auto data() requires contiguous_range<R>
{ return ranges::data(r_); }
constexpr auto data() const requires contiguous_range<const R> { return ranges::data(r_); }
};
}
constexpr owning_view(R&& t);
// Effects: Initializes r_ with std::move(t).
// 26.7.6 Filter view [range.filter]
// 26.7.6.1 Overview [range.filter.overview]
// filter_view presents a view of the elements of an underlying sequence that satisfy a predicate.
// The name views::filter denotes a range adaptor object (26.7.2). Given subexpressions E and P, the expression views::filter(E, P) is expression-equivalent to filter_view(E, P).
// [Example 1 :
vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
auto evens = views::filter(is, [](int i) {
return 0 == i % 2;
});
for (int i : evens)
cout << i << ' '; //prints: 0246 —end example]
// 26.7.6.2 Class template filter_view [range.filter.view]
namespace std::ranges {
template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred>
class filter_view : public view_interface<filter_view<V, Pred>> {
private:
public:
filter_view() requires default_initializable<V> && default_initializable<Pred> = default;
constexpr filter_view(V base, Pred pred);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr const Pred& pred() const;
constexpr iterator begin();
constexpr auto end() {
if constexpr (common_range<V>)
return iterator{*this, ranges::end(base_)};
else
return sentinel{*this};
}
};
template<class R, class Pred>
filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
}
constexpr filter_view(V base, Pred pred);
// Effects: Initializes base_ with std::move(base) and initializes pred_ with std::move(pred).
constexpr const Pred& pred() const;
// Effects: Equivalent to:
return *pred_;
V base_ = V();
copyable-box<Pred> pred_;
// 26.7.6.3, class filter_view::iterator class iterator ;
// 26.7.6.4, class filter_view::sentinel class sentinel ;
// exposition only // exposition only
// exposition only
// exposition only
// — If V models bidirectional_range, then iterator_concept denotes bidirectional_iterator_tag.
// — Otherwise, if V models forward_range, then iterator_concept denotes forward_iterator_tag.
// — Otherwise, iterator_concept denotes input_iterator_tag.
constexpr iterator begin();
// Preconditions: pred_.has_value() is true.
// Returns: {*this, ranges::find_if(base_, ref(*pred_))}.
// Remarks: In order to provide the amortized constant time complexity required by the range concept when filter_view models forward_range, this function caches the result within the filter_view for use on subsequent calls.
// 26.7.6.3 Class filter_view::iterator [range.filter.iterator]
namespace std::ranges {
template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred> class filter_view<V, Pred>::iterator {
private:
iterator_t<V> current_ = iterator_t<V>();
filter_view* parent_ = nullptr;
public:
using iterator_concept = see_below;
// exposition only // exposition only
using iterator_category = see_below;
using value_type = range_value_t<V>;
using difference_type = range_difference_t<V>;
// not always present
iterator() requires default_initializable<iterator_t<V>> = default;
constexpr iterator(filter_view& parent, iterator_t<V> current);
constexpr const iterator_t<V>& base() const & noexcept;
constexpr iterator_t<V> base() &&;
constexpr range_reference_t<V> operator*() const;
constexpr iterator_t<V> operator->() const
requires has-arrow<iterator_t<V>> && copyable<iterator_t<V>>;
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int) requires forward_range<V>;
constexpr iterator& operator--() requires bidirectional_range<V>;
constexpr iterator operator--(int) requires bidirectional_range<V>;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i) noexcept(noexcept(ranges::iter_move(i.current_)));
friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
};
}
// Modification of the element a filter_view::iterator denotes is permitted, but results in undefined behavior if the resulting value does not satisfy the filter predicate.
// iterator::iterator_concept is defined as follows:
// The member typedef-name iterator_category is defined if and only if V models forward_range. In that case, iterator ::iterator_category is defined as follows:
// — Let C denote the type iterator_traits<iterator_t<V>>::iterator_category.
// — If C models derived_from<bidirectional_iterator_tag>, then iterator_category denotes bi- directional_iterator_tag.
// — Otherwise, if C models derived_from<forward_iterator_tag>, then iterator_category denotes forward_iterator_tag.
// — Otherwise, iterator_category denotes C.
constexpr iterator(filter_view& parent, iterator_t<V> current);
// Effects: Initializes current_ with std::move(current) and parent_ with addressof(parent).
constexpr const iterator_t<V>& base() const & noexcept;
// Effects: Equivalent to:
return current_;
constexpr iterator_t<V> base() &&;
// Effects: Equivalent to:
return std::move(current_);
constexpr range_reference_t<V> operator*() const;
// Effects: Equivalent to:
return *current_;
constexpr iterator_t<V> operator->() const
requires has-arrow<iterator_t<V>> && copyable<iterator_t<V>>;
// Effects: Equivalent to:
return current_;
constexpr iterator& operator++();
// Effects: Equivalent to:
current_ = ranges::find_if(std::move(++current_), ranges::end(parent_->base_), ref(*parent_->pred_));
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++*this.
constexpr iterator operator++(int) requires forward_range<V>;
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<V>;
// Effects: Equivalent to:
do --current_;
while (!invoke(*parent_->pred_, *current_));
return *this;
constexpr iterator operator--(int) requires bidirectional_range<V>;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
// Effects: Equivalent to:
return x.current_ == y.current_;
friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
noexcept(noexcept(ranges::iter_move(i.current_)));
// Effects: Equivalent to:
return ranges::iter_move(i.current_);
friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
// Effects: Equivalent to
ranges::iter_swap(x.current_, y.current_).
// 26.7.6.4 Class filter_view::sentinel [range.filter.sentinel]
namespace std::ranges {
template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred> class filter_view<V, Pred>::sentinel {
private:
sentinel_t<V> end_ = sentinel_t<V>();
// exposition only
public:
sentinel() = default;
constexpr explicit sentinel(filter_view& parent);
constexpr sentinel_t<V> base() const;
friend constexpr bool operator==(const iterator& x, const sentinel& y);
};
}
constexpr explicit sentinel(filter_view& parent);
// Effects: Initializes end_ with ranges::end(parent.base_).
constexpr sentinel_t<V> base() const;
// Effects: Equivalent to: return end_;
friend constexpr bool operator==(const iterator& x, const sentinel& y);
// transform_view presents a view of an underlying sequence after applying a transformation function to each element.
// The name views::transform denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::transform(E, F) is expression-equivalent to transform_view(E, F).
// [Example 1 :
vector<int> is{ 0, 1, 2, 3, 4 };
auto squares = views::transform(is, [](int i) {
return i * i;
});
for (int i : squares)
cout << i << ' '; //prints: 014916
// 26.7.7.2 Class template transform_view [range.transform.view]
namespace std::ranges {
template<input_range V, copy_constructible F>
requires view<V> && is_object_v<F> &&
regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
class transform_view : public view_interface<transform_view<V, F>> {
private:
// 26.7.7.3, class template transform_view::iterator
template<bool> struct iterator ; // exposition only
// 26.7.7.4, class template transform_view::sentinel
template<bool> struct sentinel ; // exposition only
// Effects: Equivalent to:
return x.current_ == y.end_;
// 26.7.7 Transform view [range.transform]
// 26.7.7.1 Overview [range.transform.overview]
public:
transform_view() requires default_initializable<V> && default_initializable<F> = default;
constexpr transform_view(V base, F fun);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr iterator<false> begin();
constexpr iterator<true> begin() const
requires range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
constexpr sentinel<false> end();
constexpr iterator<false> end() requires common_range<V>;
constexpr sentinel<true> end() const
requires range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
constexpr iterator<true> end() const requires common_range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
constexpr auto size() requires sized_range<V> {
return ranges::size(base_);
} constexpr auto size() const requires sized_range<const V>
{
return ranges::size(base_);
}
};
template<class R, class F>
transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
}
constexpr transform_view(V base, F fun);
// Effects: Initializes base_ with std::move(base) and fun_ with std::move(fun).
V base_ = V();
copyable-box<F> fun_;
// exposition only // exposition only
constexpr iterator<false> begin();
// Effects: Equivalent to:
return iterator<false> {*this, ranges::begin(base_)};
constexpr iterator<true> begin() const requires range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
// Effects: Equivalent to:
return iterator<true> {*this, ranges::begin(base_)};
constexpr sentinel<false> end();
// Effects: Equivalent to:
return sentinel<false> {ranges::end(base_)};
constexpr iterator<false> end() requires common_range<V>;
// Effects: Equivalent to:
return iterator<false> {*this, ranges::end(base_)};
constexpr sentinel<true> end() const requires range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
// Effects: Equivalent to:
return sentinel<true> {ranges::end(base_)};
constexpr iterator<true> end() const requires common_range<const V> &&
regular_invocable<const F&, range_reference_t<const V>>;
// Effects: Equivalent to:
return iterator<true> {*this, ranges::end(base_)};
// 26.7.7.3 Class template transform_view::iterator
namespace std::ranges {
template<input_range V, copy_constructible F>
requires view<V> && is_object_v<F> &&
regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
template<bool Const>
class transform_view<V, F>::iterator {
private:
using Parent = maybe-const<Const, transform_view>;
using Base = maybe-const<Const, V>;
iterator_t<Base> current_ = iterator_t<Base>();
Parent* parent_ = nullptr;
public:
using iterator_concept = see_below;
using iterator_category = see_below;
using value_type =
remove_cvref_t<invoke_result_t<F&, range_reference_t<Base>>>;
using difference_type = range_difference_t<Base>;
iterator() requires default_initializable<iterator_t<Base>> = default;
constexpr iterator(Parent& parent, iterator_t<Base> current);
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
constexpr const iterator_t<Base>& base() const & noexcept;
constexpr iterator_t<Base> base() &&;
constexpr decltype(auto) operator*() const noexcept(noexcept(invoke(*parent_->fun_, *current_))) {
return invoke(*parent_->fun_, *current_);
}
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int) requires forward_range<Base >;
constexpr iterator& operator--() requires bidirectional_range<Base>;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
iterator& operator+=(difference_type n) constexpr iterator& operator-=(difference_type n)
requires random_access_range<Base>;
constexpr decltype(auto) operator[](difference_type n) const requires random_access_range<Base> {
return invoke(*parent_->fun_, current_[n]);
}
friend constexpr bool operator==(const iterator& x, const iterator& y)
requires equality_comparable<iterator_t<Base>>;
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
constexpr
requires random_access_range<Base>;
// [range.transform.iterator]
// exposition only // exposition only // exposition only // exposition only
// not always present
// — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
// — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
// — Otherwise, if Base models forward_range, then iterator_concept denotes forward_iterator_tag.
// — Otherwise, iterator_concept denotes input_iterator_tag.
// — If is_lvalue_reference_v<invoke_result_t<F&, range_reference_t<Base >>> is true, then
// — if C models derived_from<contiguous_iterator_tag>, iterator_category denotes random_-
access_iterator_tag;
// — otherwise, iterator_category denotes C.
// — Otherwise, iterator_category denotes input_iterator_tag.
constexpr iterator(Parent& parent, iterator_t<Base> current);
// Effects: Initializes current_ with std::move(current) and parent_ with addressof(parent).
constexpr iterator(iterator<!Const> i)
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> && three_way_comparable<iterator_t<Base>>;
friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
};
}
// iterator::iterator_concept is defined as follows:
// The member typedef-name iterator_category is defined if and only if Base models forward_range. In that case, iterator::iterator_category is defined as follows: Let C denote the type iterator_- traits<iterator_t<Base >>::iterator_category.
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
// Effects: Initializes current_ with std::move(i.current_) and parent_ with i.parent_.
constexpr const iterator_t<Base>& base() const & noexcept;
// Effects: Equivalent to: return current_;
constexpr iterator_t<Base> base() &&;
// Effects: Equivalent to: return std::move(current_);
constexpr iterator& operator++();
// Effects: Equivalent to:
++current_;
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++current_.
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Effects: Equivalent to:
--current_;
return *this;
constexpr iterator operator++(int)
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
requires
forward_range<Base >;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type n) requires random_access_range<Base>;
// Effects: Equivalent to:
current_ += n;
return *this;
constexpr iterator& operator-=(difference_type n)
requires random_access_range<Base>;
// Effects: Equivalent to:
current_ -= n;
return *this;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
// Effects: Equivalent to:
return x.current_ == y.current_;
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return x.current_ < y.current_;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y)
requires random_access_range<Base> && three_way_comparable<iterator_t<Base>>;
// Effects: Equivalent to:
return x.current_ <=> y.current_;
friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
// Effects: Equivalent to:
return iterator{*i.parent_, i.current_ + n};
friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
// Effects: Equivalent to:
return iterator{*i.parent_, i.current_ - n};
friend constexpr difference_type operator-(const iterator& x, const iterator& y)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& y, const iterator<OtherConst>& x);
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
// Effects: Initializes end_ with end.
constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with std::move(i.end_).
constexpr sentinel_t<Base> base() const;
requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
// Effects: Equivalent to:
return x.current_ - y.current_;
// 26.7.7.4 Class template transform_view::sentinel [range.transform.sentinel]
namespace std::ranges {
template<input_range V, copy_constructible F>
requires view<V> && is_object_v<F> &&
regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
template<bool Const>
class transform_view<V, F>::sentinel {
private:
using Parent = maybe-const <Const, transform_view>;
using Base = maybe-const <Const, V>;
sentinel_t<Base > end_ = sentinel_t<Base >();
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end);
constexpr sentinel(sentinel<!Const> i)
// exposition only // exposition only // exposition only
// Effects: Equivalent to:
return end_;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_ == y.end_;
}
}
// — If T is a specialization of ranges::empty_view (26.6.2.2), then ((void) F, decay-copy(E)), except that the evaluations of E and F are indeterminately sequenced.
// — Otherwise, if T models random_access_range and sized_range and is a specialization of span (24.7.3), basic_string_view (23.3), or ranges::subrange (26.5.4), then U(ranges::begin(E), ranges::be- gin(E) + std::min<D>(ranges::distance(E), F)), except that E is evaluated only once, where U is a type determined as follows:
// — if T is a specialization of span, then U is span<typename T::element_type>;
// — otherwise, if T is a specialization of basic_string_view, then U is T;
// — otherwise, T is a specialization of ranges::subrange, and U is ranges::subrange<iterator_- t<T>>;
// — otherwise, if T is a specialization of ranges::iota_view (26.6.4.2) that models random_access_range and sized_range, then ranges::iota_view(*ranges::begin(E), *(ranges::begin(E) + std:: min<D>(ranges::distance(E), F))), except that E is evaluated only once;
// — Otherwise, ranges::take_view(E, F).
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_ - y.end_;
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& y, const iterator<OtherConst>& x);
// Effects: Equivalent to:
return y.end_ - x.current_;
// 26.7.8 Take view [range.take]
// 26.7.8.1 Overview [range.take.overview]
// take_view produces a view of the first N elements from another view, or all the elements if the adapted view contains fewer than N.
// The name views::take denotes a range adaptor object (26.7.2). Let E and F be expressions, let T be remove_- cvref_t<decltype((E))>, and let D be range_difference_t<decltype((E))>. If decltype((F)) does not model convertible_to<D>, views::take(E, F) is ill-formed. Otherwise, the expression views::take(E, F) is expression-equivalent to:
// [Example 1 :
vector<int> is{0,1,2,3,4,5,6,7,8,9};
for (int i : is | views::take(5))
cout << i << ' '; //prints: 01234 —end example]
// 26.7.8.2 Class template take_view [range.take.view]
namespace std::ranges {
template<view V>
class take_view : public view_interface<take_view<V>> {
private:
V base_ = V();
range_difference_t<V> count_ = 0;
}
// 26.7.8.3, class template take_view::sentinel
template<bool> struct sentinel ;
// exposition only // exposition only
// exposition only
public:
take_view() requires default_initializable<V> = default;
constexpr take_view(V base, range_difference_t<V> count);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() requires (!simple-view<V>) {
if constexpr (sized_range<V>) {
if constexpr (random_access_range<V>) {
return ranges::begin(base_);
} else {
auto sz = range_difference_t<V>(size());
return counted_iterator(ranges::begin(base_), sz);
}
} else {
return counted_iterator(ranges::begin(base_), count_);
}
}
constexpr auto begin() const requires range<const V> {
if constexpr (sized_range<const V>) {
if constexpr (random_access_range<const V>) {
return ranges::begin(base_);
} else {
auto sz = range_difference_t<const V>(size());
return counted_iterator(ranges::begin(base_), sz);
}
} else {
return counted_iterator(ranges::begin(base_), count_);
}
}
constexpr auto end() requires (!simple-view<V>) {
if constexpr (sized_range<V>) {
if constexpr (random_access_range<V>)
return ranges::begin(base_) + range_difference_t<V>(size());
else
return default_sentinel;
} else {
return sentinel<false> {ranges::end(base_)};
}
}
constexpr auto end() const requires range<const V> {
if constexpr (sized_range<const V>) {
if constexpr (random_access_range<const V>)
return ranges::begin(base_) + range_difference_t<const V>(size());
else
return default_sentinel;
} else {
return sentinel<true> {ranges::end(base_)};
}
}
constexpr auto size() requires sized_range<V> {
auto n = ranges::size(base_);
return ranges::min(n, static_cast<decltype(n)>(count_));
}
constexpr auto size() const requires sized_range<const V> {
auto n = ranges::size(base_);
return ranges::min(n, static_cast<decltype(n)>(count_));
}
};
template<class R>
take_view(R&&, range_difference_t<R>)
-> take_view<views::all_t<R>>;
}
constexpr take_view(V base, range_difference_t<V> count);
// Effects: Initializes base_ with std::move(base) and count_ with count.
// 26.7.8.3 Class template take_view::sentinel
namespace std::ranges {
template<view V>
template<bool Const>
class take_view<V>::sentinel {
private:
using Base = maybe-const <Const, V>;
template<bool OtherConst>
using CI = counted_iterator<iterator_t<maybe-const <OtherConst, V>>>;
sentinel_t<Base > end_ = sentinel_t<Base >();
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end);
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const;
friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
template<bool OtherConst = !Const>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const CI<OtherConst>& y, const sentinel& x);
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
// Effects: Initializes end_ with end.
constexpr sentinel(sentinel<!Const> s)
// Given a unary predicate pred and a view r, take_while_view produces a view of the range [begin(r), ranges::find_if_not(r, pred)).
// The name views::take_while denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::take_while(E, F) is expression-equivalent to take_while_view(E, F).
// [Example 1 :
auto input = istringstream {"0 1 2 3 4 5 6 7 8 9"};
auto small = [](const auto x) noexcept {
return x < 5;
};
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with std::move(s.end_).
constexpr sentinel_t<Base> base() const;
// Effects: Equivalent to:
return end_;
friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
template<bool OtherConst = !Const>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const CI<OtherConst>& y, const sentinel& x);
// Effects: Equivalent to:
return y.count() == 0 || y.base() == x.end_;
// 26.7.9 Take while view [range.take.while]
// 26.7.9.1 Overview [range.take.while.overview]
// exposition only
// exposition only // exposition only
public:
take_while_view() requires default_initializable<V> && default_initializable<Pred> = default;
constexpr take_while_view(V base, Pred pred);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr const Pred& pred() const;
constexpr auto begin() requires (!simple-view<V>)
{
return ranges::begin(base_);
}
constexpr auto begin() const
requires range<const V> &&
indirect_unary_predicate<const Pred, iterator_t<const V>> {
return ranges::begin(base_);
}
constexpr auto end() requires (!simple-view<V>)
{
return sentinel<false>(ranges::end(base_), addressof(*pred_));
}
constexpr auto end() const
requires range<const V> &&
indirect_unary_predicate<const Pred, iterator_t<const V>> {
return sentinel<true>(ranges::end(base_), addressof(*pred_));
}
};
template<class R, class Pred>
take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
}
constexpr take_while_view(V base, Pred pred);
// Effects: Initializes base_ with std::move(base) and pred_ with std::move(pred).
constexpr const Pred& pred() const;
// Effects: Equivalent to:
return *pred_;
// 26.7.9.3 Class template take_while_view::sentinel [range.take.while.sentinel]
namespace std::ranges {
template<view V, class Pred>
requires input_range<V> && is_object_v<Pred> &&
indirect_unary_predicate<const Pred, iterator_t<V>>
template<bool Const>
auto small_ints = istream_view<int>(input) | views::take_while(small);
for (const auto i : small_ints) {
cout << i << ' ';
}
auto i = 0;
input >> i;
cout << i;
}
// 26.7.9.2 Class template take_while_view [range.take.while.view]
namespace std::ranges {
template<view V, class Pred>
// prints 0 1 2 3 4
// prints 6
requires input_range<V> && is_object_v<Pred> &&
indirect_unary_predicate<const Pred, iterator_t<V>>
class take_while_view : public view_interface<take_while_view<V, Pred>> {
// 26.7.9.3, class template take_while_view::sentinel
template<bool> class sentinel;
V base_ = V();
copyable-box<Pred> pred_;
}
// exposition only
// exposition only // exposition only
// — If T is a specialization of ranges::empty_view (26.6.2.2), then ((void) F, decay-copy(E)), except that the evaluations of E and F are indeterminately sequenced.
// — Otherwise, if T models random_access_range and sized_range and is — a specialization of span (24.7.3),
// — a specialization of basic_string_view (23.3),
// — a specialization of ranges::iota_view (26.6.4.2), or
// — a specialization of ranges::subrange (26.5.4) where T::StoreSize is false,then U(ranges::begin(E) + std::min<D>(ranges::distance(E), F), ranges::end(E)), except that E is evaluated only once, where U is span<typename T::element_type> if T is a specialization of span and T otherwise.
class take_while_view<V, Pred>::sentinel {
using Base = maybe-const<Const, V>;
sentinel_t<Base> end_ = sentinel_t<Base>();
const Pred* pred_ = nullptr;
// exposition only
// exposition only // exposition only
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const {
return end_;
}
friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
template<bool OtherConst = !Const>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator_t<maybe-const<OtherConst, V>>& x, const sentinel& y);
};
}
constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
// Effects: Initializes end_ with end and pred_ with pred.
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with s.end_ and pred_ with s.pred_.
friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
template<bool OtherConst = !Const>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator_t<maybe-const<OtherConst, V>>& x, const sentinel& y);
// drop_view produces a view excluding the first N elements from another view, or an empty range if the adapted view contains fewer than N elements.
// The name views::drop denotes a range adaptor object (26.7.2). Let E and F be expressions, let T be remove_- cvref_t<decltype((E))>, and let D be range_difference_t<decltype((E))>. If decltype((F)) does not model convertible_to<D>, views::drop(E, F) is ill-formed. Otherwise, the expression views::drop(E, F) is expression-equivalent to:
// Effects: Equivalent to:
return y.end_ == x || !invoke(*y.pred_, *x);
// 26.7.10 Drop view [range.drop]
// 26.7.10.1 Overview [range.drop.overview]
// — Otherwise, if T is a specialization of ranges::subrange (26.5.4) that models random_access_range and sized_range, then T(ranges::begin(E) + std::min<D>(ranges::distance(E), F), ranges:: end(E), to-unsigned-like(ranges::distance(E) - std::min<D>(ranges::distance(E), F))), except that E and F are each evaluated only once.
// Preconditions: count >= 0 is true.
// Effects: Initializes base_ with std::move(base) and count_ with count.
// — Otherwise, ranges::drop_view(E, F).
// [Example 1 :
auto ints = views::iota(0) | views::take(10);
for (auto i : ints | views::drop(5)) {
cout << i << ' ';
// 26.7.10.2 Class template drop_view [range.drop.view]
// prints 5 6 7 8 9
}
namespace std::ranges {
template<view V>
class drop_view : public view_interface<drop_view<V>> {
public:
drop_view() requires default_initializable<V> = default;
constexpr drop_view(V base, range_difference_t<V> count);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin()
requires (!(simple-view<V> &&
random_access_range<const V> && sized_range<const V>));
constexpr auto begin() const
requires random_access_range<const V> && sized_range<const V>;
constexpr auto end() requires (!simple-view<V>)
{
return ranges::end(base_);
}
constexpr auto end() const requires range<const V>
{
return ranges::end(base_);
}
constexpr auto size() requires sized_range<V> {
const auto s = ranges::size(base_);
const auto c = static_cast<decltype(s)>(count_);
return s < c ? 0 : s - c;
}
constexpr auto size() const requires sized_range<const V> {
const auto s = ranges::size(base_);
const auto c = static_cast<decltype(s)>(count_);
return s < c ? 0 : s - c;
}
private:
V base_ = V();
range_difference_t<V> count_ = 0;
};
// exposition only // exposition only
template<class R>
drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
}
constexpr drop_view(V base, range_difference_t<V> count);
// Effects: Initializes base_ with std::move(base) and pred_ with std::move(pred).
constexpr auto begin()
requires (!(simple-view<V> &&
random_access_range<const V> && sized_range<const V>));
constexpr auto begin() const
requires random_access_range<const V> && sized_range<const V>;
// Returns: ranges::next(ranges::begin(base_), count_, ranges::end(base_)).
// Remarks: In order to provide the amortized constant-time complexity required by the range concept when drop_view models forward_range, the first overload caches the result within the drop_view for use on subsequent calls.
// [Note 1: Without this, applying a reverse_view over a drop_view would have quadratic iteration complexity.
// Given a unary predicate pred and a view r, drop_while_view produces a view of the range [ranges::find_- if_not(r, pred),ranges::end(r)).
// The name views::drop_while denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::drop_while(E, F) is expression-equivalent to drop_while_view(E, F).
// [Example 1 :
constexpr auto source = " \t \t \t hello there";
auto is_invisible = [](const auto x) {
return x == ' ' || x == '\t';
};
auto skip_ws = views::drop_while(source, is_invisible);
for (auto c : skip_ws) {
// 26.7.11 Drop while view [range.drop.while]
// 26.7.11.1 Overview [range.drop.while.overview]
cout << c;
// 26.7.11.2 Class template drop_while_view [range.drop.while.view]
namespace std::ranges {
template<view V, class Pred>
requires input_range<V> && is_object_v<Pred> &&
indirect_unary_predicate<const Pred, iterator_t<V>>
}
// prints hello there with no leading space
class drop_while_view : public view_interface<drop_while_view<V, Pred>> {
public:
drop_while_view() requires default_initializable<V> && default_initializable<Pred> = default;
constexpr drop_while_view(V base, Pred pred);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr const Pred& pred() const;
constexpr auto begin();
constexpr auto end() {
return ranges::end(base_);
}
private:
V base_ = V();
copyable-box <Pred> pred_;
};
// exposition only // exposition only
template<class R, class Pred>
drop_while_view(R&&, Pred) -> drop_while_view<views::all_t<R>, Pred>;
}
constexpr drop_while_view(V base, Pred pred);
constexpr const Pred& pred() const;
// join_view flattens a view of ranges into a view.
// The name views::join denotes a range adaptor object (26.7.2). Given a subexpression E, the expression views::join(E) is expression-equivalent to join_view<views::all_t<decltype((E))>> {E}.
// [Example 1 :
// Effects: Equivalent to:
return *pred_;
constexpr auto begin();
// Preconditions: pred_.has_value() is true.
// Returns: ranges::find_if_not(base_, cref(*pred_)).
// Remarks: In order to provide the amortized constant-time complexity required by the range concept when drop_while_view models forward_range, the first call caches the result within the drop_while_- view for use on subsequent calls.
// [Note 1: Without this, applying a reverse_view over a drop_while_view would have quadratic iteration complexity. —end note]
// 26.7.12 Join view [range.join]
// 26.7.12.1 Overview [range.join.overview]
vector<string> ss{"hello", " ", "world", "!"};
for (char ch : ss | views::join)
cout << ch;
// 26.7.12.2 Class template join_view [range.join.view]
namespace std::ranges {
template<input_range V>
requires view<V> && input_range<range_reference_t<V>>
class join_view : public view_interface<join_view<V>> {
private:
using InnerRng = range_reference_t<V>;
// 26.7.12.3, class template join_view::iterator
template<bool Const>
struct iterator;
// 26.7.12.4, class template join_view::sentinel
template<bool Const>
struct sentinel;
V base_ = V();
non-propagating-cache<remove_cv_t<InnerRng>> inner_;
public:
join_view() requires default_initializable<V> = default;
constexpr explicit join_view(V base);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() {
constexpr bool use_const = simple-view<V> &&
is_reference_v<range_reference_t<V>>;
return iterator<use_const> {*this, ranges::begin(base_)};
}
// prints: hello world!
// exposition only
// exposition only
// exposition only
// exposition only
// exposition only, present only
// when !is_reference_v<InnerRng >
constexpr auto begin() const
requires input_range<const V> &&
is_reference_v<range_reference_t<const V>>
{
return iterator<true> {*this, ranges::begin(base_)};
}
constexpr auto end() {
if constexpr (forward_range<V> &&
is_reference_v<InnerRng> && forward_range<InnerRng> &&
common_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
else
return sentinel<simple-view<V>> {*this};
}
constexpr auto end() const
requires input_range<const V> &&
is_reference_v<range_reference_t<const V>> {
if constexpr (forward_range<const V> &&
forward_range<range_reference_t<const V>> &&
common_range<const V> &&
common_range<range_reference_t<const V>>)
return iterator<true> {*this, ranges::end(base_)};
else
return sentinel<true> {*this};
}
};
template<class R>
explicit join_view(R&&) -> join_view<views::all_t<R>>;
}
constexpr explicit join_view(V base);
// Effects: Initializes base_ with std::move(base).
// 26.7.12.3 Class template join_view::iterator [range.join.iterator]
namespace std::ranges {
template<input_range V>
requires view<V> && input_range<range_reference_t<V>> template<bool Const>
struct join_view<V>::iterator {
private:
using Parent = maybe-const<Const, join_view>;
using Base = maybe-const<Const, V>;
using OuterIter = iterator_t<Base>;
using InnerIter = iterator_t<range_reference_t<Base>>;
static constexpr bool ref-is-glvalue = is_reference_v<range_reference_t<Base>>;
OuterIter outer_ = OuterIter();
InnerIter inner_ = InnerIter();
Parent* parent_ = nullptr;
// exposition only // exposition only // exposition only // exposition only
// exposition only
// exposition only // exposition only // exposition only
// exposition only
constexpr void satisfy();
public:
using iterator_concept = see below ;
using iterator_category = see_below ;
using value_type = range_value_t<range_reference_t<Base>>;
using difference_type = see_below;
iterator() requires default_initializable<OuterIter> && default_initializable<InnerIter> = default;
// not always present
// — If ref-is-glvalue is true, Base models bidirectional_range, and range_reference_t<Base> models both bidirectional_range and common_range, then iterator_concept denotes bidirectio- nal_iterator_tag.
// — Otherwise, if ref-is-glvalue is true and Base and range_reference_t<Base> each model for- ward_range, then iterator_concept denotes forward_iterator_tag.
// — Otherwise, iterator_concept denotes input_iterator_tag.
// — Let OUTERC denote iterator_traits<iterator_t<Base >>::iterator_category, and let INNERC denote iterator_traits<iterator_t<range_reference_t<Base >>>::iterator_category.
// — If OUTERC and INNERC each model derived_from<bidirectional_iterator_tag> and range_- reference_t<Base > models common_range, iterator_category denotes bidirectional_iterator_- tag.
// — Otherwise, if OUTERC and INNERC each model derived_from<forward_iterator_tag>, iter- ator_category denotes forward_iterator_tag.
constexpr iterator (Parent & parent, OuterIter outer);
constexpr iterator(iterator<!Const> i)
requires Const &&
convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
constexpr decltype(auto) operator*() const {
return *inner_;
} constexpr InnerIter operator->() const
requires has-arrow<InnerIter> && copyable<InnerIter>;
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int)
requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
constexpr iterator& operator--()
requires ref-is-glvalue && bidirectional_range<Base > &&
bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
constexpr iterator operator--(int)
requires ref-is-glvalue && bidirectional_range<Base > &&
bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
equality_comparable<iterator_t<range_reference_t<Base >>>;
friend constexpr decltype(auto) iter_move(const iterator& i) noexcept(noexcept(ranges::iter_move(i.inner_))) {
return ranges::iter_move(i.inner_);
}
friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
requires indirectly_swappable<InnerIter>;
};
}
// iterator::iterator_concept is defined as follows:
// The member typedef-name iterator_category is defined if and only if ref-is-glvalue is true, Base models forward_range, and range_reference_t<Base > models forward_range. In that case, iterator::iter- ator_category is defined as follows:
// — Otherwise, iterator_category denotes input_iterator_tag.
convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
// Effects: Initializes outer_ with std::move(i.outer_), inner_ with std::move(i.inner_), and parent_ with i.parent_.
// iterator::difference_type denotes the type:
common_type_t<
range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
// join_view iterators use the satisfy function to skip over empty inner ranges.
constexpr void satisfy (); // exposition only
// Effects: Equivalent to:
auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
if constexpr (ref-is-glvalue ) // *x is a reference
return *x;
else
return parent_->inner_.emplace-deref(x);
};
for (; outer_ != ranges::end(parent_->base_); ++outer_) {
auto&& inner = update_inner(outer_);
inner_ = ranges::begin(inner);
if (inner_ != ranges::end(inner))
return;
}
if constexpr (ref-is-glvalue) inner_ = InnerIter();
constexpr iterator (Parent & parent, OuterIter
// Effects: Initializes outer_ with std::move(outer) and parent_ with addressof(parent); then calls
satisfy ().
constexpr iterator(iterator<!Const> i) requires Const &&
constexpr InnerIter operator->() const
requires has-arrow<InnerIter> && copyable<InnerIter>;
// Effects: Equivalent to return inner_;
constexpr iterator& operator++(); Let inner-range be:
// — If ref-is-glvalue is true, *outer_.
// — Otherwise, *parent_->inner_.
// Effects: Equivalent to:
auto&& inner_rng = inner-range;
if (++inner_ == ranges::end(inner_rng)) {
++outer_;
satisfy ();
}
return *this;
constexpr void operator++(int);
// Effects: Equivalent to: ++*this.
constexpr iterator operator++(int)
requires ref-is-glvalue && forward_range<Base > &&
forward_range<range_reference_t<Base >>;
// Effects: Equivalent to:
outer);
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--()
requires ref-is-glvalue && bidirectional_range<Base > &&
bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
// Effects: Equivalent to:
if (outer_ == ranges::end(parent_->base_)) inner_ = ranges::end(*--outer_);
while (inner_ == ranges::begin(*outer_)) inner_ = ranges::end(*--outer_);
--inner_;
return *this;
bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
};
}
constexpr explicit sentinel(Parent& parent);
// Effects: Initializes end_ with ranges::end(parent.base_).
constexpr iterator operator--(int)
requires ref-is-glvalue && bidirectional_range<Base > &&
friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
equality_comparable<iterator_t<range_reference_t<Base >>>;
// Effects: Equivalent to: return x.outer_ == y.outer_ && x.inner_ == y.inner_;
friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
requires indirectly_swappable<InnerIter>;
// Effects: Equivalent to:
return ranges::iter_swap(x.inner_, y.inner_);
// 26.7.12.4 Class template join_view::sentinel [range.join.sentinel]
namespace std::ranges {
template<input_range V>
requires view<V> && input_range<range_reference_t<V>> template<bool Const>
struct join_view<V>::sentinel {
private:
using Parent = maybe-const <Const, join_view>;
using Base = maybe-const <Const, V>;
sentinel_t<Base > end_ = sentinel_t<Base >();
public:
sentinel() = default;
constexpr explicit sentinel(Parent& parent);
constexpr sentinel(sentinel<!Const> s)
// exposition only // exposition only // exposition only
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with std::move(s.end_).
// join_with_view takes a view and a delimiter, and flattens the view, inserting every element of the delimiter in between elements of the view. The delimiter can be a single element or a view of elements.
// The name views::join_with denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::join_with(E, F) is expression-equivalent to join_with_view(E, F).
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.outer_ == y.end_;
}
}
// 26.7.13 Join with view [range.join.with]
// 26.7.13.1 Overview [range.join.with.overview]
// [Example 1 :
vector<string> vs = {"the", "quick", "brown", "fox"};
for (char c : vs | join_with('-')) {
cout << c;
}
// The above prints: the-quick-brown-fox —end example]
// 26.7.13.2 Class template join_with_view [range.join.with.view]
namespace std::ranges {
template<class R, class P>
concept compatible-joinable-ranges =
common_with<range_value_t<R>, range_value_t<P>> &&
common_reference_with<range_reference_t<R>, range_reference_t<P>> &&
common_reference_with<range_rvalue_reference_t<R>, range_rvalue_reference_t<P>>;
template<class R>
concept bidirectional-common = bidirectional_range<R> && common_range<R>;
template<input_range V, forward_range Pattern>
requires view<V> && input_range<range_reference_t<V>>
&& view<Pattern>
&& compatible-joinable-ranges<range_reference_t<V>, Pattern>
class join_with_view : public view_interface<join_with_view<V, Pattern>> {
// exposition only
using InnerRng = range_reference_t<V>;
V base_ = V();
non-propagating-cache <remove_cv_t<InnerRng >> inner_;
Pattern pattern_ = Pattern();
// 26.7.13.3, class template join_with_view::iterator
template<bool Const> struct iterator ;
// 26.7.13.4, class template join_with_view::sentinel
template<bool Const> struct sentinel ;
public:
join_with_view()
// exposition only
requires default_initializable<V> && default_initializable<Pattern> = default;
constexpr join_with_view(V base, Pattern pattern);
// exposition only
// exposition only
// exposition only, present only
// when !is_reference_v<InnerRng > // exposition only
// exposition only // exposition only
template<input_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() {
constexpr bool use_const =
simple-view<V> && is_reference_v<InnerRng> && simple-view<Pattern>;
return iterator<use_const> {*this, ranges::begin(base_)};
}
constexpr auto begin() const
requires input_range<const V> &&
forward_range<const Pattern> &&
is_reference_v<range_reference_t<const V>> {
return iterator<true> {*this, ranges::begin(base_)};
}
constexpr auto end() {
if constexpr (forward_range<V> &&
is_reference_v<InnerRng> && forward_range<InnerRng> &&
common_range<V> && common_range<InnerRng>)
return iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::end(base_)};
else
return sentinel<simple-view<V> && simple-view<Pattern>> {*this};
}
constexpr auto end() const
requires input_range<const V> && forward_range<const Pattern> &&
is_reference_v<range_reference_t<const V>> {
using InnerConstRng = range_reference_t<const V>;
if constexpr (forward_range<const V> && forward_range<InnerConstRng> &&
common_range<const V> && common_range<InnerConstRng>) return iterator<true> {*this, ranges::end(base_)};
else
return sentinel<true> {*this};
}
};
template<class R, class P>
join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
template<input_range R>
join_with_view(R&&, range_value_t<range_reference_t<R>>)
-> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
}
constexpr join_with_view(V base, Pattern pattern);
// Effects: Initializes base_ with std::move(base) and pattern_ with std::move(pattern).
template<input_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
// Effects: Initializes base_ with views::all(std::forward<R>(r)) and pattern_ with views::sin- gle(std::move(e)).
// 26.7.13.3 Class template join_with_view::iterator [range.join.with.iterator]
namespace std::ranges {
template<input_range V, forward_range Pattern>
requires view<V> && input_range<range_reference_t<V>>
&& view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
template<bool Const>
class join_with_view<V, Pattern>::iterator {
using Parent = maybe-const <Const, join_with_view>;
using Base = maybe-const <Const, V>;
using InnerBase = range_reference_t<Base>;
// exposition only // exposition only // exposition only // exposition only
// exposition only // exposition only // exposition only
// exposition only
// exposition only // exposition only // exposition only
// exposition only // exposition only // exposition only
// exposition only
// not always present
using PatternBase = maybe-const <Const, Pattern>;
using OuterIter = iterator_t<Base >;
using InnerIter = iterator_t<InnerBase >;
using PatternIter = iterator_t<PatternBase >;
static constexpr bool ref-is-glvalue
= is_reference_v<InnerBase >;
Parent * parent_ = nullptr;
OuterIter outer_it_ = OuterIter ();
variant<PatternIter, InnerIter > inner_it_;
constexpr iterator (Parent & parent, iterator_t<Base > outer);
constexpr auto&& update-inner (const OuterIter &);
constexpr auto&& get-inner (const OuterIter &);
constexpr void satisfy ();
public:
using iterator_concept = see_below;
using iterator_category = see_below ;
using value_type = see_below;
using difference_type = see_below;
iterator() requires default_initializable<OuterIter> = default;
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter> && convertible_to<iterator_t<Pattern>, PatternIter>;
constexpr decltype(auto) operator*() const;
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int)
requires ref-is-glvalue && forward_iterator<OuterIter > && forward_iterator<InnerIter >;
constexpr iterator& operator--()
requires ref-is-glvalue && bidirectional_range<Base > &&
bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
constexpr iterator operator--(int)
requires ref-is-glvalue && bidirectional_range<Base > && bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<OuterIter > &&
equality_comparable<InnerIter >;
friend constexpr decltype(auto) iter_move(const iterator& x) {
using rvalue_reference = common_reference_t<
iter_rvalue_reference_t<InnerIter >,
iter_rvalue_reference_t<PatternIter >>;
return visit<rvalue_reference>(ranges::iter_move, x.inner_it_);
}
friend constexpr void iter_swap(const iterator& x, const iterator& y) requires indirectly_swappable<InnerIter, PatternIter> {
visit(ranges::iter_swap, x.inner_it_, y.inner_it_);
}
// — If ref-is-glvalue is true, Base models bidirectional_range, and InnerBase and PatternBase each model bidirectional-common , then iterator_concept denotes bidirectional_iterator_tag.
// — Otherwise, if ref-is-glvalue is true and Base and InnerBase each model forward_range, then iterator_concept denotes forward_iterator_tag.
// — Otherwise, iterator_concept denotes input_iterator_tag.
// — Let OUTERC denote iterator_traits<OuterIter>::iterator_category, let INNERC denote iterator_traits<InnerIter >::iterator_category, and let PATTERNC denote iterator_- traits<PatternIter >::iterator_category.
// — If is false, iterator_category denotes input_iterator_tag.
// — Otherwise, if OUTERC, INNERC, and PATTERNC each model derived_from<bidirectional_- iterator_category> and InnerBase and PatternBase each model common_range, iterator_cate- gory denotes bidirectional_iterator_tag.
// — Otherwise, if OUTERC, INNERC, and PATTERNC each model derived_from<forward_iterator_- tag>, iterator_category denotes forward_iterator_tag.
};
}
// iterator ::iterator_concept is defined as follows:
// The member typedef-name iterator_category is defined if and only if ref-is-glvalue is true, and Base and InnerBase each model forward_range. In that case, iterator::iterator_category is defined as follows:
is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
// — Otherwise, iterator_category denotes input_iterator_tag.
// iterator ::value_type denotes the type:
common_type_t<iter_value_t<InnerIter>, iter_value_t<PatternIter>>
// iterator ::difference_type denotes the type:
common_type_t< iter_difference_t<OuterIter >, iter_difference_t<InnerIter >, iter_difference_t<PatternIter >>
constexpr auto&& update-inner(const OuterIter& x);
// Effects: Equivalent to:
if constexpr (ref-is-glvalue) return *x;
else
return parent_->inner_.emplace-deref(x);
constexpr auto&& get-inner(const OuterIter& x);
// Effects: Equivalent to:
if constexpr (ref-is-glvalue) return *x;
else
return *parent_->inner_;
constexpr void satisfy();
// Effects: Equivalent to:
while (true) {
if (inner_it_.index() == 0) {
if (std::get<0>(inner_it_) != ranges::end(parent_->pattern_)) break;
auto&& inner = update-inner(outer_it_);
inner_it_.emplace<1>(ranges::begin(inner));
convertible_to<iterator_t<InnerRng>, InnerIter> && convertible_to<iterator_t<Pattern>, PatternIter>;
// Effects: Initializes outer_it_ with std::move(i.outer_it_) and parent_ with i.parent_. Then, equivalent to:
if (i.inner_it_.index() == 0) inner_it_.emplace<0>(std::get<0>(std::move(i.inner_it_)));
else inner_it_.emplace<1>(std::get<1>(std::move(i.inner_it_)));
8
constexpr iterator(Parent& parent, iterator_t<Base> outer);
// Effects: Initializes parent_ with addressof(parent) and outer_it_ with std::move(outer). Then, equivalent to:
if (outer_it_ != ranges::end(parent_->base_)) {
auto&& inner = update-inner(outer_it_);
inner_it_.emplace<1>(ranges::begin(inner));
satisfy();
}
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, OuterIter> &&
} else {
auto&& inner = get-inner(outer_it_);
if (std::get<1>(inner_it_) != ranges::end(inner))
break;
if (++outer_it_ == ranges::end(parent_->base_)) {
if constexpr (ref-is-glvalue) inner_it_.emplace<0>();
break;
}
inner_it_.emplace<0>(ranges::begin(parent_->pattern_));
}
}
// [Note 1: join_with_view iterators use the satisfy function to skip over empty inner ranges.
constexpr decltype(auto) operator*() const;
// Effects: Equivalent to:
using reference =
common_reference_t<iter_reference_t<InnerIter>, iter_reference_t<PatternIter>>;
return visit([](auto& it) -> reference {
return *it;
}, inner_it_);
constexpr iterator& operator++();
// Effects: Equivalent to:
visit([](auto& it) {
++it;
}, inner_it_);
satisfy();
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++*this. constexpr iterator operator++(int)
requires ref-is-glvalue && forward_iterator<OuterIter > &&
// Effects: Equivalent to:
forward_iterator<InnerIter >;
iterator tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--()
requires ref-is-glvalue && bidirectional_range<Base >
&&
bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
// Effects: Equivalent to:
if (outer_it_ == ranges::end(parent_->base_)) {
auto&& inner = *--outer_it_;
inner_it_.emplace<1>(ranges::end(inner));
}
while (true) {
if (inner_it_.index() == 0) {
auto& it = std::get<0>(inner_it_);
if (it == ranges::begin(parent_->pattern_)) {
auto&& inner = *--outer_it_;
inner_it_.emplace<1>(ranges::end(inner));
}
else {
break;
}
} else {
auto& it = std::get<1>(inner_it_);
auto&& inner = *outer_it_;
if (it == ranges::begin(inner)) {
inner_it_.emplace<0>(ranges::end(parent_->pattern_));
}
else {
break;
}
}
}
visit([](auto& it) {
--it;
}, inner_it_);
return *this;
bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
// Effects: Equivalent to:
iterator tmp = *this;
--*this;
return tmp;
constexpr iterator operator--(int)
requires ref-is-glvalue && bidirectional_range<Base > &&
friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<OuterIter > &&
equality_comparable<InnerIter >;
// Effects: Equivalent to:
return x.outer_it_ == y.outer_it_ && x.inner_it_ == y.inner_it_;
// 26.7.13.4 Class template join_with_view::sentinel [range.join.with.sentinel]
namespace std::ranges {
template<input_range V, forward_range Pattern>
requires view<V> && input_range<range_reference_t<V>>
&& view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
template<bool Const>
class join_with_view<V, Pattern>::sentinel {
using Parent = maybe-const <Const, join_with_view>;
using Base = maybe-const <Const, V>;
sentinel_t<Base > end_ = sentinel_t<Base >();
constexpr explicit sentinel (Parent & parent);
public:
sentinel() = default;
constexpr sentinel(sentinel<!Const> s)
// exposition only // exposition only // exposition only
// exposition only
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
template <bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
};
constexpr explicit sentinel(Parent& parent);
// Effects: Initializes end_ with ranges::end(parent.base_).
constexpr sentinel(sentinel<!Const> s)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// lazy_split_view takes a view and a delimiter, and splits the view into subranges on the delimiter. The delimiter can be a single element or a view of elements.
// The name views::lazy_split denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::lazy_split(E, F) is expression-equivalent to lazy_split_view(E, F).
// Effects: Initializes end_ with std::move(s.end_).
template <bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.outer_it_ == y.end_;
// 26.7.14 Lazy split view [range.lazy.split]
// 26.7.14.1 Overview [range.lazy.split.overview]
// [Example 1 :
string str{"the quick brown fox"};
for (auto word : str | views::lazy_split(' ')) {
for (char ch : word)
cout << ch;
cout << '*';
}
// The above prints: the*quick*brown*fox*
// 26.7.14.2 Class template lazy_split_view
namespace std::ranges {
template<auto> struct require-constant;
template<class R> concept tiny-range =
// exposition only // exposition only
sized_range<R> &&
requires { typename require-constant<remove_reference_t<R>::size()>; } && (remove_reference_t<R>::size() <= 1);
template<input_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
(forward_range<V> || tiny-range<Pattern>)
class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
private:
V base_ = V();
Pattern pattern_ = Pattern();
non-propagating-cache<iterator_t<V>> current_;
// 26.7.14.3, class template lazy_split_view::outer-iterator template<bool> struct outer-iterator;
// 26.7.14.5, class template lazy_split_view::inner-iterator template<bool> struct inner-iterator;
// exposition only // exposition only
// exposition only, present only // if !forward_range<V>
// exposition only // exposition only
public:
lazy_split_view()
requires default_initializable<V> && default_initializable<Pattern> = default;
constexpr lazy_split_view(V base, Pattern pattern);
template<input_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<R>>>
constexpr lazy_split_view(R&& r, range_value_t<R> e);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() {
if constexpr (forward_range<V>) {
return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
} else {
current_ = ranges::begin(base_);
return outer-iterator<false> {*this};
}
}
constexpr auto begin() const requires forward_range<V> && forward_range<const V> {
return outer-iterator<true> {*this, ranges::begin(base_)};
}
constexpr auto end() requires forward_range<V> && common_range<V> {
return outer-iterator<simple-view<V> && simple-view<Pattern>>
{*this, ranges::end(base_)};
}
constexpr auto end() const {
if constexpr (forward_range<V> && forward_range<const V> && common_range<const V>)
return outer-iterator<true> {*this, ranges::end(base_)};
else
return default_sentinel;
}
};
template<class R, class P>
lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
template<input_range R>
lazy_split_view(R&&, range_value_t<R>)
-> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
}
constexpr lazy_split_view(V base, Pattern pattern);
// Effects: Initializes base_ with std::move(base), and pattern_ with std::move(pattern).
template<input_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<R>>>
constexpr lazy_split_view(R&& r, range_value_t<R> e);
// Effects: Initializes base_ with views::all(std::forward<R>(r)), and pattern_ with views:: single(std::move(e)).
// 26.7.14.3 Class template lazy_split_view::outer-iterator [range.lazy.split.outer]
namespace std::ranges {
template<input_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
(forward_range<V> || tiny-range<Pattern>) template<bool Const>
struct lazy_split_view<V, Pattern>::outer-iterator {
private:
using Parent = maybe-const<Const, lazy_split_view>;
using Base = maybe-const<Const, V>;
Parent* parent_ = nullptr;
iterator_t<Base> current_ = iterator_t<Base>();
bool trailing_empty_ = false;
public:
using iterator_concept =
// exposition only // exposition only // exposition only
// exposition only, present only // if V models forward_range
// exposition only
conditional_t<forward_range<Base>, forward_iterator_tag, input_iterator_tag>;
using iterator_category = input_iterator_tag; // present only if Base
// models forward_range
// 26.7.14.4, class lazy_split_view::outer-iterator [range.lazy.split.inner]
::value_type struct value_type;
using difference_type = range_difference_t<Base>;
outer-iterator() = default;
constexpr explicit outer-iterator(Parent& parent)
requires (!forward_range<Base>);
constexpr outer-iterator(Parent& parent, iterator_t<Base> current)
requires forward_range<Base>;
constexpr outer-iterator(outer-iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
constexpr value_type operator*() const;
constexpr outer-iterator& operator++();
constexpr decltype(auto) operator++(int) {
if constexpr (forward_range<Base>) {
auto tmp = *this;
++*this;
return tmp;
} else
++*this;
}
friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y)
requires forward_range<Base>;
friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
};
}
// Many of the specifications in 26.7.14 refer to the notional member current of outer-iterator . current is equivalent to current_ if V models forward_range, and *parent_->current_ otherwise.
constexpr explicit outer-iterator(Parent& parent) requires (!forward_range<Base>);
// Effects: Initializes parent_ with addressof(parent).
constexpr outer-iterator(Parent& parent, iterator_t<Base> current)
requires forward_range<Base>;
// Effects: Initializes parent_ with addressof(parent) and current_ with std::move(current).
constexpr outer-iterator(outer-iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
// Effects: Initializes parent_ with i.parent_ and current_ with std::move(i.current_). constexpr value_type operator*() const;
// Effects: Equivalent to:
return x.current_ == y.current_ && x.trailing_empty_ == y.trailing_empty_;
// Effects: Equivalent to: return value_type{*this};
constexpr outer-iterator& operator++();
// Effects: Equivalent to:
const auto end = ranges::end(parent_->base_);
if (current == end) {
trailing_empty_ = false;
return *this;
}
const auto [pbegin, pend] = subrange {
parent_->pattern_
};
if (pbegin == pend) ++current;
else if constexpr (tiny-range<Pattern>) {
current = ranges::find(std::move(current ), if (current != end) {
++current ;
if (current == end)
trailing_empty_ = true;
}
}
else {
end, *pbegin);
do {
auto [b, p] = ranges::mismatch(current, end, pbegin, pend);
if (p == pend) {
current = b;
if (current == end)
trailing_empty_ = true;
break; // The pattern matched; skip it
}
} while (++current != end);
}
return *this;
friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
// Effects: Equivalent to:
return x.current == ranges::end(x.parent_->base_) && !x.trailing_empty_;
// 26.7.14.4 Class lazy_split_view::outer-iterator::value_type [range.lazy.split.outer.value]
namespace std::ranges {
template<input_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
template<bool Const>
struct lazy_split_view<V, Pattern>::outer-iterator<Const>::value_type
: view_interface<value_type> {
private:
outer-iterator i_ = outer-iterator ();
public:
value_type() = default;
constexpr explicit value_type(outer-iterator i);
// exposition only
constexpr inner-iterator<Const> begin() const;
constexpr default_sentinel_t end() const noexcept;
};
}
constexpr explicit value_type(outer-iterator i);
// Effects: Initializes i_ with std::move(i).
constexpr inner-iterator<Const> begin() const;
// Effects: Equivalent to:
return inner-iterator <Const> {i_};
constexpr default_sentinel_t end() const noexcept;
// Effects: Equivalent to:
return default_sentinel;
// 26.7.14.5 Class template lazy_split_view::inner-iterator
namespace std::ranges {
template<input_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
template<bool Const>
struct lazy_split_view<V, Pattern>::inner-iterator {
private:
using Base = maybe-const<Const, V>;
outer-iterator<Const> i_ = outer-iterator<Const>();
bool incremented_ = false;
// exposition only // exposition only // exposition only
public:
using iterator_concept = typename outer-iterator <Const>::iterator_concept;
using iterator_category = see_below; // present only if Base
using value_type = range_value_t<Base>;
using difference_type = range_difference_t<Base>;
// models forward_range
inner-iterator() = default;
constexpr explicit inner-iterator(outer-iterator<Const> i);
constexpr const iterator_t<Base>& base() const & noexcept;
constexpr iterator_t<Base> base() && requires forward_range<V>;
constexpr decltype(auto) operator*() const {
return *i_.current;
}
constexpr inner-iterator& operator++();
constexpr decltype(auto) operator++(int) {
if constexpr (forward_range<Base>) {
auto tmp = *this;
++*this;
return tmp;
} else
++*this;
}
friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y)
requires forward_range<Base>;
friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
friend constexpr decltype(auto) iter_move(const inner-iterator& i) noexcept(noexcept(ranges::iter_move(i.i_.current))) {
return ranges::iter_move(i.i_.current);
}
// — forward_iterator_tag if iterator_traits<iterator_t<Base >>::iterator_category models derived_from<forward_iterator_tag>;
// Effects: Equivalent to: return x.i_.current == y.i_.current ;
friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
// Effects: Equivalent to:
auto [pcur, pend] = subrange {
x.i_.parent_->pattern_
};
auto end = ranges::end(x.i_.parent_->base_);
if constexpr (tiny-range<Pattern>) {
const auto & cur = x.i_.current;
if (cur == end) return true;
if (pcur == pend) return x.incremented_;
return *cur == *pcur;
} else {
auto cur = x.i_.current;
if (cur == end) return true;
if (pcur == pend) return x.incremented_;
do {
if (*cur != *pcur) return false;
if (++pcur == pend) return true;
} while (++cur != end);
return false;
}
friend constexpr void iter_swap(const inner-iterator& x, const inner-iterator& y) noexcept(noexcept(ranges::iter_swap(x.i_.current, y.i_.current)))
requires indirectly_swappable<iterator_t<Base>>;
// Effects: Equivalent to ranges::iter_swap(x.i_.current, y.i_.current).
friend constexpr void iter_swap(const inner-iterator& x, const inner-iterator& y) noexcept(noexcept(ranges::iter_swap(x.i_.current, y.i_.current)))
requires indirectly_swappable<iterator_t<Base>>;
};
}
// If Base does not model forward_range there is no member iterator_category. Otherwise, the typedef- name iterator_category denotes:
// — otherwise, iterator_traits<iterator_t<Base >>::iterator_category. constexpr explicit inner-iterator(outer-iterator<Const> i);
// Effects: Initializes i_ with std::move(i).
constexpr const iterator_t<Base>& base() const & noexcept;
// Effects: Equivalent to: return i_.current ;
constexpr iterator_t<Base> base() && requires forward_range<V>;
// Effects: Equivalent to: return std::move(i_.current );
constexpr inner-iterator& operator++();
// Effects: Equivalent to:
incremented_ = true;
if constexpr (!forward_range<Base>) {
if constexpr (Pattern::size() == 0) {
return *this;
}
}
++i_.current ;
return *this;
friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
// 26.7.15 Split view [range.split]
// 26.7.15.1 Overview [range.split.overview]
// split_view takes a view and a delimiter, and splits the view into subranges on the delimiter. The delimiter can be a single element or a view of elements.
// The name views::split denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::split(E, F) is expression-equivalent to split_view(E, F).
// [Example 1:
string str{"the quick brown fox"};
for (string_view word : split(str, ' ')) {
cout << word << '*';
}
// The above prints: the*quick*brown*fox* —end example]
// 26.7.15.2 Class template split_view [range.split.view]
namespace std::ranges {
template<forward_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
class split_view : public view_interface<split_view<V, Pattern>> {
private:
V base_ = V();
Pattern pattern_ = Pattern();
// 26.7.15.3,
class split_view::iterator struct iterator ;
// 26.7.15.4,
class split_view::sentinel struct sentinel ;
public:
split_view()
// exposition only // exposition only
// exposition only // exposition only
requires default_initializable<V> && default_initializable<Pattern> = default;
constexpr split_view(V base, Pattern pattern);
template<forward_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<R>>>
constexpr split_view(R&& r, range_value_t<R> e);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr iterator begin();
constexpr auto end() {
if constexpr (common_range<V>) {
return iterator{*this, ranges::end(base_), {}};
}
else {
return sentinel{*this};
}
}
constexpr subrange<iterator_t<V>> find-next (iterator_t<V>); // exposition only };
template<class R, class P>
split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
template<forward_range R>
split_view(R&&, range_value_t<R>)
-> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
}
constexpr split_view(V base, Pattern pattern);
// Effects: Initializes base_ with std::move(base), and pattern_ with std::move(pattern).
template<forward_range R>
requires constructible_from<V, views::all_t<R>> &&
constructible_from<Pattern, single_view<range_value_t<R>>>
constexpr split_view(R&& r, range_value_t<R> e);
// Effects: Initializes base_ with views::all(std::forward<R>(r)), and pattern_ with views:: single(std::move(e)).
constexpr iterator begin();
// Returns: {*this, ranges::begin(base_), find-next(ranges::begin(base_))}.
// Remarks: In order to provide the amortized constant time complexity required by the range concept, this function caches the result within the split_view for use on subsequent calls.
constexpr subrange<iterator_t<V>> find-next (iterator_t<V> it); // exposition only
// Effects: Equivalent to:
auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
if (b != ranges::end(base_) && ranges::empty(pattern_)) {
++b;
++e;
}
return {b, e};
// 26.7.15.3 Class split_view::iterator [range.split.iterator]
namespace std::ranges {
template<forward_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
}
class split_view<V, Pattern>::iterator {
private:
split_view* parent_ = nullptr;
iterator_t<V> cur_ = iterator_t<V>();
subrange<iterator_t<V>> next_ = subrange<iterator_t<V>>();
bool trailing_empty_ = false;
public:
using iterator_concept = forward_iterator_tag;
using iterator_category = input_iterator_tag;
using value_type = subrange<iterator_t<V>>;
using difference_type = range_difference_t<V>;
// exposition only // exposition only // exposition only // exposition only
iterator() = default;
constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
constexpr iterator_t<V> base() const;
constexpr value_type operator*() const;
constexpr iterator& operator++();
constexpr iterator operator++(int);
friend constexpr bool operator==(const iterator& x, const iterator& y);
};
constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
// Effects: Initializes parent_ with addressof(parent), cur_ with std::move(current), and next_-
with std::move(next).
constexpr iterator_t<V> base() const;
// Effects: Equivalent to return cur_; constexpr value_type operator*() const;
constexpr iterator operator++(int);
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
friend constexpr bool operator==(const iterator& x, const sentinel& y);
};
}
constexpr explicit sentinel(split_view& parent);
// Effects: Initializes end_ with ranges::end(parent.base_).
friend constexpr bool operator==(const iterator& x, const sentinel& y);
// Effects: Equivalent to return {cur_, next_.begin()};
constexpr iterator& operator++();
// Effects: Equivalent to:
cur_ = next_.begin();
if (cur_ != ranges::end(parent_->base_)) {
cur_ = next_.end();
if (cur_ == ranges::end(parent_->base_)) {
trailing_empty_ = true;
next_ = {cur_, cur_};
}
else {
next_ = parent_->find-next(cur_);
}
} else {
trailing_empty_ = false;
}
return *this;
friend constexpr bool operator==(const iterator& x, const iterator& y);
// Effects: Equivalent to:
return x.cur_ == y.cur_ && x.trailing_empty_ == y.trailing_empty_;
// 26.7.15.4 Class split_view::sentinel [range.split.sentinel]
namespace std::ranges {
template<forward_range V, forward_range Pattern>
requires view<V> && view<Pattern> &&
indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
struct split_view<V, Pattern>::sentinel {
private:
sentinel_t<V> end_ = sentinel_t<V>();
public:
sentinel() = default;
constexpr explicit sentinel(split_view& parent);
// exposition only
// Effects: Equivalent to:
return x.cur_ == y.end_ && !x.trailing_empty_;
}
}
// — views::all(E), if decltype((E)) models common_range and views::all(E) is a well-formed expres- sion.
// — Otherwise, common_view{E}.
// 26.7.16 Counted view [range.counted]
// A counted view presents a view of the elements of the counted range (25.3.1) i + [0, n) for an iterator i and non-negative integer n.
// The name views::counted denotes a customization point object (16.3.3.3.6). Let E and F be expressions, let T be decay_t<decltype((E))>, and let D be iter_difference_t<T>. If decltype((F)) does not model convertible_to<D>, views::counted(E, F) is ill-formed.
// [Note 1: This case can result in substitution failure when views::counted(E, F) appears in the immediate context of a template instantiation.
// Otherwise, views::counted(E, F) is expression-equivalent to:
// — If T models contiguous_iterator, then span(to_address(E), static_cast<size_t>(static_-
// common_view takes a view which has different types for its iterator and sentinel and turns it into a view of the same elements with an iterator and sentinel of the same type.
// [Note 1: common_view is useful for calling legacy algorithms that expect a range’s iterator and sentinel types to be the same.
// The name views::common denotes a range adaptor object (26.7.2). Given a subexpression E, the expression views::common(E) is expression-equivalent to: cast<D>(F))).
// — Otherwise, if T models random_access_iterator, then subrange(E, E + static_cast<D>(F)), except that E is evaluated only once.
// — Otherwise, subrange(counted_iterator(E, F), default_sentinel).
// 26.7.17 Common view [range.common]
// 26.7.17.1 Overview [range.common.overview]
// [Example 1 :
// Legacy algorithm:
template<class ForwardIterator>
size_t count(ForwardIterator first, ForwardIterator last);
template<forward_range R>
void my_algo(R&& r) {
auto&& common = views::common(r);
auto cnt = count(common.begin(), common.end()); // ...
}
// 26.7.17.2 Class template common_view [range.common.view]
namespace std::ranges {
template<view V>
requires (!common_range<V> && copyable<iterator_t<V>>)
class common_view : public view_interface<common_view<V>> {
private:
V base_ = V(); // exposition only public:
common_view() requires default_initializable<V> = default;
constexpr explicit common_view(V r);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
// — If the type of E is a (possibly cv-qualified) specialization of reverse_view, equivalent to E.base().
// — Otherwise, if the type of E is cv subrange<reverse_iterator<I>, reverse_iterator<I>, K> for some iterator type I and value K of type subrange_kind,
// — if K is subrange_kind::sized, equivalent to:
subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
// — otherwise, equivalent to:
subrange<I, I, K>(E.end().base(), E.begin().base())
// However, in either case E is evaluated only once.
// — Otherwise, equivalent to reverse_view{E}.
constexpr auto size() requires sized_range<V> {
return ranges::size(base_);
}
constexpr auto size() const requires sized_range<const V> {
return ranges::size(base_);
}
};
template<class R>
common_view(R&&) -> common_view<views::all_t<R>>;
}
constexpr explicit common_view(V base);
// Effects: Initializes base_ with std::move(base).
// 26.7.18 Reverse view [range.reverse]
// 26.7.18.1 Overview [range.reverse.overview]
constexpr auto begin() {
if constexpr (random_access_range<V> && sized_range<V>)
return ranges::begin(base_);
else
return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
}
constexpr auto begin() const requires range<const V> {
if constexpr (random_access_range<const V> && sized_range<const V>)
return ranges::begin(base_);
else
return common_iterator<iterator_t<const V>, sentinel_t<const V>>(ranges::begin(base_));
}
constexpr auto end() {
if constexpr (random_access_range<V> && sized_range<V>)
return ranges::begin(base_) + ranges::size(base_);
else
return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
}
constexpr auto end() const requires range<const V> {
if constexpr (random_access_range<const V> && sized_range<const V>)
return ranges::begin(base_) + ranges::size(base_);
else
return common_iterator<iterator_t<const V>, sentinel_t<const V>>(ranges::end(base_));
}
// reverse_view takes a bidirectional view and produces another view that iterates the same elements in reverse order.
// The name views::reverse denotes a range adaptor object (26.7.2). Given a subexpression E, the expression views::reverse(E) is expression-equivalent to:
// Effects: Initializes base_ with std::move(base).
// [Example 1 :
vector<int> is {0,1,2,3,4};
for (int i : is | views::reverse)
cout << i << ' '; //prints: 43210
// 26.7.18.2 Class template reverse_view [range.reverse.view]
namespace std::ranges {
template<view V>
requires bidirectional_range<V>
class reverse_view : public view_interface<reverse_view<V>> {
private:
V base_ = V(); // exposition only
public:
reverse_view() requires default_initializable<V> = default;
constexpr explicit reverse_view(V r);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr reverse_iterator<iterator_t<V>> begin();
constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
constexpr auto begin() const requires common_range<const V>;
constexpr reverse_iterator<iterator_t<V>> end();
constexpr auto end() const requires common_range<const V>;
constexpr auto size() requires sized_range<V> {
return ranges::size(base_);
}
constexpr auto size() const requires sized_range<const V> {
return ranges::size(base_);
}
};
template<class R>
reverse_view(R&&) -> reverse_view<views::all_t<R>>;
}
constexpr explicit reverse_view(V base);
constexpr reverse_iterator<iterator_t<V>> begin();
// Returns: make_reverse_iterator(ranges::next(ranges::begin(base_), ranges::end(base_)))
// Remarks: In order to provide the amortized constant time complexity required by the range concept, this function caches the result within the reverse_view for use on subsequent calls.
constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
constexpr auto begin() const requires common_range<const V>;
// Effects: Equivalent to: return make_reverse_iterator(ranges::end(base_)); constexpr reverse_iterator<iterator_t<V>> end();
constexpr auto end() const requires common_range<const V>;
// Effects: Equivalent to: return make_reverse_iterator(ranges::begin(base_));
// 26.7.19 Elements view [range.elements]
// 26.7.19.1 Overview [range.elements.overview]
// elements_view takes a view of tuple-like values and a size_t, and produces a view with a value-type of the Nth element of the adapted view’s value-type.
// The name views::elements<N> denotes a range adaptor object (26.7.2). Given a subexpression E and constant expression N, the expression views::elements<N>(E) is expression-equivalent to elements_- view<views::all_t<decltype((E))>, N>{E}.
// [Example 1:
auto historical_figures = map {
pair{"Lovelace"sv, 1815},
{"Turing"sv, 1912},
{"Babbage"sv, 1791},
{"Hamilton"sv, 1936}
};
auto names = historical_figures | views::elements<0>;
for (auto&& name : names) {
cout << name << ' '; // prints Babbage Hamilton Lovelace Turing }
auto birth_years = historical_figures | views::elements<1>;
for (auto&& born : birth_years) {
cout << born << ' '; // prints 1791 1936 1815 1912 }
// keys_view is an alias for elements_view<R, 0>, and is useful for extracting keys from associative containers.
// [Example 2:
auto names = historical_figures | views::keys;
for (auto&& name : names) {
cout << name << ' '; // prints Babbage Hamilton Lovelace Turing }
// values_view is an alias for elements_view<R, 1>, and is useful for extracting values from associative
containers.
// [Example 3:
auto is_even = [](const auto x) {
return x % 2 == 0;
};
cout << ranges::count_if(historical_figures | views::values, is_even); // prints 2 —end example]
// 26.7.19.2 Class template elements_view [range.elements.view]
namespace std::ranges {
template<class T, size_t N> concept has-tuple-element =
requires(T t) {
typename tuple_size<T>::type;
requires N < tuple_size_v<T>;
typename tuple_element_t<N, T>;
{
std::get<N>(t)
}
-> convertible_to<const tuple_element_t<N, T>&>;
};
template<class T, size_t N>
concept returnable-element = // exposition only
is_reference_v<T> || move_constructible<tuple_element_t<N, T>>;
// exposition only
template<input_range V, size_t N>
requires view<V> && has-tuple-element<range_value_t<V>, N> &&
has-tuple-element<remove_reference_t<range_reference_t<V>>, N> &&
returnable-element<range_reference_t<V>, N>
class elements_view : public view_interface<elements_view<V, N>> {
public:
elements_view() requires default_initializable<V> = default;
constexpr explicit elements_view(V base);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() requires (!simple-view<V>) {
return iterator<false>(ranges::begin(base_));
}
constexpr auto begin() const requires range<const V> {
return iterator<true>(ranges::begin(base_));
}
constexpr auto end() requires (!simple-view<V> && {
return sentinel<false> {ranges::end(base_)};
}
constexpr auto end() requires (!simple-view<V> && {
return iterator<false> {ranges::end(base_)};
}
constexpr auto end() const requires range<const V> {
return sentinel<true> {ranges::end(base_)};
}
!common_range<V>)
common_range<V>)
constexpr auto end() const requires common_range<const V> {
return iterator<true> {ranges::end(base_)};
}
constexpr auto size() requires sized_range<V> {
return ranges::size(base_);
}
constexpr auto size() const requires sized_range<const V> {
return ranges::size(base_);
}
private:
// 26.7.19.3, class template elements_view::iterator [range.elements.iterator]
template<bool> struct iterator ;
// exposition only
// exposition only // exposition only
// 26.7.19.4, class template elements_view::sentinel
template<bool> struct sentinel ;
V base_ = V();
constexpr explicit elements_view(V base);
// Effects: Initializes base_ with std::move(base).
// 26.7.19.3 Class template elements_view::iterator
namespace std::ranges {
template<input_range V, size_t N>
requires view<V> && has-tuple-element<range_value_t<V>, N> && has-tuple-element<remove_reference_t<range_reference_t<V>>, N> && returnable-element<range_reference_t<V>, N>
template<bool Const>
class elements_view<V, N>::iterator {
using Base = maybe-const <Const, V>; // exposition only
iterator_t<Base > current_ = iterator_t<Base >(); // exposition only
static constexpr decltype(auto) get-element (const iterator_t<Base >& i);
};
}
// exposition only
// — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
// — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
using iterator_concept = see_below;
using iterator_category = see_below ; // not always present
value_type = remove_cvref_t<tuple_element_t<N, range_value_t<Base>>>;
difference_type = range_difference_t<Base>;
using iterator() requires default_initializable<iterator_t<Base>> = default;
using constexpr explicit iterator(iterator_t<Base> current);
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
constexpr const iterator_t<Base>& base() const & noexcept;
constexpr iterator_t<Base> base() &&;
constexpr decltype(auto) operator*() const
{
return get-element(current_);
}
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int) requires forward_range<Base >;
iterator& operator--() requires bidirectional_range<Base>;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
requires random_access_range<Base>;
constexpr decltype(auto) operator[](difference_type n) const requires random_access_range<Base>
{ return get-element(current_ + n); }
friend constexpr bool operator==(const iterator& x, const iterator& y)
requires equality_comparable<iterator_t<Base>>;
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> && three_way_comparable<iterator_t<Base>>;
friend constexpr iterator operator+(const iterator& x, difference_type y) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type x, const iterator& y) requires random_access_range<Base>;
friend constexpr iterator operator-(const iterator& x, difference_type y) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
};
}
// The member typedef-name iterator_concept is defined as follows:
constexpr
requires random_access_range<Base>;
// — Otherwise, if Base models forward_range, then iterator_concept denotes forward_iterator_tag.
// — Otherwise, iterator_concept denotes input_iterator_tag.
// — If std::get<N>(*current_) is an rvalue, iterator_category denotes input_iterator_tag.
// — Otherwise, if C models derived_from<random_access_iterator_tag>, iterator_category denotes
// The member typedef-name iterator_category is defined if and only if Base models forward_range. In that case, iterator_category is defined as follows: Let C denote the type iterator_traits<iterator_- t<Base >>::iterator_category.
random_access_iterator_tag.
// — Otherwise, iterator_category denotes C.
static constexpr decltype(auto) get-element (const iterator_t<Base >& i);
// Effects: Equivalent to:
if constexpr (is_reference_v<range_reference_t<Base>>) {
return std::get<N>(*i);
} else {
using E = remove_cv_t<tuple_element_t<N, range_reference_t<Base>>>;
return static_cast<E>(std::get<N>(*i));
}
constexpr explicit iterator(iterator_t<Base> current);
// Effects: Initializes current_ with std::move(current).
constexpr iterator(iterator<!Const> i)
// exposition only
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
// Effects: Initializes current_ with std::move(i.current_).
constexpr const iterator_t<Base>& base() const & noexcept;
// Effects: Equivalent to:
return current_;
constexpr iterator_t<Base> base() &&;
// Effects: Equivalent to:
return std::move(current_);
constexpr iterator& operator++();
// Effects: Equivalent to:
++current_;
return *this;
constexpr void operator++(int);
// Effects: Equivalent to:
++current_.
constexpr iterator operator++(int) requires forward_range<Base >;
// Effects: Equivalent to:
auto temp = *this;
++current_;
return temp;
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Effects: Equivalent to:
--current_;
return *this;
constexpr iterator operator--(int)
// Effects: Equivalent to:
auto temp = *this;
--current_;
return temp;
requires
bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type n);
requires random_access_range<Base>;
// Effects: Equivalent to:
current_ += n;
return *this;
constexpr iterator& operator-=(difference_type n)
requires random_access_range<Base>;
// Effects: Equivalent to:
current_ -= n;
return *this;
friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<Base>;
// Effects: Equivalent to:
return x.current_ == y.current_;
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return x.current_ < y.current_;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y)
requires random_access_range<Base> && three_way_comparable<iterator_t<Base>>;
// Effects: Equivalent to:
return x.current_ <=> y.current_;
friend constexpr iterator operator+(const iterator& x, difference_type y) requires random_access_range<Base>;
// Effects: Equivalent to:
return iterator{x} += y;
friend constexpr iterator operator+(difference_type x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return y + x;
friend constexpr iterator operator-(const iterator& x, difference_type y) requires random_access_range<Base>;
// Effects: Equivalent to:
return iterator{x} -= y;
friend constexpr difference_type operator-(const iterator& x, const iterator& y)
requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
// ffects: Equivalent to:
return x.current_ - y.current_;
// 26.7.19.4 Class template elements_view::sentinel [range.elements.sentinel]
namespace std::ranges {
template<input_range V, size_t N>
requires view<V> && has-tuple-element<range_value_t<V>, N> && has-tuple-element<remove_reference_t<range_reference_t<V>>, N> && returnable-element<range_reference_t<V>, N>
template<bool Const>
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr sentinel_t<Base> base() const;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& x, const iterator<OtherConst>& y);
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
// Effects: Initializes end_ with end.
constexpr sentinel(sentinel<!Const> other)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with std::move(other.end_).
constexpr sentinel_t<Base> base() const;
class elements_view<V, N>::sentinel {
private:
using Base = maybe-const <Const, V>;
sentinel_t<Base > end_ = sentinel_t<Base >();
public:
sentinel() = default;
constexpr explicit sentinel(sentinel_t<Base> end);
constexpr sentinel(sentinel<!Const> other)
// exposition only // exposition only
// Effects: Equivalent to:
return end_;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_ == y.end_;
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_ - y.end_;
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& x, const iterator<OtherConst>& y);
// Effects: Equivalent to:
return x.end_ - y.current_;
// 26.7.20 Zip view [range.zip]
// 26.7.20.1 Overview [range.zip.overview]
// zip_view takes any number of views and produces a view of tuples of references to the corresponding elements of the constituent views.
// The name views::zip denotes a customization point object (16.3.3.3.6). Given a pack of subexpressions Es..., the expression views::zip(Es...) is expression-equivalent to
// — auto(views::empty<tuple<>>) if Es is an empty pack,
// — otherwise, zip_view<views::all_t<decltype((Es))>...>(Es...). [Example 1:
vector v = {1, 2};
list l = {'a', 'b', 'c'};
auto z = views::zip(v, l);
range_reference_t<decltype(z)> f = z.front();
for (auto&& [x, y] : z) {
cout << '(' << x << ", " << y << ") ";
// f is a pair<int&, char&>
// that refers to the first element of v and l
//prints: (1,a)(2,b)
// exposition only
}
// 26.7.20.2 Class template zip_view [range.zip.view]
namespace std::ranges {
template<class... Rs> concept zip-is-common =
(sizeof...(Rs) == 1 && (common_range<Rs> && ...)) ||
(!(bidirectional_range<Rs> && ...) && (common_range<Rs> && ...)) ||
((random_access_range<Rs> && ...) && (sized_range<Rs> && ...));
template<class... Ts>
using tuple-or-pair = see_below ; // exposition only
template<class F, class Tuple>
constexpr auto tuple-transform (F&& f, Tuple&& tuple) { // exposition only
return apply([&]<class... Ts>(Ts&&... elements) {
return tuple-or-pair<invoke_result_t<F&, Ts>...>(
invoke(f, std::forward<Ts>(elements))...
);
}, std::forward<Tuple>(tuple));
}
template<class F, class Tuple>
constexpr void tuple-for-each (F&& f, Tuple&& tuple) { // exposition only
apply([&]<class... Ts>(Ts&&... elements) {
(invoke(f, std::forward<Ts>(elements)), ...);
}, std::forward<Tuple>(tuple));
}
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0)
class zip_view : public view_interface<zip_view<Views...>> {
tuple<Views...> views_; // exposition only
// 26.7.20.3, class template zip_view::iterator template<bool> class iterator; // exposition only
// 26.7.20.4, class template zip_view::sentinel template<bool> class sentinel; // exposition only
public:
zip_view() = default;
constexpr explicit zip_view(Views... views);
constexpr auto begin() requires (!(simple-view<Views> && ...)) {
return iterator<false>(tuple-transform(ranges::begin, views_));
}
constexpr auto begin() const requires (range<const Views> && ...) {
return iterator<true>(tuple-transform(ranges::begin, views_));
// — If sizeof...(Ts) is 2, tuple-or-pair <Ts...> denotes pair<Ts...>.
}
constexpr auto end() requires (!(simple-view<Views> && ...)) {
if constexpr (!zip-is-common<Views...>) {
return sentinel<false>(tuple-transform(ranges::end, views_));
}
else if constexpr ((random_access_range<Views> && ...)) {
return begin() + iter_difference_t<iterator<false>>(size());
}
else {
return iterator<false>(tuple-transform(ranges::end, views_));
}
}
constexpr auto end() const requires (range<const Views> && ...) {
if constexpr (!zip-is-common<const Views...>) {
return sentinel<true>(tuple-transform(ranges::end, views_));
} else if constexpr ((random_access_range<const Views> && ...)) {
return begin() + iter_difference_t<iterator<true>>(size());
}
else {
return iterator<true>(tuple-transform(ranges::end, views_));
}
}
constexpr auto size() requires (sized_range<Views> && ...);
constexpr auto size() const requires (sized_range<const Views> && ...);
};
template<class... Rs>
zip_view(Rs&&...) -> zip_view<views::all_t<Rs>...>;
}
// Given some pack of types Ts, the alias template tuple-or-pair is defined as follows:
// - Otherwise, tuple-or-pair <Ts...> denotes tuple<Ts...>.
// Two zip_view objects have the same underlying sequence if and only if the corresponding elements of views_ are equal (18.2) and have the same underlying sequence.
// [Note 1: In particular, comparison of iterators obtained from zip_view objects that do not have the same underlying sequence is not required to produce meaningful results (25.3.4.11).
constexpr explicit zip_view(Views... views);
// Effects: Initializes views_ with std::move(views).... constexpr auto size() requires (sized_range<Views> && ...);
constexpr auto size() const requires (sized_range<const Views> && ...);
// Effects: Equivalent to:
return apply([](auto... sizes) {
using CT = make-unsigned-like-t<common_type_t<decltype(sizes)...>>;
return ranges::min({CT(sizes)...});
}, tuple-transform(ranges::size, views_));
// 26.7.20.3 Class template zip_view::iterator
namespace std::ranges {
template<bool Const, class... Views>
concept all-random-access = (random_access_range<maybe-const<Const, Views>> && ...);
template<bool Const, class... Views>
concept all-bidirectional = // exposition only
(bidirectional_range<maybe-const<Const, Views>> && ...);
template<bool Const, class... Views>
concept all-forward = // exposition only
(forward_range<maybe-const<Const, Views>> && ...);
// exposition only
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0)
template<bool Const>
class zip_view<Views...>::iterator {
tuple-or-pair <iterator_t<maybe-const<Const, Views>>...> current_;
constexpr explicit iterator(tuple-or-pair<iterator_t<maybe-const<Const, Views>>...>);
public:
// exposition only
usingiterator_category = input_iterator_tag; // not always present
using iterator_concept = see_below ;
using value_type = tuple-or-pair<range_value_t<maybe-const<Const, Views>>...>;
difference_type = common_type_t<range_difference_t<maybe-const<Const, Views>>...>;
using iterator() = default;
constexpr iterator(iterator<!Const> i)
requires Const && (convertible_to<iterator_t<Views>, iterator_t<maybe-const<Const, Views>>> && ...);
constexpr auto operator*() const;
constexpr iterator& operator++();
constexpr void operator++(int);
constexpr iterator operator++(int) requires all-forward <Const, Views...>;
iterator& operator--() requires all-bidirectional<Const, Views...>;
constexpr iterator operator--(int) requires all-bidirectional <Const, Views...>;
constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
requires all-random-access<Const, Views...>;
constexpr auto operator[](difference_type n) const
requires all-random-access<Const, Views...>;
friend constexpr bool operator==(const iterator& x, const iterator& y)
requires (equality_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
friend constexpr bool operator<(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires all-random-access<Const, Views...> &&
(three_way_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
friend constexpr iterator operator+(const iterator& i, difference_type n) requires all-random-access<Const, Views...>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires all-random-access<Const, Views...>;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires all-random-access<Const, Views...>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires (sized_sentinel_for<iterator_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<Const, Views>>> && ...);
friend constexpr auto iter_move(const iterator& i) noexcept(see_below);
friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see_below) requires (indirectly_swappable<iterator_t<maybe-const<Const, Views>>> && ...);
constexpr
requires all-random-access<Const, Views...>;
// exposition only
// — If all-random-access<Const, Views...> is modeled, then iterator_concept denotes random_- access_iterator_tag.
// — Otherwise, if all-bidirectional <Const, Views...> is modeled, then iterator_concept denotes bidirectional_iterator_tag.
// — Otherwise, if all-forward<Const, Views...> is modeled, then iterator_concept denotes for- ward_iterator_tag.
(convertible_to<iterator_t<Views>, iterator_t<maybe-const<Const, Views>>> && ...);
Effects:
Initializes current_ with std::move(i.current_).0
};
}
// iterator ::iterator_concept is defined as follows:
// — Otherwise, iterator_concept denotes input_iterator_tag.
// If the invocation of any non-const member function of iterator exits via an exception, the iterator acquires
a singular value.
constexpr explicit iterator(tuple-or-pair<iterator_t<maybe-const<Const, Views>>...> current);
// Effects: Initializes current_ with std::move(current).
constexpr iterator(iterator<!Const> i) requires Const &&
// iterator ::iterator_category is present if and only if all-forward <Const, Views...> is modeled.
constexpr auto operator*() const;
// Effects: Equivalent to:
return tuple-transform([](auto& i) -> decltype(auto) {
return *i;
}, current_);
constexpr iterator& operator++();
// Effects: Equivalent to:
tuple-for-each([](auto& i) {
++i;
}, current_);
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++*this.
constexpr iterator operator++(int) requires all-forward <Const, Views...>;
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires all-bidirectional<Const, Views...>;
// Effects: Equivalent to:
tuple-for-each([](auto& i) {
--i;
}, current_);
return *this;
constexpr iterator operator--(int) requires all-bidirectional <Const, Views...>;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type x) requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
tuple-for-each([&]<class I>(I& i) {
i += iter_difference_t<I>(x);
}, current_);
return *this;
constexpr iterator& operator-=(difference_type x)
requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
tuple-for-each([&]<class I>(I& i) {
i -= iter_difference_t<I>(x);
}, current_);
return *this;
constexpr auto operator[](difference_type n) const requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
return tuple-transform([&]<class I>(I& i) -> decltype(auto) {
return i[iter_difference_t<I>(n)];
}, current_);
friend constexpr bool operator==(const iterator& x, const iterator& y)
requires (equality_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
// Returns: — x.current_ == y.current_ if all-bidirectional <Const, Views...> is true.
// — Otherwise, true if there exists an integer 0 ≤ i < sizeof...(Views) such that bool(std::
get<i>(x.current_) == std::get<i>(y.current_)) is true.
// [Note 1: This allows zip_view to model common_range when all constituent views model common_range.
// — Otherwise, false.
friend constexpr bool operator<(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
// Returns: x.current_ < y.current_.
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires all-random-access<Const, Views...> &&
(three_way_comparable<iterator_t<maybe-const<Const, Views>>> && ...);
// Returns: x.current_ <=> y.current_.
friend constexpr iterator operator+(const iterator& i, difference_type n) requires all-random-access<Const, Views...>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
auto r = i;
r += n;
return r;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires all-random-access<Const, Views...>;
// Effects: Equivalent to:
iterator_t<maybe-const<Const, Views>>> && ...);
// Let DIST (i) be difference_type(std::get<i>(x.current_) - std::get<i>(y.current_)).
// Returns: The value with the smallest absolute value among DIST(n) for all integers 0 ≤ n < sizeof...(Views).
auto r = i;
r -= n;
return r;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires (sized_sentinel_for<iterator_t<maybe-const<Const, Views>>,
friend constexpr auto iter_move(const iterator& i) noexcept(see_below);
// Effects: Equivalent to:
return tuple-transform(ranges::iter_move, i.current_); Remarks: The exception specification is equivalent to:
(noexcept(ranges::iter_move(declval<const iterator_t<maybe-const<Const, Views>>&>())) && ...) &&
(is_nothrow_move_constructible_v<range_rvalue_reference_t<maybe-const <Const,
Views>>> && ...)
friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see_below) requires (indirectly_swappable<iterator_t<maybe-const<Const, Views>>> && ...);
// Effects: For every integer 0 ≤ i < sizeof...(Views), performs: ranges::iter_swap(std::get<i>(l.current_), std::get<i>(r.current_))
// Remarks: The exception specification is equivalent to the logical AND of the following expressions:
noexcept(ranges::iter_swap(std::get<i>(l.current_), std::get<i>(r.current_)))
// for every integer 0 ≤ i < sizeof...(Views).
// 26.7.20.4 Class template zip_view::sentinel
namespace std::ranges {
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0) template<bool Const>
class zip_view<Views...>::sentinel {
tuple-or-pair <sentinel_t<maybe-const<Const, Views>>...> end_;
constexpr explicit sentinel(tuple-or-pair<sentinel_t<maybe-const<Const, Views>>...> end);
public:
sentinel() = default;
constexpr sentinel(sentinel<!Const> i)
requires Const &&
(convertible_to<sentinel_t<Views>, sentinel_t<maybe-const<Const, Views>>> && ...);
template<bool OtherConst>
requires (sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...)
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires (sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...>
operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires (sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...>
operator-(const sentinel& y, const iterator<OtherConst>& x);
// exposition only // exposition only
// — If Es is an empty pack, let FD be decay_t<decltype((F))>.
// — If copy_constructible<FD> && regular_invocable<FD&> is false, or if decay_t<invoke_-
result_t<FD&>> is not an object type, views::zip_transform(F, Es...) is ill-formed.
// — Otherwise, the expression views::zip_transform(F, Es...) is expression-equivalent to
((void)F, auto(views::empty<decay_t<invoke_result_t<FD&>>>))
// — Otherwise, the expression views::zip_transform(F, Es...) is expression-equivalent to zip_trans- form_view(F, Es...).
}; }
constexpr explicit sentinel(tuple-or-pair<sentinel_t<maybe-const<Const, Views>>...> end); Effects: Initializes end_ with end.
constexpr sentinel(sentinel<!Const> i) requires Const &&
// zip_transform_view takes an invocable object and any number of views and produces a view whose Mth element is the result of applying the invocable object to the Mth elements of all views.
// The name views::zip_transform denotes a customization point object (16.3.3.3.6). Let F be a subexpression, and let Es... be a pack of subexpressions.
(convertible_to<sentinel_t<Views>, sentinel_t<maybe-const<Const, Views>>> && ...);
// Effects: Initializes end_ with std::move(i.end_).
template<bool OtherConst>
requires (sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...)
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Returns: true if there exists an integer 0 ≤ i < sizeof...(Views) such that bool(std::get<i>(x. current_) == std::get<i>(y.end_)) is true. Otherwise, false.
template<bool OtherConst>
requires (sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...>
operator-(const iterator<OtherConst>& x, const sentinel& y);
// Let D be the return type. Let DIST (i) be D(std::get<i>(x.current_) - std::get<i>(y.end_)).
// Returns: The value with the smallest absolute value among DIST(n) for all integers 0 ≤ n < sizeof...(Views).
template<bool OtherConst>
requires (sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
iterator_t<maybe-const<OtherConst, Views>>> && ...) friend constexpr common_type_t<range_difference_t<maybe-const<OtherConst, Views>>...>
operator-(const sentinel& y, const iterator<OtherConst>& x);
// Effects: Equivalent to
return -(x - y);
// 26.7.21 Zip transform view [range.zip.transform]
// 26.7.21.1 Overview [range.zip.transform.overview]
// [Example 1 :
vector v1 = {1, 2};
vector v2 = {4, 5, 6};
for (auto i : views::zip_transform(plus(), v1, v2)) {
cout << i << ' '; //prints: 57
}
// 26.7.21.2 Class template zip_transform_view [range.zip.transform.view]
namespace std::ranges {
template<copy_constructible F, input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> && regular_invocable<F&, range_reference_t<Views>...> && can-reference<invoke_result_t<F&, range_reference_t<Views>...>>
class zip_transform_view : public view_interface<zip_transform_view<F, Views...>> {
copyable-box<F> fun_; zip_view<Views...> zip_;
using InnerView = zip_view<Views...>; template<bool Const>
// exposition only // exposition only
// exposition only
using ziperator = iterator_t<maybe-const<Const, InnerView>>; template<bool Const>
using zentinel = sentinel_t<maybe-const<Const, InnerView>>; // 26.7.21.3, class template zip_transform_view::iterator
template<bool> class iterator; // exposition only // 26.7.21.4, class template zip_transform_view::sentinel
template<bool> class sentinel; // exposition only public:
// exposition only // exposition only
zip_transform_view() = default;
constexpr explicit zip_transform_view(F fun, Views... views);
constexpr auto begin() {
return iterator<false>(*this, zip_.begin());
}
constexpr auto begin() const requires range<const InnerView> &&
regular_invocable<const F&, range_reference_t<const Views>...> {
return iterator<true>(*this, zip_.begin());
}
constexpr auto end() {
if constexpr (common_range<InnerView>) {
return iterator<false>(*this, zip_.end());
}
else {
return sentinel<false>(zip_.end());
}
}
constexpr auto end() const
requires range<const InnerView> &&
regular_invocable<const F&, range_reference_t<const Views>...> { if constexpr (common_range<const InnerView>) {
return iterator<true>(*this, zip_.end());
}
else {
return sentinel<true>(zip_.end());
}
}
constexpr auto size() requires sized_range<InnerView> { return zip_.size();
}
constexpr auto size() const requires sized_range<const InnerView> { return zip_.size();
}
};
template<class F, class... Rs>
zip_transform_view(F, Rs&&...) -> zip_transform_view<F, views::all_t<Rs>...>;
}
constexpr explicit zip_transform_view(F fun, Views... views);
// Effects: Initializes fun_ with std::move(fun) and zip_ with std::move(views)....
// 26.7.21.3 Class template zip_transform_view::iterator [range.zip.transform.iterator]
namespace std::ranges {
template<copy_constructible F, input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> && regular_invocable<F&, range_reference_t<Views>...> && can-reference<invoke_result_t<F&, range_reference_t<Views>...>>
template<bool Const>
class zip_transform_view<F, Views...>::iterator {
using Parent = maybe-const<Const, zip_transform_view>; using Base = maybe-const<Const, InnerView>;
Parent* parent_ = nullptr;
ziperator<Const> inner_;
constexpr iterator(Parent& parent, ziperator<Const> inner);
public:
using iterator_category = see_below;
using iterator_concept = typename ziperator <Const>::iterator_concept; using value_type =
remove_cvref_t<invoke_result_t<maybe-const<Const, F>&, range_reference_t<maybe-const<Const, Views>>...>>;
using difference_type = range_difference_t<Base>;
iterator() = default;
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<ziperator<false>, ziperator<Const>>;
constexpr decltype(auto) operator*() const noexcept(see_below); constexpr iterator& operator++();
constexpr void operator++(int);
constexpr requires random_access_range<Base>;
constexpr friend constexpr bool operator==(const iterator& x, const iterator& y)
constexpr requires equality_comparable<ziperator<Const>>;
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> && three_way_comparable<ziperator<Const>>;
iterator operator++(int) requires forward_range<Base >; iterator& operator--() requires bidirectional_range<Base>;
iterator operator--(int) requires bidirectional_range<Base >;
iterator& operator+=(difference_type x) requires random_access_range<Base>;
iterator& operator-=(difference_type x) requires random_access_range<Base>; constexpr decltype(auto) operator[](difference_type n) const
constexpr
constexpr
// exposition only // exposition only // exposition only // exposition only
// exposition only
// not always present
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<ziperator<Const>, ziperator<Const>>;
}; }
// The member typedef-name iterator ::iterator_category is defined if and only if Base models forward_- range. In that case, iterator ::iterator_category is defined as follows:
// — If invoke_result_t<maybe-const<Const, F>&, range_reference_t<maybe-const<Const, Views>>...> is not an lvalue reference, iterator_category denotes input_iterator_tag.
// — Otherwise, let Cs denote the pack of types iterator_traits<iterator_t<maybe-const<Const, Views>>>::iterator_category....
// — If (derived_from<Cs, random_access_iterator_tag> && ...) is true, iterator_category denotes random_access_iterator_tag.
// — Otherwise, if (derived_from<Cs, bidirectional_iterator_tag> && ...) is true, itera- tor_category denotes bidirectional_iterator_tag.
// — Otherwise, if (derived_from<Cs, forward_iterator_tag> && ...) is true, iterator_cate- gory denotes forward_iterator_tag.
// — Otherwise, iterator_category denotes input_iterator_tag. constexpr iterator(Parent& parent, ziperator<Const> inner);
// Effects: Initializes parent_ with addressof(parent) and inner_ with std::move(inner). constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<ziperator<false>, ziperator<Const>>;
// Effects: Initializes parent_ with i.parent_ and inner_ with std::move(i.inner_).
constexpr decltype(auto) operator*() const noexcept(see_below);
// Effects: Equivalent to:
return apply([&](const auto&... iters) -> decltype(auto) {
return invoke(*parent_->fun_, *iters...);
}, inner_.current_);
// Remarks: Let Is be the pack 0, 1, ..., (sizeof...(Views)-1). The exception specification is equivalent to:
noexcept(invoke(*parent_->fun_, *std::get<Is>(inner_.current_)...)).
constexpr iterator& operator++();
// Effects: Equivalent to:
++inner_; return *this;
constexpr void operator++(int);
// Effects: Equivalent to: ++*this.
constexpr iterator operator++(int)
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
requires
forward_range<Base >;
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Effects: Equivalent to:
--inner_; return *this;
// Let op be the operator.
// Effects: Equivalent to: return x.inner_ op y.inner_;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
// Effects: Equivalent to: inner_ += x;
return *this;
constexpr iterator& operator-=(difference_type x)
requires random_access_range<Base>;
// Effects: Equivalent to:
inner_ -= x; return *this;
constexpr decltype(auto) operator[](difference_type n) const requires random_access_range<Base>;
// Effects: Equivalent to:
return apply([&]<class... Is>(const Is&... iters) -> decltype(auto) {
return invoke(*parent_->fun_, iters[iter_difference_t<Is>(n)]...);
}, inner_.current_);
friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<ziperator<Const>>;
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> && three_way_comparable<ziperator<Const>>;
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
// Effects: Equivalent to: return iterator (*i.parent_, i.inner_ + n); friend constexpr iterator operator-(const iterator& i, difference_type n)
requires random_access_range<Base>;
// Effects: Equivalent to: return iterator (*i.parent_, i.inner_ - n);
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<ziperator<Const>, ziperator<Const>>;
// Effects: Equivalent to: return x.inner_ - y.inner_;
requires Const && convertible_to<zentinel<false>, zentinel<Const>>;
template<bool OtherConst>
requires sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const sentinel& x, const iterator<OtherConst>& y);
};
}
constexpr explicit sentinel(zentinel<Const> inner);
// Effects: Initializes inner_ with inner.
constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<zentinel<false>, zentinel<Const>>;
// 26.7.21.4 Class template zip_transform_view::sentinel [range.zip.transform.sentinel]
namespace std::ranges {
template<copy_constructible F, input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> && regular_invocable<F&, range_reference_t<Views>...> && can-reference<invoke_result_t<F&, range_reference_t<Views>...>>
template<bool Const>
class zip_transform_view<F, Views...>::sentinel {
zentinel<Const> inner_;
constexpr explicit sentinel(zentinel<Const> inner);
public:
sentinel() = default;
constexpr sentinel(sentinel<!Const> i)
// exposition only // exposition only
// Effects: Initializes inner_ with std::move(i.inner_).
template<bool OtherConst>
requires sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.inner_ == y.inner_;
template<bool OtherConst>
requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const sentinel& x, const iterator<OtherConst>& y);
// Effects: Equivalent to: return x.inner_ - y.inner_;
// 26.7.22 Adjacent view [range.adjacent]
// 26.7.22.1 Overview [range.adjacent.overview]
// adjacent_view takes a view and produces a view whose Mth element is a tuple of references to the Mth through (M + N − 1)th elements of the original view. If the original view has fewer than N elements, the resulting view is empty.
// The name views::adjacent<N> denotes a range adaptor object (26.7.2). Given a subexpression E and a constant expression N, the expression views::adjacent<N>(E) is expression-equivalent to
// — ((void)E, auto(views::empty<tuple<>>)) if N is equal to 0,
// — otherwise, adjacent_view<views::all_t<decltype((E))>, N>(E). [Example 1:
vector v = {1, 2, 3, 4};
for (auto i : v | views::adjacent<2>) {
cout << "(" << i.first << ", " << i.second << ") ";
// prints: (1, 2) (2, 3) (3, 4)
// Define REPEAT (T, N) as a pack of N types, each of which denotes the same type as T.
// 26.7.22.2 Class template adjacent_view [range.adjacent.view]
namespace std::ranges {
template<forward_range V, size_t N>
requires view<V> && (N > 0)
class adjacent_view : public view_interface<adjacent_view<V, N>> {
V base_ = V(); // exposition only
// 26.7.22.3, class template adjacent_view::iterator
template<bool> class iterator; // exposition only
// 26.7.22.4, class template adjacent_view::sentinel
template<bool> class sentinel; // exposition only
struct as-sentinel {}; // exposition only
public:
adjacent_view() requires default_initializable<V> = default;
constexpr explicit adjacent_view(V base);
constexpr auto begin() requires (!simple-view<V>) {
return iterator<false>(ranges::begin(base_), ranges::end(base_));
}
constexpr auto begin() const requires range<const V> {
return iterator<true>(ranges::begin(base_), ranges::end(base_));
}
constexpr auto end() requires (!simple-view<V>) {
if constexpr (common_range<V>) {
return iterator<false>(as-sentinel{}, ranges::begin(base_), ranges::end(base_));
}
else {
return sentinel<false>(ranges::end(base_));
}
}
constexpr auto end() const requires range<const V> {
if constexpr (common_range<const V>) {
return iterator<true>(as-sentinel{}, ranges::begin(base_), ranges::end(base_));
}
else {
return sentinel<true>(ranges::end(base_));
}
}
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
};
}
constexpr explicit adjacent_view(V base);
// Effects: Initializes base_ with std::move(base).
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
// Effects: Equivalent to:
using ST = decltype(ranges::size(base_));
using CT = common_type_t<ST, size_t>;
auto sz = static_cast<CT>(ranges::size(base_));
sz -= std::min<CT>(sz, N - 1);
return static_cast<ST>(sz);
// 6.7.22.3 Class template adjacent_view::iterator [range.adjacent.iterator]
namespace std::ranges {
template<forward_range V, size_t N>
requires view<V> && (N > 0) template<bool Const>
class adjacent_view<V, N>::iterator {
using Base = maybe-const<Const, V>;
array<iterator_t<Base>, N> current_ = array<iterator_t<Base>, N>();
constexpr iterator(iterator_t<Base> first, sentinel_t<Base> last);
constexpr iterator(as-sentinel, iterator_t<Base> first, iterator_t<Base> last);
public:
using iterator_category = input_iterator_tag;
using iterator_concept = see_below ;
using value_type = tuple-or-pair<REPEAT(range_value_t<Base>, N)...>;
difference_type = range_difference_t<Base>;
using iterator() = default;
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
constexpr auto operator*() const;
constexpr iterator& operator++();
iterator operator++(int);
constexpr iterator& operator--() requires bidirectional_range<Base>;
iterator operator--(int) requires bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
constexpr requires random_access_range<Base>;
constexpr auto operator[](difference_type n) const
requires random_access_range<Base>;
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y)
requires random_access_range<Base> && three_way_comparable<iterator_t<Base >>;
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
constexpr
requires random_access_range<Base>;
// exposition only
// exposition only // exposition only // exposition only
// — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
// — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
// Postconditions: If Base does not model bidirectional_range, each element of current_ is equal to last . Otherwise, current_[N-1] == last is true, and for every integer 0 ≤ i < (N − 1), current_[i] == ranges::prev(current_[i+1], 1, first) is true.
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
friend constexpr auto iter_move(const iterator& i) noexcept(see_below);
friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see_below)
requires indirectly_swappable<iterator_t<Base>>;
};
}
// iterator ::iterator_concept is defined as follows:
// — Otherwise, iterator_concept denotes forward_iterator_tag. acquires a singular value.
constexpr iterator(iterator_t<Base> first, sentinel_t<Base> last);
// Postconditions: current_[0] == first is true, and for every integer 1 ≤ i < N, current_[i] ==
ranges::next(current_[i-1], 1, last) is true.
constexpr iterator(as-sentinel, iterator_t<Base> first, iterator_t<Base> last);
// If the invocation of any non-const member function of iterator exits via an exception, the iterator
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
// Effects: Initializes each element of current_ with the corresponding element of i.current_ as an xvalue.
constexpr auto operator*() const;
// Effects: Equivalent to:
return tuple-transform([](auto& i) -> decltype(auto) {
return *i;
}, current_);
constexpr iterator& operator++();
// Preconditions: current_.back() is incrementable.
// Postconditions: Each element of current_ is equal to ranges::next(i), where i is the value of that element before the call.
// Returns: *this.
constexpr iterator operator++(int);
// Preconditions: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<Base>;
Preconditions:
current_.front() is decrementable.
// Postconditions: Each element of current_ is equal to ranges::prev(i), where i is the value of that element before the call.
// Returns: *this.
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
constexpr iterator operator--(int)
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
requires
bidirectional_range<Base >;
// Preconditions: current_.back() + x has well-defined behavior.
// Postconditions: Each element of current_ is equal to i + x, where i is the value of that element before the call. Returns:
*this.
constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
// Preconditions: current_.front() - x has well-defined behavior.
// Postconditions: Each element of current_ is equal to i - x, where i is the value of that element before the call. Returns:
*this.
constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
// Effects: Equivalent to:
return tuple-transform([&](auto& i) -> decltype(auto) {
return i[n];
}, current_);
friend constexpr bool operator==(const iterator& x, const iterator& y);
Returns:
x.current_.back() == y.current_.back().
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Returns: x.current_.back() < y.current_.back().
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to: return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to: return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
three_way_comparable<iterator_t<Base >>;
Returns:
x.current_.back() <=> y.current_.back().
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r += n;
return r;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r -= n;
return r;
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& y, const iterator<OtherConst>& x);
};
}
constexpr explicit sentinel(sentinel_t<Base> end);
// Effects: Initializes end_ with end.
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
// Effects: Equivalent to:
return x.current_.back() - y.current_.back();
friend constexpr auto iter_move(const iterator& i) noexcept(see_below);
// Effects: Equivalent to:
return tuple-transform (ranges::iter_move, i.current_);
// Remarks: The exception specification is equivalent to:
noexcept(ranges::iter_move(declval<const iterator_t<Base>&>())) && is_nothrow_move_constructible_v<range_rvalue_reference_t<Base >>
friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see_below) requires indirectly_swappable<iterator_t<Base>>;
// Preconditions: None of the iterators in l.current_ is equal to an iterator in r.current_.
// Effects: For every integer 0 ≤ i < N, performs ranges::iter_swap(l.current_[i], r.current_[i]).
// Remarks: The exception specification is equivalent to:
noexcept(ranges::iter_swap(declval<iterator_t<Base>>(), declval<iterator_t<Base>>()))
// 26.7.22.4 Class template adjacent_view::sentinel [range.adjacent.sentinel]
namespace std::ranges {
template<forward_range V, size_t N>
requires view<V> && (N > 0) template<bool Const>
class adjacent_view<V, N>::sentinel {
using Base = maybe-const <Const, V>;
sentinel_t<Base > end_ = sentinel_t<Base >();
constexpr explicit sentinel (sentinel_t<Base > end);
public:
sentinel() = default;
constexpr sentinel(sentinel<!Const> i)
// exposition only // exposition only // exposition only
// — If N is equal to 0, views::adjacent_transform<N>(E, F) is expression-equivalent to ((void)E, views::zip_transform(F)), except that the evaluations of E and F are indeterminately sequenced.
// — Otherwise, the expression views::adjacent_transform<N>(E, F) is expression-equivalent to adja- cent_transform_view<views::all_t<decltype((E))>, decay_t<decltype((F))>, N>(E, F).
constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes end_ with std::move(i.end_).
// adjacent_transform_view takes an invocable object and a view and produces a view whose Mth element is the result of applying the invocable object to the M th through (M + N − 1)th elements of the original view. If the original view has fewer than N elements, the resulting view is empty.
// The name views::adjacent_transform<N> denotes a range adaptor object (26.7.2). Given subexpressions E and F and a constant expression N:
template<bool OtherConst>
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_.back() == y.end_;
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to:
return x.current_.back() - y.end_;
template<bool OtherConst>
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
friend constexpr range_difference_t<maybe-const<OtherConst, V>> operator-(const sentinel& y, const iterator<OtherConst>& x);
// Effects: Equivalent to:
return y.end_ - x.current_.back();
// 26.7.23 Adjacent transform view [range.adjacent.transform]
// 26.7.23.1 Overview [range.adjacent.transform.overview]
// [Example 1 :
vector v = {1, 2, 3, 4};
for (auto i : v | views::adjacent_transform<2>(std::multiplies())) {
cout << i << ' '; //prints: 2612
}
// 26.7.23.2 Class template adjacent_transform_view [range.adjacent.transform.view]
namespace std::ranges {
template<forward_range V, copy_constructible F, size_t N>
requires view<V> && (N > 0) && is_object_v<F> &&
regular_invocable<F&, REPEAT(range_reference_t<V>, N)...> && can-reference<invoke_result_t<F&, REPEAT(range_reference_t<V>, N)...>>
class adjacent_transform_view : public view_interface<adjacent_transform_view<V, F, N>> {
copyable-box<F> fun_;
adjacent_view<V, N> inner_;
using InnerView = adjacent_view<V, N>;
template<bool Const>
// exposition only // exposition only
// exposition only
using inner-iterator = iterator_t<maybe-const <Const, InnerView >>;
template<bool Const>
using inner-sentinel = sentinel_t<maybe-const <Const, InnerView >>; // 26.7.23.3, class template adjacent_transform_view::iterator
template<bool> class iterator; // exposition only § 26.7.23.2
// exposition only // exposition only
// 26.7.23.4, class template adjacent_transform_view::sentinel template<bool> class sentinel; // exposition only
public:
adjacent_transform_view() = default;
constexpr explicit adjacent_transform_view(V base, F fun);
constexpr auto begin() {
return iterator<false>(*this, inner_.begin());
}
constexpr auto begin() const requires range<const InnerView> &&
regular_invocable<const F&, REPEAT(range_reference_t<const V>, N)...> {
return iterator<true>(*this, inner_.begin());
}
constexpr auto end() {
if constexpr (common_range<InnerView>) {
return iterator<false>(*this, inner_.end());
}
else {
return sentinel<false>(inner_.end());
}
}
constexpr auto end() const
requires range<const InnerView> &&
regular_invocable<const F&, REPEAT(range_reference_t<const V>, N)...> {
if constexpr (common_range<const InnerView>) {
return iterator<true>(*this, inner_.end());
}
else {
return sentinel<true>(inner_.end());
}
}
constexpr auto size() requires sized_range<InnerView> {
return inner_.size();
}
constexpr auto size() const requires sized_range<const InnerView> {
return inner_.size();
}
};
}
constexpr explicit adjacent_transform_view(V base, F fun);
// Effects: Initializes fun_ with std::move(fun) and inner_ with std::move(base).
// 26.7.23.3 Class template adjacent_transform_view::iterator [range.adjacent.transform.iterator]
namespace std::ranges {
template<forward_range V, copy_constructible F, size_t N>
requires view<V> && (N > 0) && is_object_v<F> &&
regular_invocable<F&, REPEAT(range_reference_t<V>, N)...> && can-reference<invoke_result_t<F&, REPEAT(range_reference_t<V>, N)...>>
template<bool Const>
class adjacent_transform_view<F, V...>::iterator {
using Parent = maybe-const<Const, adjacent_transform_view>;
using Base = maybe-const<Const, V>;
Parent* parent_ = nullptr;
inner-iterator<Const> inner_;
constexpr iterator(Parent& parent, inner-iterator<Const> inner);
// exposition only // exposition only // exposition only // exposition only
// exposition only
// N)...> is — Otherwise, let C denote the type iterator_traits<iterator_t<Base >>::iterator_category.
public:
using iterator_category = see_below;
using iterator_concept = typename inner-iterator <Const>::iterator_concept;
using value_type =
remove_cvref_t<invoke_result_t<maybe-const<Const, F>&, REPEAT(range_reference_t<Base>, N)...>>;
using difference_type = range_difference_t<Base>;
iterator() = default;
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<inner-iterator<false>, inner-iterator<Const>>;
constexpr decltype(auto) operator*() const noexcept(see_below);
constexpr iterator& operator++();
constexpr iterator operator++(int);
constexpr iterator& operator--() requires bidirectional_range<Base>;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
iterator& operator-=(difference_type x) requires random_access_range<Base>;
constexpr decltype(auto) operator[](difference_type n) const requires random_access_range<Base>;
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y)
requires random_access_range<Base> && three_way_comparable<inner-iterator<Const>>;
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<inner-iterator<Const>, inner-iterator<Const>>;
};
}
// The member typedef-name iterator ::iterator_category is defined as follows:
// — If invoke_result_t<maybe-const <Const, F>&, REPEAT (range_reference_t<Base >, not an lvalue reference, iterator_category denotes input_iterator_tag.
// — If derived_from<C, random_access_iterator_tag> is true, iterator_category denotes ran- dom_access_iterator_tag.
// — Otherwise, if derived_from<C, bidirectional_iterator_tag> is true, iterator_category denotes bidirectional_iterator_tag.
// — Otherwise, if derived_from<C, forward_iterator_tag> is true, iterator_category denotes forward_iterator_tag.
// — Otherwise, iterator_category denotes input_iterator_tag. constexpr iterator(Parent& parent, inner-iterator<Const> inner);
// Effects: Initializes parent_ with addressof(parent) and inner_ with std::move(inner).
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<inner-iterator<false>, inner-iterator<Const>>;
// Effects: Initializes parent_ with i.parent_ and inner_ with std::move(i.inner_).
constexpr decltype(auto) operator*() const noexcept(see_below);
// Effects: Equivalent to:
return apply([&](const auto&... iters) -> decltype(auto) {
return invoke(*parent_->fun_, *iters...);
}, inner_.current_);
// Remarks: Let Is be the pack 0, 1, ..., (N-1). The exception specification is equivalent to:
noexcept(invoke(*parent_->fun_, *std::get<Is>(inner_.current_)...))
constexpr iterator& operator++();
// Effects: Equivalent to:
++inner_;
return *this;
constexpr iterator operator++(int);
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Effects: Equivalent to:
--inner_;
return *this;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
// Effects: Equivalent to:
inner_ += x;
return *this;
constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
// Effects: Equivalent to:
inner_ -= x;
return *this;
constexpr decltype(auto) operator[](difference_type n) const requires random_access_range<Base>;
// Effects: Equivalent to:
return apply([&](const auto&... iters) -> decltype(auto) {
return invoke(*parent_->fun_, iters[n]...);
}, inner_.current_);
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator<(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y)
requires random_access_range<Base> && three_way_comparable<inner-iterator<Const>>;
// Let op be the operator.
// Effects: Equivalent to:
return x.inner_ op y.inner_;
requires Const && convertible_to<inner-sentinel<false>, inner-sentinel<Const>>;
template<bool OtherConst>
requires sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const sentinel& x, const iterator<OtherConst>& y);
};
}
constexpr explicit sentinel(inner-sentinel<Const> inner);
// Effects: Initializes inner_ with inner.
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
// Effects: Equivalent to: return iterator (*i.parent_, i.inner_ + n); friend constexpr iterator operator-(const iterator& i, difference_type n)
requires random_access_range<Base>;
// Effects: Equivalent to: return iterator (*i.parent_, i.inner_ - n);
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<inner-iterator<Const>, inner-iterator<Const>>;
// Effects: Equivalent to: return x.inner_ - y.inner_;
// 26.7.23.4 Class template adjacent_transform_view::sentinel [range.adjacent.transform.sentinel]
namespace std::ranges {
template<forward_range V, copy_constructible F, size_t N>
requires view<V> && (N > 0) && is_object_v<F> &&
regular_invocable<F&, REPEAT(range_reference_t<V>, N)...> && can-reference<invoke_result_t<F&, REPEAT(range_reference_t<V>, N)...>>
template<bool Const>
class adjacent_transform_view<V, F, N>::sentinel {
inner-sentinel<Const> inner_;
constexpr explicit sentinel(inner-sentinel<Const> inner);
public:
sentinel() = default;
constexpr sentinel(sentinel<!Const> i)
// exposition only // exposition only
constexpr sentinel(sentinel<!Const> i)
requires Const && convertible_to<inner-sentinel<false>, inner-sentinel<Const>>;
// Effects: Initializes inner_ with std::move(i.inner_).
template<bool OtherConst>
requires sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
// Effects: Equivalent to
return x.inner_ == y.inner_;
template<bool OtherConst>
requires sized_sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const iterator<OtherConst>& x, const sentinel& y);
template<bool OtherConst>
requires sized_sentinel_for<inner-sentinel<Const>, inner-iterator<OtherConst>>
friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>> operator-(const sentinel& x, const iterator<OtherConst>& y);
// Effects: Equivalent to
return x.inner_ - y.inner_;
}
// 26.7.24 Chunk view [range.chunk]
// 26.7.24.1 Overview [range.chunk.overview]
// chunk_view takes a view and a number N and produces a range of views that are N-sized non-overlapping successive chunks of the elements of the original view, in order. The last view in the range can have fewer than N elements.
// The name views::chunk denotes a range adaptor object (26.7.2). Given subexpressions E and N, the expression views::chunk(E, N) is expression-equivalent to chunk_view(E, N).
// [Example 1:
vector v = {1, 2, 3, 4, 5};
for (auto r : v | views::chunk(2)) {
cout << '[';
auto sep = "";
for(auto i : r) {
cout << sep << i;
sep = ", ";
}
cout << "] ";
}
// The above prints: [1, 2] [3, 4] [5]
// 26.7.24.2 chunk_view for input ranges [range.chunk.view.input]
namespace std::ranges {
template<class I>
constexpr I div-ceil(I num, I denom) {
// exposition only
I r = num / denom;
if (num % denom)
++r;
return r;
}
template<view V>
requires input_range<V>
class chunk_view : public view_interface<chunk_view<V>> {
V base_ = V();
range_difference_t<V> n_ = 0;
range_difference_t<V> remainder_ = 0;
non-propagating-cache <iterator_t<V>> current_;
}
// exposition only // exposition only // exposition only
// exposition only
// Preconditions: n > 0 is true.
// Effects: Initializes base_ with std::move(base) and n_ with n.
// 26.7.24.3, class chunk_view::outer-iterator class outer-iterator ;
// 26.7.24.5, class chunk_view::inner-iterator class inner-iterator ;
// exposition only
// exposition only
public:
chunk_view() requires default_initializable<V> = default;
constexpr explicit chunk_view(V base, range_difference_t<V> n);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr outer-iterator begin();
constexpr default_sentinel_t end() noexcept;
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
};
template<class R>
chunk_view(R&& r, range_difference_t<R>) -> chunk_view<views::all_t<R>>;
}
constexpr explicit chunk_view(V base, range_difference_t<V> n);
constexpr outer-iterator begin();
// Effects: Equivalent to:
current_ = ranges::begin(base_);
remainder_ = n_;
return outer-iterator(*this);
constexpr default_sentinel_t end() noexcept;
// Returns: default_sentinel.
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
// Effects: Equivalent to:
return to-unsigned-like(div-ceil(ranges::distance(base_), n_));
// 26.7.24.3 Class chunk_view::outer-iterator
namespace std::ranges {
template<view V>
requires input_range<V>
class chunk_view<V>::outer-iterator {
chunk_view* parent_;
constexpr explicit outer-iterator (chunk_view& parent);
public:
using iterator_concept = input_iterator_tag;
using difference_type = range_difference_t<V>;
// 26.7.24.4, class chunk_view::outer-iterator ::value_type [range.chunk.outer.iter]
struct value_type;
outer-iterator(outer-iterator&&) = default;
outer-iterator& operator=(outer-iterator&&) = default;
// exposition only // exposition only
};
}
constexpr explicit outer-iterator(chunk_view& parent);
// Effects: Initializes parent_ with addressof(parent).
constexpr value_type operator*() const;
constexpr value_type operator*() const;
constexpr outer-iterator& operator++();
constexpr void operator++(int);
friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
friend constexpr difference_type operator-(default_sentinel_t y, const outer-iterator& x) requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
friend constexpr difference_type operator-(const outer-iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Preconditions: *this == default_sentinel is false. Returns: value_type(*parent_).
constexpr outer-iterator& operator++();
// Preconditions: *this == default_sentinel is false.
// Effects: Equivalent to:
ranges::advance(*parent_->current_, parent_->remainder_, ranges::end(parent_->base_));
parent_->remainder_ = parent_->n_;
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++*this.
friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
// Effects: Equivalent to:
return *x.parent_->current_ == ranges::end(x.parent_->base_) && x.parent_->remainder_ != 0;
friend constexpr difference_type operator-(default_sentinel_t y, const outer-iterator& x)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Effects: Equivalent to:
const auto dist = ranges::end(x.parent_->base_) - *x.parent_->current_;
if (dist < x.parent_->remainder_) {
return dist == 0 ? 0 : 1;
}
return div-ceil(dist - x.parent_->remainder_, x.parent_->n_) + 1;
friend constexpr difference_type operator-(const outer-iterator& x, default_sentinel_t y)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Effects: Equivalent to: return -(y - x);
// 26.7.24.4 Class chunk_view::outer-iterator::value_type [range.chunk.outer.value]
namespace std::ranges {
template<view V>
requires input_range<V>
struct chunk_view<V>::outer-iterator::value_type : view_interface<value_type> {
private:
chunk_view* parent_;
constexpr explicit value_type(chunk_view& parent);
public:
constexpr inner-iterator begin() const noexcept;
constexpr default_sentinel_t end() const noexcept;
// exposition only // exposition only
constexpr auto size() const
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
};
}
constexpr explicit value_type(chunk_view& parent);
// Effects: Initializes parent_ with addressof(parent). constexpr inner-iterator begin() const noexcept;
// Returns: inner-iterator(*parent_). constexpr default_sentinel_t end() const noexcept;
// Returns: default_sentinel. constexpr auto size() const
friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
friend constexpr difference_type operator-(default_sentinel_t y, const inner-iterator& x) requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
friend constexpr difference_type operator-(const inner-iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
};
}
constexpr explicit inner-iterator(chunk_view& parent) noexcept;
// Effects: Initializes parent_ with addressof(parent).
constexpr const iterator_t<V>& base() const &;
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Effects: Equivalent to:
return ranges::min(parent_->remainder_, ranges::end(parent_->base_) - *parent_->current_);
// 26.7.24.5 Class chunk_view::inner-iterator [range.chunk.inner.iter]
namespace std::ranges {
template<view V>
requires input_range<V>
class chunk_view<V>::inner-iterator {
chunk_view* parent_;
constexpr explicit inner-iterator (chunk_view& parent) noexcept;
public:
using iterator_concept = input_iterator_tag;
using difference_type = range_difference_t<V>;
using value_type = range_value_t<V>;
inner-iterator(inner-iterator&&) = default;
inner-iterator& operator=(inner-iterator&&) = default;
constexpr const iterator_t<V>& base() const &;
constexpr range_reference_t<V> operator*() const;
constexpr inner-iterator& operator++();
constexpr void operator++(int);
// exposition only // exposition only
// Effects: Equivalent to:
return *parent_->current_;
constexpr range_reference_t<V> operator*() const;
// Preconditions: *this == default_sentinel is false.
// Effects: Equivalent to:
return **parent_->current_;
constexpr inner-iterator& operator++();
// Preconditions: *this == default_sentinel is false.
// Effects: Equivalent to:
++*parent_->current_;
if (*parent_->current_ == ranges::end(parent_->base_))
parent_->remainder_ = 0;
else
--parent_->remainder_;
return *this;
constexpr void operator++(int);
// Effects: Equivalent to ++*this.
friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
Returns:
x.parent_->remainder_ == 0.
friend constexpr difference_type operator-(default_sentinel_t y, const inner-iterator& x)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Effects: Equivalent to:
return ranges::min(x.parent_->remainder_,
ranges::end(x.parent_->base_) - *x.parent_->current_);
friend constexpr difference_type operator-(const inner-iterator& x, default_sentinel_t y)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Effects: Equivalent to:
return -(y - x);
}
// 26.7.24.6 chunk_view for forward ranges [range.chunk.view.fwd]
namespace std::ranges {
template<view V>
requires forward_range<V>
class chunk_view<V> : public view_interface<chunk_view<V>> {
V base_ = V(); // exposition only range_difference_t<V> n_ = 0; // exposition only
// 26.7.24.7, class template chunk_view::iterator template<bool> class iterator ; // exposition only
public:
chunk_view() requires default_initializable<V> = default;
constexpr explicit chunk_view(V base, range_difference_t<V> n);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
constexpr auto begin() requires (!simple-view<V>) {
return iterator<false>(this, ranges::begin(base_));
}
constexpr auto begin() const requires forward_range<const V> {
return iterator<true>(this, ranges::begin(base_));
}
constexpr auto end() requires (!simple-view<V>) {
if constexpr (common_range<V> && sized_range<V>) {
auto missing = (n_ - ranges::distance(base_) % n_) % n_;
return iterator<false>(this, ranges::end(base_), missing);
} else if constexpr (common_range<V> && !bidirectional_range<V>) {
return iterator<false>(this, ranges::end(base_));
}
else {
return default_sentinel;
}
// Preconditions: n > 0 is true.
// Effects: Initializes base_ with std::move(base) and n_ with n.
}
constexpr auto end() const requires forward_range<const V> {
if constexpr (common_range<const V> && sized_range<const V>) {
auto missing = (n_ - ranges::distance(base_) % n_) % n_;
return iterator<true>(this, ranges::end(base_), missing);
} else if constexpr (common_range<const V> && !bidirectional_range<const V>) {
return iterator<true>(this, ranges::end(base_));
}
else {
return default_sentinel;
}
}
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
};
}
constexpr explicit chunk_view(V base, range_difference_t<V> n);
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
// Effects: Equivalent to:
return to_unsigned_like(div_ceil(ranges::distance(base_), n_));
// 26.7.24.7 Class template chunk_view<V>::iterator for forward ranges [range.chunk.fwd.iter]
namespace std::ranges {
template<view V>
requires forward_range<V> template<bool Const>
class chunk_view<V>::iterator {
using Parent = maybe_const <Const, chunk_view>;
using Base = maybe_const <Const, V>;
iterator_t<Base > current_ = iterator_t<Base >();
sentinel_t<Base > end_ = sentinel_t<Base >();
range_difference_t<Base > n_ = 0;
range_difference_t<Base > missing_ = 0;
constexpr iterator (Parent * parent, iterator_t<Base > current, range_difference_t<Base> missing = 0);
// exposition only // exposition only
// exposition only // exposition only // exposition only
// exposition only // exposition only
public:
using iterator_category = input_iterator_tag;
using iterator_concept = see_below;
using value_type = decltype(views::take(subrange(current_, end_), n_));
using difference_type = range_difference_t<Base>;
iterator() = default;
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>> && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
constexpr iterator_t<Base> base() const;
constexpr value_type operator*() const;
constexpr iterator& operator++();
constexpr iterator operator++(int);
// — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
// — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
constexpr iterator& operator--() requires bidirectional_range<Base>;
iterator operator--(int) requires bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
requires random_access_range<Base>;
constexpr value_type operator[](difference_type n) const
requires random_access_range<Base>;
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator==(const iterator& x, default_sentinel_t);
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
three_way_comparable<iterator_t<Base >>;
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
friend constexpr difference_type operator-(default_sentinel_t y, const iterator& x) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
constexpr
requires random_access_range<Base>;
};
}
// iterator ::iterator_concept is defined as follows:
// — Otherwise, iterator_concept denotes forward_iterator_tag. constexpr iterator(Parent* parent, iterator_t<Base> current,
range_difference_t<Base> missing = 0);
// Effects: Initializes current_ with current, end_ with ranges::end(parent->base_), n_ with parent
->n_, and missing_ with missing.
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>
&& convertible_to<sentinel_t<V>, sentinel_t<Base>>;
// Effects: Initializes current_ with std::move(i.current_), end_ with std::move(i.end_), n_ with
i.n_, and missing_ with i.missing_. constexpr iterator_t<Base> base() const;
// Returns: current_.
constexpr value_type operator*() const;
// Preconditions: current_ != end_ is true.
// Returns: views::take(subrange(current_, end_), n_).
constexpr iterator& operator++();
// Preconditions: current_ != end_ is true.
// Effects: Equivalent to:
missing_ = ranges::advance(current_, n_, end_);
return *this;
constexpr iterator operator++(int);
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Effects: Equivalent to:
ranges::advance(current_, missing_ - n_);
missing_ = 0;
return *this;
constexpr iterator operator--(int) requires bidirectional_range<Base >;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
// Preconditions: If x is positive, ranges::distance(current_, end_) > n_ * (x - 1) is true. [Note 1: If x is negative, the Effects paragraph implies a precondition. —end note]
// Effects: Equivalent to:
if (x > 0) {
missing_ = ranges::advance(current_, n_ * x, end_);
} else if (x < 0) {
ranges::advance(current_, n_ * x + missing_);
missing_ = 0;
}
return *this;
constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
// Effects: Equivalent to: return *this += -x; constexpr value_type operator[](difference_type n) const
requires random_access_range<Base>;
// Returns: *(*this + n).
friend constexpr bool operator==(const iterator& x, const iterator& y);
// Returns: x.current_ == y.current_.
friend constexpr bool operator==(const iterator& x, default_sentinel_t);
//Returns: x.current_ == x.end_.
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Returns: x.current_ < y.current_.
friend constexpr bool operator>(const iterator& x, const iterator& y)
// slide_view takes a view and a number N and produces a view whose Mth element is a view over the Mth through (M + N − 1)th elements of the original view. If the original view has fewer than N elements, the resulting view is empty.
// The name views::slide denotes a range adaptor object (26.7.2). Given subexpressions E and N, the expression views::slide(E, N) is expression-equivalent to slide_view(E, N).
// [Example 1:
vector v = {1, 2, 3, 4};
requires random_access_range<Base>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
three_way_comparable<iterator_t<Base >>;
// Returns: x.current_ <=> y.current_.
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r += n;
return r;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r -= n;
return r;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
// Returns: (x.current_ - y.current_ + x.missing_ - y.missing_) / x.n_. friend constexpr difference_type operator-(default_sentinel_t y, const iterator& x)
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
// Returns: div-ceil(x.end_ - x.current_, x.n_).
friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
// Effects: Equivalent to:
return -(y - x);
// 26.7.25 Slide view [range.slide]
// 26.7.25.1 Overview [range.slide.overview]
template<class R>
slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
}
constexpr explicit slide_view(V base, range_difference_t<V> n);
// Effects: Initializes base_ with std::move(base) and n_ with n.
constexpr auto begin()
for (auto i : v | views::slide(2)) {
cout << '[' << i[0] << ", " << i[1] << "] ";
}
// 26.7.25.2 Class template slide_view [range.slide.view]
namespace std::ranges {
template<class V>
concept slide-caches-nothing = random_access_range<V> && sized_range<V>;
// exposition only concept slide-caches-last = // exposition only
template<class V>
!slide-caches-nothing<V> && bidirectional_range<V> && common_range<V>;
template<class V>
concept slide-caches-first =
!slide-caches-nothing<V> && !slide-caches-last<V>;
template<forward_range V>
requires view<V>
class slide_view : public view_interface<slide_view<V>> {
V base_ = V(); // exposition only range_difference_t<V> n_ = 0; // exposition only
// 26.7.25.3, class template slide_view::iterator template<bool> class iterator ; // exposition only
// 26.7.25.4, class slide_view::sentinel
class sentinel ; // exposition only
public:
slide_view() requires default_initializable<V> = default;
constexpr explicit slide_view(V base, range_difference_t<V> n);
constexpr auto begin()
requires (!(simple-view<V> && slide-caches-nothing<const V>));
constexpr auto begin() const requires slide-caches-nothing<const V>;
constexpr auto end()
requires (!(simple-view<V> && slide-caches-nothing<const V>));
constexpr auto end() const requires slide-caches-nothing<const V>;
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
};
// exposition only
requires (!(simple-view<V> && slide-caches-nothing<const V>));
// Returns: — If V models slide-caches-first , iterator <false>(ranges::begin(base_),
ranges::next(ranges::begin(base_), n_ - 1, ranges::end(base_)), n_)
// — Otherwise, iterator <false>(ranges::begin(base_), n_).
//prints: [1,2][2,3][3,4]
// Remarks: In order to provide the amortized constant-time complexity required by the range concept, this function caches the result within the slide_view for use on subsequent calls when V models slide-caches-first .
constexpr auto begin() const requires slide-caches-nothing<const V>;
// Returns: iterator<true>(ranges::begin(base_), n_).
constexpr auto end()
requires (!(simple-view<V> && slide-caches-nothing<const V>));
// Returns: — If V models slide-caches-nothing ,
iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
iterator<false>(ranges::prev(ranges::end(base_), n_ - 1, ranges::begin(base_)), n_) — Otherwise, if V models common_range,
iterator<false>(ranges::end(base_), ranges::end(base_), n_) — Otherwise, sentinel (ranges::end(base_)).
// Remarks: In order to provide the amortized constant-time complexity required by the range concept, this function caches the result within the slide_view for use on subsequent calls when V models slide-caches-last .
constexpr auto end() const requires slide-caches-nothing<const V>;
// Returns: begin() + range_difference_t<const V>(size()).
constexpr auto size() requires sized_range<V>;
constexpr auto size() const requires sized_range<const V>;
// Effects: Equivalent to:
auto sz = ranges::distance(base_) - n_ + 1;
if (sz < 0) sz = 0;
return to-unsigned-like(sz);
// 26.7.25.3 Class template slide_view::iterator [range.slide.iterator]
namespace std::ranges {
template<forward_range V>
requires view<V> template<bool Const>
class slide_view<V>::iterator {
using Base = maybe-const <Const, V>;
iterator_t<Base > current_ = iterator_t<Base >();
iterator_t<Base > last_ele_ = iterator_t<Base >();
// present only if Base models slide-caches-first range_difference_t<Base > n_ = 0; // exposition only
constexpr iterator (iterator_t<Base > current, range_difference_t<Base > n) // exposition only requires (!slide-caches-first<Base>);
constexpr iterator (iterator_t<Base > current, iterator_t<Base > last_ele, range_difference_t<Base> n)
requires slide-caches-first<Base>;
public:
using iterator_category = input_iterator_tag;
using iterator_concept = see_below;
using value_type = decltype(views::counted(current_, n_));
using difference_type = range_difference_t<Base>;
iterator() = default;
// exposition only
// exposition only // exposition only // exposition only,
— If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
— Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
constexpr auto operator*() const;
constexpr iterator& operator++();
iterator operator++(int);
constexpr iterator& operator--() requires bidirectional_range<Base>;
iterator operator--(int) requires bidirectional_range<Base >;
constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
constexpr requires random_access_range<Base>;
constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
three_way_comparable<iterator_t<Base >>;
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
};
}
// iterator ::iterator_concept is defined as follows:
constexpr
requires random_access_range<Base>;
// — Otherwise, iterator_concept denotes forward_iterator_tag. acquires a singular value.
constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
// If the invocation of any non-const member function of iterator exits via an exception, the iterator
// Effects: Initializes current_ with current and n_ with n.
constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
requires slide-caches-first<Base>;
// Effects: Initializes current_ with current, last_ele_ with last_ele, and n_ with n.
constexpr iterator(iterator<!Const> i)
requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
// Effects: Initializes current_ with std::move(i.current_) and n_ with i.n_.
// [Note 1 : iterator <true> can only be formed when Base last_ele_ is not present.
// models slide-caches-nothing , in which case
constexpr auto operator*() const;
// Returns: views::counted(current_, n_).
constexpr iterator& operator++();
// Preconditions: current_ and last_ele_ (if present) are incrementable.
// Postconditions: current_ and last_ele_ (if present) are each equal to ranges::next(i), where i is the value of that data member before the call.
// Returns: *this.
constexpr iterator operator++(int);
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<Base>;
// Preconditions: current_ and last_ele_ (if present) are decrementable.
// Postconditions: current_ and last_ele_ (if present) are each equal to ranges::prev(i), where i is the value of that data member before the call.
// Returns: *this.
constexpr iterator operator--(int) requires bidirectional_range<Base >;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
// Preconditions: current_ + x and last_ele_ + x (if last_ele_ is present) have well-defined behavior. Postconditions: current_ and last_ele_ (if present) are each equal to i + x, where i is the value of that data member before the call. Returns: *this.
constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
// Preconditions: current_ - x and last_ele_ - x (if last_ele_ is present) have well-defined behavior. Postconditions: current_ and last_ele_ (if present) are each equal to i - x, where i is the value of that data member before the call. Returns: *this.
constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
// Effects: Equivalent to: return views::counted(current_ + n, n_); friend constexpr bool operator==(const iterator& x, const iterator& y);
// Returns: If last_ele_ is present, x.last_ele_ == y.last_ele_; otherwise, x.current_ == y.cur- rent_.
friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Returns: x.current_ < y.current_.
friend constexpr bool operator>(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return y < x;
friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
// Effects: Equivalent to:
return !(y < x);
friend constexpr bool operator>=(const iterator& x, const iterator& y)
requires random_access_range<Base>;
// Effects: Equivalent to:
return !(x < y);
friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
three_way_comparable<iterator_t<Base >>;
// Returns: x.current_ <=> y.current_.
friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r += n;
return r;
friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
// Effects: Equivalent to:
auto r = i;
r -= n;
return r;
friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
// Returns: If last_ele_ is present, x.last_ele_ - y.last_ele_; otherwise, x.current_ - y.cur- rent_.
// 26.7.25.4 Class slide_view::sentinel [range.slide.sentinel]
namespace std::ranges {
template<forward_range V>
requires view<V>
class slide_view<V>::sentinel {
sentinel_t<V> end_ = sentinel_t<V>();
constexpr explicit sentinel (sentinel_t<V> end);
public:
sentinel() = default;
friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
friend constexpr range_difference_t<V>
operator-(const iterator<false>& x, const sentinel& y)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// exposition only // exposition only
// Returns: x.last_ele_ == y.end_.
friend constexpr range_difference_t<V>
operator-(const sentinel& y, const iterator<false>& x)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
};
}
// [Note 1 : sentinel is used only when slide-caches-first <V> is true.
constexpr explicit sentinel(sentinel_t<V> end);
// Effects: Initializes end_ with end.
friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
friend constexpr range_difference_t<V>
operator-(const iterator<false>& x, const sentinel& y)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Returns: x.last_ele_ - y.end_.
friend constexpr range_difference_t<V>
operator-(const sentinel& y, const iterator<false>& x)
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
// Returns: y.end_ - x.last_ele_.
// 26.7.26 Chunk by view [range.chunk.by]
// 26.7.26.1 Overview [range.chunk.by.overview]
// chunk_by_view takes a view and a predicate, and splits the view into subranges between each pair of
adjacent elements for which the predicate returns false.
// The name views::chunk_by denotes a range adaptor object (26.7.2). Given subexpressions E and F, the expression views::chunk_by(E, F) is expression-equivalent to chunk_by_view(E, F). [Example 1:
vector v = {1, 2, 2, 3, 0, 4, 5, 2};
for (auto r : v | views::chunk_by(ranges::less_equal {})) {
cout << '[';
auto sep = "";
for(auto i : r) {
cout << sep << i;
sep = ", ";
}
cout << "] ";
}
// The above prints: [1, 2, 2, 3] [0, 4, 5] [2]
// 26.7.26.2 Class template chunk_by_view [range.chunk.by.view]
namespace std::ranges {
template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred>
class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
V base_ = V(); // exposition only copyable-box <Pred> pred_ = Pred(); // exposition only
// 26.7.26.3, class chunk_by_view::iterator
class iterator ; // exposition only
public:
chunk_by_view() requires default_initializable<V> && default_initializable<Pred> = default;
constexpr explicit chunk_by_view(V base, Pred pred);
constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
// Effects: Initializes base_ with std::move(base) and pred_ with std::move(pred). constexpr const Pred& pred() const;
constexpr const Pred& pred() const;
constexpr iterator begin();
constexpr auto end();
constexpr iterator_t<V> find-next (iterator_t<V>);
constexpr iterator_t<V> find-prev (iterator_t<V>)
requires bidirectional_range<V>;
};
template<class R, class Pred>
chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
}
constexpr explicit chunk_by_view(V base, Pred pred);
// exposition only // exposition only
// Effects: Equivalent to:
return *pred_;
constexpr iterator begin();
// Preconditions: pred_.has_value() is true.
// Returns: iterator(*this, ranges::begin(base_), find-next(ranges::begin(base_))).
// Remarks: In order to provide the amortized constant-time complexity required by the range concept, this function caches the result within the chunk_by_view for use on subsequent calls.
constexpr auto end();
// Effects: Equivalent to:
if constexpr (common_range<V>) {
return iterator(*this, ranges::end(base_), ranges::end(base_));
} else {
return default_sentinel;
}
constexpr iterator_t<V> find-next(iterator_t<V> current);
// Preconditions: pred_.has_value() is true.
// Returns:
ranges::next(ranges::adjacent_find(current, ranges::end(base_), not_fn(ref(*pred_))), 1, ranges::end(base_))
constexpr iterator_t<V> find-prev(iterator_t<V> current) requires bidirectional_range<V>;
}
//Preconditions:
// — current is not equal to ranges::begin(base_).
// — pred_.has_value() is true.
// Returns: An iterator i in the range [ranges::begin(base_), current) such that:
// — ranges::adjacent_find(i, current, not_fn(ref(*pred_))) is equal to current; and
// — if i is not equal to ranges::begin(base_), then bool(invoke(*pred_, *ranges::prev(i), *i)) is false.
// 26.7.26.3 Class chunk_by_view::iterator [range.chunk.by.iter]
namespace std::ranges {
template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred> class chunk_by_view<V, Pred>::iterator {
chunk_by_view* parent_ = nullptr;
iterator_t<V> current_ = iterator_t<V>();
iterator_t<V> next_ = iterator_t<V>();
// exposition only // exposition only // exposition only
// — If V models bidirectional_range, then iterator_concept denotes bidirectional_iterator_tag. — Otherwise, iterator_concept denotes forward_iterator_tag.
constexpr iterator (chunk_by_view& parent, iterator_t<V> current, iterator_t<V> next);
public:
using value_type = subrange<iterator_t<V>>;
using difference_type = range_difference_t<V>;
using iterator_category = input_iterator_tag;
using iterator_concept = see_below;
iterator() = default;
constexpr value_type operator*() const;
constexpr iterator& operator++();
constexpr iterator operator++(int);
constexpr iterator& operator--() requires bidirectional_range<V>;
constexpr iterator operator--(int) requires bidirectional_range<V>;
// exposition only
friend constexpr bool operator==(const iterator& x, const iterator& y);
friend constexpr bool operator==(const iterator& x, default_sentinel_t);
};
}
// iterator ::iterator_concept is defined as follows:
constexpr iterator(chunk_by_view& parent, iterator_t<V> current, iterator_t<V> next);
// Effects: Initializes parent_ with addressof(parent), current_ with current, and next_ with next.
constexpr value_type operator*() const;
// Preconditions: current_ is not equal to next_. Returns: subrange(current_, next_).
constexpr iterator& operator++();
// Preconditions: current_ is not equal to next_.
// Effects: Equivalent to:
current_ = next_;
next_ = parent_->find-next(current_);
return *this;
constexpr iterator operator++(int);
// Effects: Equivalent to:
auto tmp = *this;
++*this;
return tmp;
constexpr iterator& operator--() requires bidirectional_range<V>;
// Effects: Equivalent to:
next_ = current_;
current_ = parent_->find-prev(next_);
return *this;
constexpr iterator operator--(int) requires bidirectional_range<V>;
// Effects: Equivalent to:
auto tmp = *this;
--*this;
return tmp;
friend constexpr bool operator==(const iterator& x, const iterator& y);
// Returns: x.current_ == y.current_.
friend constexpr bool operator==(const iterator& x, default_sentinel_t);
// Returns: x.current_ == x.next_.
int main() {
cout << n4910 << endl;
return EXIT_SUCCESS;
}
編纂・実行結果(compile and go)
$ clang++ p1059.cpp -std=03 -o p1059l -I. -Wall
In file included from p1059.cpp:10:
In file included from ./N4910.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/atomic:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^
p1059.cpp:19:17: error: expected ';' after top level declarator
vector<int> ints{0,1,2,3,4,5};
^
;
p1059.cpp:20:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto even = [](int i) {
^
p1059.cpp:20:13: error: expected expression
auto even = [](int i) {
^
p1059.cpp:23:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto square = [](int i) {
^
p1059.cpp:23:15: error: expected expression
auto square = [](int i) {
^
p1059.cpp:26:1: error: expected unqualified-id
for (int i : ints | views::filter(even) | views::transform(square)) {
^
p1059.cpp:43:1: error: unknown type name 'constexpr'
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
^
p1059.cpp:43:19: error: expected ';' after top level declarator
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
^
;
p1059.cpp:62:75: error: unexpected character <U+2014>
constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
^~
p1059.cpp:82:1: error: expected unqualified-id
return *this;
^
p1059.cpp:83:1: error: extraneous closing brace ('}')
}
^
p1059.cpp:85:1: error: unknown type name 'constexpr'
constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
^
p1059.cpp:85:14: error: expected ';' after top level declarator
constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
^
;
p1059.cpp:106:14: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
namespace std::ranges {
^~~~~~~~
{ namespace ranges
p1059.cpp:107:10: error: unknown type name 'range'
template<range R>
^
p1059.cpp:108:1: error: unknown type name 'requires'
requires is_object_v<R>
^
p1059.cpp:108:10: error: no variable template matches partial specialization
requires is_object_v<R>
^
p1059.cpp:108:24: error: expected ';' at end of declaration
requires is_object_v<R>
^
;
p1059.cpp:109:48: error: expected '>'
class ref_view : public view_interface<ref_view<R>> {
^
p1059.cpp:109:39: note: to match this '<'
class ref_view : public view_interface<ref_view<R>> {
^
p1059.cpp:111:5: error: unknown type name 'R'
R* r_; // exposition only public:
^
p1059.cpp:112:14: error: unknown type name 'different'
template<different-from<ref_view> T> requires see_below
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
$ clang++ p1059.cpp -std=2b -o p1059l -I. -Wall
p1059.cpp:26:1: error: expected unqualified-id
for (int i : ints | views::filter(even) | views::transform(square)) {
^
p1059.cpp:43:11: error: C++ requires a type specifier for all declarations
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
~~~~~~~~~ ^
p1059.cpp:43:11: error: template specialization requires 'template<>'
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
^
template<>
p1059.cpp:43:11: error: no variable template matches specialization
p1059.cpp:43:19: error: expected ';' after top level declarator
constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
^
;
p1059.cpp:62:75: error: unexpected character <U+2014>
constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
^~
p1059.cpp:82:1: error: expected unqualified-id
return *this;
^
p1059.cpp:83:1: error: extraneous closing brace ('}')
}
^
p1059.cpp:85:11: error: unknown type name 'non'
constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
^
p1059.cpp:85:14: error: expected unqualified-id
constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
^
p1059.cpp:91:11: error: unknown type name 'T'
constexpr T& emplace-deref (const I& i); // exposition only
^
p1059.cpp:91:14: error: declaration of reference variable 'emplace' requires an initializer
constexpr T& emplace-deref (const I& i); // exposition only
^~~~~~~
p1059.cpp:91:21: error: expected ';' after top level declarator
constexpr T& emplace-deref (const I& i); // exposition only
^
;
p1059.cpp:109:7: error: redefinition of 'ref_view'
class ref_view : public view_interface<ref_view<R>> {
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1223:11: note: previous definition is here
class ref_view : public view_interface<ref_view<_Range>>
^
p1059.cpp:133:2: error: expected ';' after class
}
^
;
p1059.cpp:136:10: error: unknown type name 'R'
void FUN(R&);
^
p1059.cpp:137:10: error: unknown type name 'R'
void FUN(R&&) = delete;
^
p1059.cpp:139:16: error: use of undeclared identifier 'T'
convertible_to<T, R&> && requires { FUN(declval<T>()); }
^
p1059.cpp:140:55: error: use of undeclared identifier 'R'
constexpr auto data() const requires contiguous_range<R>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
$ g++ p1059.cpp -std=03 -o p1059g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
from N4910.h:11,
from p1059.cpp:10:
/usr/local/include/c++/12.1.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
32 | #error This file requires compiler and library support \
| ^~~~~
p1059.cpp:43:1: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
43 | constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
| ^~~~~~~~~
p1059.cpp:43:26: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
43 | constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
| ^~~~~~~~
p1059.cpp:62:75: error: extended character — is not valid in an identifier
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^
p1059.cpp:254:28: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++11-compat]
254 | filter_view* parent_ = nullptr;
| ^~~~~~~
p1059.cpp:450:15: warning: identifier 'decltype' is a keyword in C++11 [-Wc++11-compat]
450 | constexpr decltype(auto) operator*() const noexcept(noexcept(invoke(*parent_->fun_, *current_))) {
| ^~~~~~~~
p1059.cpp:3609:9: error: extended character is not valid in an identifier
3609 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^
p1059.cpp:3611:9: error: extended character is not valid in an identifier
3611 | constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
| ^
p1059.cpp:3775:79: error: extended character — is not valid in an identifier
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ^
p1059.cpp:3776:89: error: extended character — is not valid in an identifier
3776 | iterator<false>(ranges::prev(ranges::end(base_), n_ - 1, ranges::begin(base_)), n_) — Otherwise, if V models common_range,
| ^
p1059.cpp:3777:69: error: extended character — is not valid in an identifier
3777 | iterator<false>(ranges::end(base_), ranges::end(base_), n_) — Otherwise, sentinel (ranges::end(base_)).
| ^
p1059.cpp:3807:21: error: extended character — is not valid in an identifier
3807 | — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
| ^
p1059.cpp:3808:21: error: extended character — is not valid in an identifier
3808 | — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
| ^
p1059.cpp:3812:21: error: extended character is not valid in an identifier
3812 | constexpr iterator& operator++();
| ^
p1059.cpp:3814:21: error: extended character is not valid in an identifier
3814 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^
p1059.cpp:3816:21: error: extended character is not valid in an identifier
3816 | constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
| ^
p1059.cpp:3817:21: error: extended character is not valid in an identifier
3817 | constexpr requires random_access_range<Base>;
| ^
p1059.cpp:3818:66: error: extended character is not valid in an identifier
3818 | constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
| ^
p1059.cpp:19:17: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
19 | vector<int> ints{0,1,2,3,4,5};
| ^
p1059.cpp:19:13: error: in C++98 'ints' must be initialized by constructor, not by '{...}'
19 | vector<int> ints{0,1,2,3,4,5};
| ^~~~
p1059.cpp:19:29: error: no matching function for call to 'std::vector<int>::vector(<brace-enclosed initializer list>)'
19 | vector<int> ints{0,1,2,3,4,5};
| ^
In file included from /usr/local/include/c++/12.1.0/vector:64,
from N4910.h:8:
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: candidate: 'template<class _InputIterator> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>]'
711 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: template argument deduction/substitution failed:
p1059.cpp:19:29: note: candidate expects 3 arguments, 6 provided
19 | vector<int> ints{0,1,2,3,4,5};
| ^
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
596 | vector(const vector& __x)
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate expects 1 argument, 6 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int; value_type = int; allocator_type = std::allocator<int>]'
578 | vector(size_type __n, const value_type& __value = value_type(),
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate expects 3 arguments, 6 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
537 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate expects 1 argument, 6 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = std::allocator<int>]'
528 | vector() { }
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate expects 0 arguments, 6 provided
p1059.cpp:20:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
20 | auto even = [](int i) {
| ^~~~
| ----
p1059.cpp:20:6: error: 'even' does not name a type
20 | auto even = [](int i) {
| ^~~~
p1059.cpp:23:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
23 | auto square = [](int i) {
| ^~~~
| ----
p1059.cpp:23:6: error: 'square' does not name a type
23 | auto square = [](int i) {
| ^~~~~~
p1059.cpp:26:1: error: expected unqualified-id before 'for'
26 | for (int i : ints | views::filter(even) | views::transform(square)) {
| ^~~
p1059.cpp:43:1: error: 'constexpr' does not name a type
43 | constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
| ^~~~~~~~~
p1059.cpp:43:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:44:24: error: expected unqualified-id before '{' token
44 | copyable-box{in_place} {}
| ^
p1059.cpp:46:1: error: 'constexpr' does not name a type
46 | constexpr copyable-box& operator=(const copyable-box& that) noexcept(is_nothrow_copy_constructible_v<T>) {
| ^~~~~~~~~
p1059.cpp:46:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:54:1: error: 'constexpr' does not name a type
54 | constexpr copyable-box& operator=(copyable-box&& that) noexcept(is_nothrow_move_constructible_v<T>) {
| ^~~~~~~~~
p1059.cpp:54:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:62:1: error: 'constexpr' does not name a type
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^~~~~~~~~
p1059.cpp:62:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:62:75: error: '\U00002014' does not name a type
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^
p1059.cpp:67:1: error: 'constexpr' does not name a type
67 | constexpr non-propagating-cache& operator=(const non-propagating-cache& other) noexcept {
| ^~~~~~~~~
p1059.cpp:67:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:81:8: error: expected constructor, destructor, or type conversion before ';' token
81 | reset();
| ^
p1059.cpp:82:1: error: expected unqualified-id before 'return'
82 | return *this;
| ^~~~~~
p1059.cpp:83:1: error: expected declaration before '}' token
83 | }
| ^
p1059.cpp:85:1: error: 'constexpr' does not name a type
85 | constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
| ^~~~~~~~~
p1059.cpp:85:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:91:1: error: 'constexpr' does not name a type
91 | constexpr T& emplace-deref (const I& i); // exposition only
| ^~~~~~~~~
p1059.cpp:91:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:107:10: error: 'range' has not been declared
107 | template<range R>
| ^~~~~
p1059.cpp:108:1: error: 'requires' does not name a type
108 | requires is_object_v<R>
| ^~~~~~~~
p1059.cpp:108:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:136:6: error: variable or field 'FUN' declared void
136 | void FUN(R&);
| ^~~
p1059.cpp:136:10: error: 'R' was not declared in this scope
136 | void FUN(R&);
| ^
p1059.cpp:136:12: error: expected primary-expression before ')' token
136 | void FUN(R&);
| ^
p1059.cpp:137:6: error: variable or field 'FUN' declared void
137 | void FUN(R&&) = delete;
| ^~~
p1059.cpp:137:10: error: 'R' was not declared in this scope
137 | void FUN(R&&) = delete;
| ^
p1059.cpp:137:13: error: expected primary-expression before ')' token
137 | void FUN(R&&) = delete;
| ^
p1059.cpp:139:1: error: 'convertible_to' does not name a type
139 | convertible_to<T, R&> && requires { FUN(declval<T>()); }
| ^~~~~~~~~~~~~~
p1059.cpp:140:1: error: 'constexpr' does not name a type
140 | constexpr auto data() const requires contiguous_range<R>
| ^~~~~~~~~
p1059.cpp:140:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:144:1: error: expected declaration before '}' token
144 | };
| ^
p1059.cpp:146:17: error: 'ref_view' does not name a type
146 | ref_view(R&) -> ref_view<R>;
| ^~~~~~~~
p1059.cpp:146:25: error: expected constructor, destructor, or type conversion before '<' token
146 | ref_view(R&) -> ref_view<R>;
| ^
p1059.cpp:147:1: error: expected declaration before '}' token
147 | }
| ^
p1059.cpp:148:10: error: 'different' has not been declared
148 | template<different-from<ref_view> T> requires see_below
| ^~~~~~~~~
p1059.cpp:148:19: error: expected '>' before '-' token
148 | template<different-from<ref_view> T> requires see_below
| ^
p1059.cpp:148:38: error: 'requires' does not name a type
148 | template<different-from<ref_view> T> requires see_below
| ^~~~~~~~
p1059.cpp:148:38: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:153:10: error: 'range' has not been declared
153 | template<range R>
| ^~~~~
p1059.cpp:154:1: error: 'requires' does not name a type
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^~~~~~~~
p1059.cpp:154:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:194:1: error: 'constexpr' does not name a type
194 | constexpr owning_view(R&& t);
| ^~~~~~~~~
p1059.cpp:194:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:201:15: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^
p1059.cpp:201:13: error: in C++98 'is' must be initialized by constructor, not by '{...}'
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:201:37: error: no matching function for call to 'std::vector<int>::vector(<brace-enclosed initializer list>)'
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: candidate: 'template<class _InputIterator> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>]'
711 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: template argument deduction/substitution failed:
p1059.cpp:201:37: note: candidate expects 3 arguments, 7 provided
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
596 | vector(const vector& __x)
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate expects 1 argument, 7 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int; value_type = int; allocator_type = std::allocator<int>]'
578 | vector(size_type __n, const value_type& __value = value_type(),
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate expects 3 arguments, 7 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
537 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate expects 1 argument, 7 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = std::allocator<int>]'
528 | vector() { }
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate expects 0 arguments, 7 provided
p1059.cpp:202:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
202 | auto evens = views::filter(is, [](int i) {
| ^~~~
| ----
p1059.cpp:202:6: error: 'evens' does not name a type
202 | auto evens = views::filter(is, [](int i) {
| ^~~~~
p1059.cpp:204:2: error: expected unqualified-id before ')' token
204 | });
| ^
p1059.cpp:205:1: error: expected unqualified-id before 'for'
205 | for (int i : evens)
| ^~~
p1059.cpp:209:10: error: 'input_range' has not been declared
209 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^~~~~~~~~~~
p1059.cpp:209:25: error: 'indirect_unary_predicate' has not been declared
209 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:209:49: error: expected '>' before '<' token
209 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^
p1059.cpp:211:65: error: expected unqualified-id before '{' token
211 | class filter_view : public view_interface<filter_view<V, Pred>> {
| ^
p1059.cpp:227:14: error: expected ',' or '...' before '&&' token
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~
p1059.cpp:227:27: error: 'filter_view' does not name a type
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~
p1059.cpp:227:38: error: expected constructor, destructor, or type conversion before '<' token
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:229:1: error: 'constexpr' does not name a type
229 | constexpr filter_view(V base, Pred pred);
| ^~~~~~~~~
p1059.cpp:229:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:231:1: error: 'constexpr' does not name a type
231 | constexpr const Pred& pred() const;
| ^~~~~~~~~
p1059.cpp:231:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:233:1: error: expected unqualified-id before 'return'
233 | return *pred_;
| ^~~~~~
p1059.cpp:234:1: error: 'V' does not name a type
234 | V base_ = V();
| ^
p1059.cpp:235:1: error: 'copyable' does not name a type
235 | copyable-box<Pred> pred_;
| ^~~~~~~~
p1059.cpp:244:1: error: 'constexpr' does not name a type
244 | constexpr iterator begin();
| ^~~~~~~~~
p1059.cpp:244:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:250:10: error: 'input_range' has not been declared
250 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^~~~~~~~~~~
p1059.cpp:250:25: error: 'indirect_unary_predicate' has not been declared
250 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:250:49: error: expected '>' before '<' token
250 | template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
| ^
p1059.cpp:251:76: error: expected unqualified-id before '{' token
251 | requires view<V> && is_object_v<Pred> class filter_view<V, Pred>::iterator {
| ^
p1059.cpp:286:1: error: 'constexpr' does not name a type
286 | constexpr iterator(filter_view& parent, iterator_t<V> current);
| ^~~~~~~~~
p1059.cpp:286:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:288:1: error: 'constexpr' does not name a type
288 | constexpr const iterator_t<V>& base() const & noexcept;
| ^~~~~~~~~
p1059.cpp:288:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:290:1: error: expected unqualified-id before 'return'
290 | return current_;
| ^~~~~~
p1059.cpp:291:1: error: 'constexpr' does not name a type
291 | constexpr iterator_t<V> base() &&;
| ^~~~~~~~~
p1059.cpp:291:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:293:1: error: expected unqualified-id before 'return'
293 | return std::move(current_);
| ^~~~~~
p1059.cpp:294:1: error: 'constexpr' does not name a type
294 | constexpr range_reference_t<V> operator*() const;
| ^~~~~~~~~
p1059.cpp:294:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:296:1: error: expected unqualified-id before 'return'
296 | return *current_;
| ^~~~~~
p1059.cpp:297:1: error: 'constexpr' does not name a type
297 | constexpr iterator_t<V> operator->() const
| ^~~~~~~~~
p1059.cpp:297:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:300:1: error: expected unqualified-id before 'return'
300 | return current_;
| ^~~~~~
p1059.cpp:301:1: error: 'constexpr' does not name a type
301 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:301:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:303:1: error: 'current_' does not name a type
303 | current_ = ranges::find_if(std::move(++current_), ranges::end(parent_->base_), ref(*parent_->pred_));
| ^~~~~~~~
p1059.cpp:304:1: error: expected unqualified-id before 'return'
304 | return *this;
| ^~~~~~
p1059.cpp:305:1: error: 'constexpr' does not name a type
305 | constexpr void operator++(int);
| ^~~~~~~~~
p1059.cpp:305:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:307:1: error: 'constexpr' does not name a type
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^~~~~~~~~
p1059.cpp:307:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:309:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
309 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:309:6: error: 'tmp' does not name a type; did you mean 'tm'?
309 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:310:1: error: expected unqualified-id before '++' token
310 | ++*this;
| ^~
p1059.cpp:311:1: error: expected unqualified-id before 'return'
311 | return tmp;
| ^~~~~~
p1059.cpp:312:1: error: 'constexpr' does not name a type
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~
p1059.cpp:312:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:314:1: error: expected unqualified-id before 'do'
314 | do --current_;
| ^~
p1059.cpp:315:1: error: expected unqualified-id before 'while'
315 | while (!invoke(*parent_->pred_, *current_));
| ^~~~~
p1059.cpp:316:1: error: expected unqualified-id before 'return'
316 | return *this;
| ^~~~~~
p1059.cpp:317:1: error: 'constexpr' does not name a type
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~
p1059.cpp:317:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:319:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
319 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:319:6: error: 'tmp' does not name a type; did you mean 'tm'?
319 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:320:1: error: expected unqualified-id before '--' token
320 | --*this;
| ^~
p1059.cpp:321:1: error: expected unqualified-id before 'return'
321 | return tmp;
| ^~~~~~
p1059.cpp:322:1: error: 'friend' used outside of class
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~~
| ------
p1059.cpp:322:8: error: 'constexpr' does not name a type
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~~~~~
p1059.cpp:322:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:324:1: error: expected unqualified-id before 'return'
324 | return x.current_ == y.current_;
| ^~~~~~
p1059.cpp:325:1: error: 'friend' used outside of class
325 | friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
| ^~~~~~
| ------
p1059.cpp:325:8: error: 'constexpr' does not name a type
325 | friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
| ^~~~~~~~~
p1059.cpp:325:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:328:1: error: expected unqualified-id before 'return'
328 | return ranges::iter_move(i.current_);
| ^~~~~~
p1059.cpp:329:1: error: 'friend' used outside of class
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ^~~~~~
| ------
p1059.cpp:329:8: error: 'constexpr' does not name a type
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ^~~~~~~~~
p1059.cpp:329:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:331:18: error: expected constructor, destructor, or type conversion before '(' token
331 | ranges::iter_swap(x.current_, y.current_).
| ^
p1059.cpp:346:1: error: 'constexpr' does not name a type
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~~
p1059.cpp:346:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:348:1: error: 'constexpr' does not name a type
348 | constexpr sentinel_t<V> base() const;
| ^~~~~~~~~
p1059.cpp:348:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:350:1: error: 'friend' used outside of class
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:350:8: error: 'constexpr' does not name a type
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~~
p1059.cpp:350:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:354:13: error: redefinition of 'std::vector<int> is'
354 | vector<int> is{ 0, 1, 2, 3, 4 };
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:354:15: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
354 | vector<int> is{ 0, 1, 2, 3, 4 };
| ^
p1059.cpp:355:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
355 | auto squares = views::transform(is, [](int i) {
| ^~~~
| ----
p1059.cpp:355:6: error: 'squares' does not name a type
355 | auto squares = views::transform(is, [](int i) {
| ^~~~~~~
p1059.cpp:357:2: error: expected unqualified-id before ')' token
357 | });
| ^
p1059.cpp:358:1: error: expected unqualified-id before 'for'
358 | for (int i : squares)
| ^~~
p1059.cpp:362:10: error: 'input_range' has not been declared
362 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~
p1059.cpp:362:25: error: 'copy_constructible' has not been declared
362 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:363:1: error: 'requires' does not name a type
363 | requires view<V> && is_object_v<F> &&
| ^~~~~~~~
p1059.cpp:363:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:398:17: error: expected ',' or '...' before '&&' token
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~
p1059.cpp:398:27: error: 'transform_view' does not name a type
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~~~~~~~~~~
p1059.cpp:398:41: error: expected constructor, destructor, or type conversion before '<' token
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^
p1059.cpp:400:1: error: 'constexpr' does not name a type
400 | constexpr transform_view(V base, F fun);
| ^~~~~~~~~
p1059.cpp:400:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:402:1: error: 'V' does not name a type
402 | V base_ = V();
| ^
p1059.cpp:403:1: error: 'copyable' does not name a type
403 | copyable-box<F> fun_;
| ^~~~~~~~
p1059.cpp:405:1: error: 'constexpr' does not name a type
405 | constexpr iterator<false> begin();
| ^~~~~~~~~
p1059.cpp:405:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:407:1: error: expected unqualified-id before 'return'
407 | return iterator<false> {*this, ranges::begin(base_)};
| ^~~~~~
p1059.cpp:408:1: error: 'constexpr' does not name a type
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^~~~~~~~~
p1059.cpp:408:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:411:1: error: expected unqualified-id before 'return'
411 | return iterator<true> {*this, ranges::begin(base_)};
| ^~~~~~
p1059.cpp:412:1: error: 'constexpr' does not name a type
412 | constexpr sentinel<false> end();
| ^~~~~~~~~
p1059.cpp:412:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:414:1: error: expected unqualified-id before 'return'
414 | return sentinel<false> {ranges::end(base_)};
| ^~~~~~
p1059.cpp:415:1: error: 'constexpr' does not name a type
415 | constexpr iterator<false> end() requires common_range<V>;
| ^~~~~~~~~
p1059.cpp:415:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:417:1: error: expected unqualified-id before 'return'
417 | return iterator<false> {*this, ranges::end(base_)};
| ^~~~~~
p1059.cpp:418:1: error: 'constexpr' does not name a type
418 | constexpr sentinel<true> end() const requires range<const V> &&
| ^~~~~~~~~
p1059.cpp:418:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:421:1: error: expected unqualified-id before 'return'
421 | return sentinel<true> {ranges::end(base_)};
| ^~~~~~
p1059.cpp:422:1: error: 'constexpr' does not name a type
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^~~~~~~~~
p1059.cpp:422:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:425:1: error: expected unqualified-id before 'return'
425 | return iterator<true> {*this, ranges::end(base_)};
| ^~~~~~
p1059.cpp:428:10: error: 'input_range' has not been declared
428 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~
p1059.cpp:428:25: error: 'copy_constructible' has not been declared
428 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:429:1: error: 'requires' does not name a type
429 | requires view<V> && is_object_v<F> &&
| ^~~~~~~~
p1059.cpp:429:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:496:1: error: 'requires' does not name a type
496 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:496:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:498:1: error: 'constexpr' does not name a type
498 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~~~~~~
p1059.cpp:498:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:500:1: error: 'constexpr' does not name a type
500 | constexpr iterator_t<Base> base() &&;
| ^~~~~~~~~
p1059.cpp:500:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:502:1: error: 'constexpr' does not name a type
502 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:502:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:504:1: error: expected unqualified-id before '++' token
504 | ++current_;
| ^~
p1059.cpp:505:1: error: expected unqualified-id before 'return'
505 | return *this;
| ^~~~~~
p1059.cpp:506:1: error: 'constexpr' does not name a type
506 | constexpr void operator++(int);
| ^~~~~~~~~
p1059.cpp:506:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:508:1: error: 'constexpr' does not name a type
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~
p1059.cpp:508:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:510:1: error: expected unqualified-id before '--' token
510 | --current_;
| ^~
p1059.cpp:511:1: error: expected unqualified-id before 'return'
511 | return *this;
| ^~~~~~
p1059.cpp:512:1: error: 'constexpr' does not name a type
512 | constexpr iterator operator++(int)
| ^~~~~~~~~
p1059.cpp:512:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:515:1: error: expected unqualified-id before '++' token
515 | ++*this;
| ^~
p1059.cpp:516:1: error: expected unqualified-id before 'return'
516 | return tmp;
| ^~~~~~
p1059.cpp:517:1: error: 'requires' does not name a type
517 | requires
| ^~~~~~~~
p1059.cpp:517:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:519:1: error: 'constexpr' does not name a type
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~
p1059.cpp:519:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:521:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
521 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:521:6: error: 'tmp' does not name a type; did you mean 'tm'?
521 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:522:1: error: expected unqualified-id before '--' token
522 | --*this;
| ^~
p1059.cpp:523:1: error: expected unqualified-id before 'return'
523 | return tmp;
| ^~~~~~
p1059.cpp:524:1: error: 'constexpr' does not name a type
524 | constexpr iterator& operator+=(difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:524:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:526:1: error: 'current_' does not name a type
526 | current_ += n;
| ^~~~~~~~
p1059.cpp:527:1: error: expected unqualified-id before 'return'
527 | return *this;
| ^~~~~~
p1059.cpp:528:1: error: 'constexpr' does not name a type
528 | constexpr iterator& operator-=(difference_type n)
| ^~~~~~~~~
p1059.cpp:528:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:531:1: error: 'current_' does not name a type
531 | current_ -= n;
| ^~~~~~~~
p1059.cpp:532:1: error: expected unqualified-id before 'return'
532 | return *this;
| ^~~~~~
p1059.cpp:533:1: error: 'friend' used outside of class
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:533:8: error: 'constexpr' does not name a type
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~~~~~
p1059.cpp:533:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:535:1: error: expected unqualified-id before 'return'
535 | return x.current_ == y.current_;
| ^~~~~~
p1059.cpp:536:1: error: 'friend' used outside of class
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:536:8: error: 'constexpr' does not name a type
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:536:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:539:1: error: expected unqualified-id before 'return'
539 | return x.current_ < y.current_;
| ^~~~~~
p1059.cpp:540:1: error: 'friend' used outside of class
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:540:8: error: 'constexpr' does not name a type
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:540:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:542:1: error: expected unqualified-id before 'return'
542 | return y < x;
| ^~~~~~
p1059.cpp:543:1: error: 'friend' used outside of class
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:543:8: error: 'constexpr' does not name a type
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:543:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:546:1: error: expected unqualified-id before 'return'
546 | return !(y < x);
| ^~~~~~
p1059.cpp:547:1: error: 'friend' used outside of class
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:547:8: error: 'constexpr' does not name a type
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:547:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:549:1: error: expected unqualified-id before 'return'
549 | return !(x < y);
| ^~~~~~
p1059.cpp:550:1: error: 'friend' used outside of class
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:550:8: error: 'constexpr' does not name a type
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:550:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:553:1: error: expected unqualified-id before 'return'
553 | return x.current_ <=> y.current_;
| ^~~~~~
p1059.cpp:554:1: error: 'friend' used outside of class
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:554:8: error: 'constexpr' does not name a type
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:554:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:555:1: error: 'friend' used outside of class
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:555:8: error: 'constexpr' does not name a type
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:555:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:557:1: error: expected unqualified-id before 'return'
557 | return iterator{*i.parent_, i.current_ + n};
| ^~~~~~
p1059.cpp:558:1: error: 'friend' used outside of class
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:558:8: error: 'constexpr' does not name a type
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:558:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:560:1: error: expected unqualified-id before 'return'
560 | return iterator{*i.parent_, i.current_ - n};
| ^~~~~~
p1059.cpp:561:1: error: 'friend' used outside of class
561 | friend constexpr difference_type operator-(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:561:8: error: 'constexpr' does not name a type
561 | friend constexpr difference_type operator-(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:561:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:563:1: error: 'constexpr' does not name a type
563 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~
p1059.cpp:563:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:565:1: error: 'requires' does not name a type
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:565:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:568:1: error: 'requires' does not name a type
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:568:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:571:1: error: 'requires' does not name a type
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:571:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:573:1: error: expected declaration before '}' token
573 | };
| ^
p1059.cpp:574:1: error: expected declaration before '}' token
574 | }
| ^
p1059.cpp:575:1: error: 'constexpr' does not name a type
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~~
p1059.cpp:575:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:577:1: error: 'constexpr' does not name a type
577 | constexpr sentinel(sentinel<!Const> i)
| ^~~~~~~~~
p1059.cpp:577:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:580:1: error: 'constexpr' does not name a type
580 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~
p1059.cpp:580:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:581:1: error: 'requires' does not name a type
581 | requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:581:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:583:1: error: expected unqualified-id before 'return'
583 | return x.current_ - y.current_;
| ^~~~~~
p1059.cpp:586:10: error: 'input_range' has not been declared
586 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~
p1059.cpp:586:25: error: 'copy_constructible' has not been declared
586 | template<input_range V, copy_constructible F>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:587:1: error: 'requires' does not name a type
587 | requires view<V> && is_object_v<F> &&
| ^~~~~~~~
p1059.cpp:587:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:617:1: error: 'requires' does not name a type
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:617:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:620:1: error: expected unqualified-id before 'return'
620 | return x.current_ - y.end_;
| ^~~~~~
p1059.cpp:622:1: error: 'requires' does not name a type
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:622:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:625:1: error: expected unqualified-id before 'return'
625 | return y.end_ - x.current_;
| ^~~~~~
p1059.cpp:631:13: error: redefinition of 'std::vector<int> is'
631 | vector<int> is{0,1,2,3,4,5,6,7,8,9};
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:631:15: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
631 | vector<int> is{0,1,2,3,4,5,6,7,8,9};
| ^
p1059.cpp:632:1: error: expected unqualified-id before 'for'
632 | for (int i : is | views::take(5))
| ^~~
p1059.cpp:636:10: error: 'view' has not been declared
636 | template<view V>
| ^~~~
p1059.cpp:637:40: error: expected template-name before '<' token
637 | class take_view : public view_interface<take_view<V>> {
| ^
p1059.cpp:637:40: error: expected '{' before '<' token
p1059.cpp:646:1: error: expected unqualified-id before 'public'
646 | public:
| ^~~~~~
p1059.cpp:648:1: error: 'constexpr' does not name a type
648 | constexpr take_view(V base, range_difference_t<V> count);
| ^~~~~~~~~
p1059.cpp:648:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:649:1: error: 'constexpr' does not name a type
649 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~~~~~
p1059.cpp:649:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:649:77: error: 'constexpr' does not name a type
649 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~~~~~
p1059.cpp:649:77: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:650:1: error: 'constexpr' does not name a type
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~~~~~
p1059.cpp:650:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:662:1: error: 'constexpr' does not name a type
662 | constexpr auto begin() const requires range<const V> {
| ^~~~~~~~~
p1059.cpp:662:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:674:1: error: 'constexpr' does not name a type
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~~~~~~~
p1059.cpp:674:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:684:1: error: 'constexpr' does not name a type
684 | constexpr auto end() const requires range<const V> {
| ^~~~~~~~~
p1059.cpp:684:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:694:1: error: 'constexpr' does not name a type
694 | constexpr auto size() requires sized_range<V> {
| ^~~~~~~~~
p1059.cpp:694:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:698:1: error: 'constexpr' does not name a type
698 | constexpr auto size() const requires sized_range<const V> {
| ^~~~~~~~~
p1059.cpp:698:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:704:12: error: expected ',' or '...' before '&&' token
704 | take_view(R&&, range_difference_t<R>)
| ^~
p1059.cpp:705:4: error: 'take_view' does not name a type
705 | -> take_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:705:13: error: expected constructor, destructor, or type conversion before '<' token
705 | -> take_view<views::all_t<R>>;
| ^
p1059.cpp:706:1: error: expected declaration before '}' token
706 | }
| ^
p1059.cpp:707:1: error: 'constexpr' does not name a type
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^~~~~~~~~
p1059.cpp:707:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:711:10: error: 'view' has not been declared
711 | template<view V>
| ^~~~
p1059.cpp:713:17: error: 'V' was not declared in this scope
713 | class take_view<V>::sentinel {
| ^
p1059.cpp:713:18: error: template argument 1 is invalid
713 | class take_view<V>::sentinel {
| ^
p1059.cpp:713:30: error: expected unqualified-id before '{' token
713 | class take_view<V>::sentinel {
| ^
p1059.cpp:731:1: error: 'constexpr' does not name a type
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~~
p1059.cpp:731:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:733:1: error: 'constexpr' does not name a type
733 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~~
p1059.cpp:733:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:738:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
738 | auto small = [](const auto x) noexcept {
| ^~~~
| ----
p1059.cpp:738:6: error: 'small' does not name a type
738 | auto small = [](const auto x) noexcept {
| ^~~~~
p1059.cpp:741:1: error: 'requires' does not name a type
741 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~
p1059.cpp:741:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:743:1: error: 'constexpr' does not name a type
743 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~
p1059.cpp:743:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:745:1: error: expected unqualified-id before 'return'
745 | return end_;
| ^~~~~~
p1059.cpp:746:1: error: 'friend' used outside of class
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~~
| ------
p1059.cpp:746:8: error: 'constexpr' does not name a type
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~~~~~
p1059.cpp:746:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:747:29: error: 'Const' was not declared in this scope; did you mean 'const'?
747 | template<bool OtherConst = !Const>
| ^~~~~
| const
p1059.cpp:748:1: error: 'requires' does not name a type
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:748:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:751:1: error: expected unqualified-id before 'return'
751 | return y.count() == 0 || y.base() == x.end_;
| ^~~~~~
p1059.cpp:756:1: error: expected unqualified-id before 'public'
756 | public:
| ^~~~~~
p1059.cpp:758:1: error: 'constexpr' does not name a type
758 | constexpr take_while_view(V base, Pred pred);
| ^~~~~~~~~
p1059.cpp:758:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:759:1: error: 'constexpr' does not name a type
759 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~~~~~
p1059.cpp:759:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:759:77: error: 'constexpr' does not name a type
759 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~~~~~
p1059.cpp:759:77: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:760:1: error: 'constexpr' does not name a type
760 | constexpr const Pred& pred() const;
| ^~~~~~~~~
p1059.cpp:760:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:761:1: error: 'constexpr' does not name a type
761 | constexpr auto begin() requires (!simple-view<V>)
| ^~~~~~~~~
p1059.cpp:761:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:765:1: error: 'constexpr' does not name a type
765 | constexpr auto begin() const
| ^~~~~~~~~
p1059.cpp:765:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:770:1: error: 'constexpr' does not name a type
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~~~~~~~
p1059.cpp:770:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:774:1: error: 'constexpr' does not name a type
774 | constexpr auto end() const
| ^~~~~~~~~
p1059.cpp:774:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:779:1: error: expected declaration before '}' token
779 | };
| ^
p1059.cpp:781:18: error: expected ',' or '...' before '&&' token
781 | take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
| ^~
p1059.cpp:781:31: error: 'take_while_view' does not name a type
781 | take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~~~~~
p1059.cpp:781:46: error: expected constructor, destructor, or type conversion before '<' token
781 | take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:782:1: error: expected declaration before '}' token
782 | }
| ^
p1059.cpp:783:1: error: 'constexpr' does not name a type
783 | constexpr take_while_view(V base, Pred pred);
| ^~~~~~~~~
p1059.cpp:783:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:785:1: error: 'constexpr' does not name a type
785 | constexpr const Pred& pred() const;
| ^~~~~~~~~
p1059.cpp:785:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:787:1: error: expected unqualified-id before 'return'
787 | return *pred_;
| ^~~~~~
p1059.cpp:790:10: error: 'view' has not been declared
790 | template<view V, class Pred>
| ^~~~
p1059.cpp:791:1: error: 'requires' does not name a type
791 | requires input_range<V> && is_object_v<Pred> &&
| ^~~~~~~~
p1059.cpp:791:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:795:1: error: expected unqualified-id before 'for'
795 | for (const auto i : small_ints) {
| ^~~
p1059.cpp:798:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
798 | auto i = 0;
| ^~~~
| ----
p1059.cpp:798:6: error: 'i' does not name a type
798 | auto i = 0;
| ^
p1059.cpp:799:1: error: 'input' does not name a type; did you mean 'int'?
799 | input >> i;
| ^~~~~
| int
p1059.cpp:800:1: error: 'cout' does not name a type
800 | cout << i;
| ^~~~
p1059.cpp:804:10: error: 'view' has not been declared
804 | template<view V, class Pred>
| ^~~~
p1059.cpp:807:1: error: 'requires' does not name a type
807 | requires input_range<V> && is_object_v<Pred> &&
| ^~~~~~~~
p1059.cpp:807:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:822:7: error: 'take_while_view' is not a class template
822 | class take_while_view<V, Pred>::sentinel {
| ^~~~~~~~~~~~~~~
p1059.cpp:822:23: error: 'V' was not declared in this scope
822 | class take_while_view<V, Pred>::sentinel {
| ^
p1059.cpp:822:26: error: 'Pred' was not declared in this scope
822 | class take_while_view<V, Pred>::sentinel {
| ^~~~
p1059.cpp:822:7: error: 'take_while_view' has not been declared
822 | class take_while_view<V, Pred>::sentinel {
| ^~~~~~~~~~~~~~~
p1059.cpp:822:42: error: expected unqualified-id before '{' token
822 | class take_while_view<V, Pred>::sentinel {
| ^
p1059.cpp:842:1: error: 'constexpr' does not name a type
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~~~~~
p1059.cpp:842:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:844:1: error: 'constexpr' does not name a type
844 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~~
p1059.cpp:844:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:847:1: error: 'friend' used outside of class
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:847:8: error: 'constexpr' does not name a type
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~~~~~~
p1059.cpp:847:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:848:29: error: 'Const' was not declared in this scope; did you mean 'const'?
848 | template<bool OtherConst = !Const>
| ^~~~~
| const
p1059.cpp:849:1: error: 'requires' does not name a type
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:849:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:854:1: error: expected unqualified-id before 'return'
854 | return y.end_ == x || !invoke(*y.pred_, *x);
| ^~~~~~
p1059.cpp:862:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
862 | auto ints = views::iota(0) | views::take(10);
| ^~~~
| ----
p1059.cpp:862:6: error: 'ints' does not name a type; did you mean 'int'?
862 | auto ints = views::iota(0) | views::take(10);
| ^~~~
| int
p1059.cpp:863:1: error: expected unqualified-id before 'for'
863 | for (auto i : ints | views::drop(5)) {
| ^~~
p1059.cpp:869:10: error: 'view' has not been declared
869 | template<view V>
| ^~~~
p1059.cpp:870:40: error: expected template-name before '<' token
870 | class drop_view : public view_interface<drop_view<V>> {
| ^
p1059.cpp:870:40: error: expected '{' before '<' token
p1059.cpp:904:12: error: expected ',' or '...' before '&&' token
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:42: error: invalid use of template-name 'std::ranges::drop_view' without an argument list
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:904:42: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
p1059.cpp:870:7: note: 'template<<declaration error> > class std::ranges::drop_view' declared here
870 | class drop_view : public view_interface<drop_view<V>> {
| ^~~~~~~~~
p1059.cpp:904:51: error: expected constructor, destructor, or type conversion before '<' token
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^
p1059.cpp:906:1: error: 'constexpr' does not name a type
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^~~~~~~~~
p1059.cpp:906:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:908:1: error: 'constexpr' does not name a type
908 | constexpr auto begin()
| ^~~~~~~~~
p1059.cpp:908:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:911:1: error: 'constexpr' does not name a type
911 | constexpr auto begin() const
| ^~~~~~~~~
p1059.cpp:911:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:919:1: error: 'constexpr' does not name a type
919 | constexpr auto source = " \t \t \t hello there";
| ^~~~~~~~~
p1059.cpp:919:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:920:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
920 | auto is_invisible = [](const auto x) {
| ^~~~
| ----
p1059.cpp:920:6: error: 'is_invisible' does not name a type
920 | auto is_invisible = [](const auto x) {
| ^~~~~~~~~~~~
p1059.cpp:923:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
923 | auto skip_ws = views::drop_while(source, is_invisible);
| ^~~~
| ----
p1059.cpp:923:6: error: 'skip_ws' does not name a type
923 | auto skip_ws = views::drop_while(source, is_invisible);
| ^~~~~~~
p1059.cpp:924:1: error: expected unqualified-id before 'for'
924 | for (auto c : skip_ws) {
| ^~~
p1059.cpp:953:1: error: 'constexpr' does not name a type
953 | constexpr drop_while_view(V base, Pred pred);
| ^~~~~~~~~
p1059.cpp:953:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:954:1: error: 'constexpr' does not name a type
954 | constexpr const Pred& pred() const;
| ^~~~~~~~~
p1059.cpp:954:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:959:1: error: expected unqualified-id before 'return'
959 | return *pred_;
| ^~~~~~
p1059.cpp:960:1: error: 'constexpr' does not name a type
960 | constexpr auto begin();
| ^~~~~~~~~
p1059.cpp:960:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:967:18: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
967 | vector<string> ss{"hello", " ", "world", "!"};
| ^
p1059.cpp:967:16: error: in C++98 'ss' must be initialized by constructor, not by '{...}'
967 | vector<string> ss{"hello", " ", "world", "!"};
| ^~
p1059.cpp:967:45: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(<brace-enclosed initializer list>)'
967 | vector<string> ss{"hello", " ", "world", "!"};
| ^
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: candidate: 'template<class _InputIterator> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
711 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:711:9: note: template argument deduction/substitution failed:
p1059.cpp:967:45: note: candidate expects 3 arguments, 4 provided
967 | vector<string> ss{"hello", " ", "world", "!"};
| ^
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
596 | vector(const vector& __x)
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate expects 1 argument, 4 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; value_type = std::__cxx11::basic_string<char>; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
578 | vector(size_type __n, const value_type& __value = value_type(),
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:578:7: note: candidate expects 3 arguments, 4 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; allocator_type = std::allocator<std::__cxx11::basic_string<char> >]'
537 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate expects 1 argument, 4 provided
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
528 | vector() { }
| ^~~~~~
/usr/local/include/c++/12.1.0/bits/stl_vector.h:528:7: note: candidate expects 0 arguments, 4 provided
p1059.cpp:968:1: error: expected unqualified-id before 'for'
968 | for (char ch : ss | views::join)
| ^~~
p1059.cpp:972:10: error: 'input_range' has not been declared
972 | template<input_range V>
| ^~~~~~~~~~~
p1059.cpp:973:1: error: 'requires' does not name a type
973 | requires view<V> && input_range<range_reference_t<V>>
| ^~~~~~~~
p1059.cpp:973:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1027:21: error: expected ',' or '...' before '&&' token
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:28: error: 'join_view' does not name a type
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:1027:37: error: expected initializer before '<' token
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^
p1059.cpp:1029:1: error: 'constexpr' does not name a type
1029 | constexpr explicit join_view(V base);
| ^~~~~~~~~
p1059.cpp:1029:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1033:10: error: 'input_range' has not been declared
1033 | template<input_range V>
| ^~~~~~~~~~~
p1059.cpp:1034:1: error: 'requires' does not name a type
1034 | requires view<V> && input_range<range_reference_t<V>> template<bool Const>
| ^~~~~~~~
p1059.cpp:1034:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1093:1: error: 'convertible_to' does not name a type
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~~~~~
p1059.cpp:1096:1: error: 'common_type_t' does not name a type
1096 | common_type_t<
| ^~~~~~~~~~~~~
p1059.cpp:1101:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^~~~
| ----
p1059.cpp:1101:6: error: 'update_inner' does not name a type
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^~~~~~~~~~~~
p1059.cpp:1107:1: error: expected unqualified-id before 'for'
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~~
p1059.cpp:1107:8: error: 'outer_' does not name a type
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~~~~~
p1059.cpp:1107:47: error: expected unqualified-id before '++' token
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~
p1059.cpp:1113:1: error: expected unqualified-id before 'if'
1113 | if constexpr (ref-is-glvalue) inner_ = InnerIter();
| ^~
p1059.cpp:1114:1: error: 'constexpr' does not name a type
1114 | constexpr iterator (Parent & parent, OuterIter
| ^~~~~~~~~
p1059.cpp:1114:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1121:21: error: 'constexpr' does not name a type
1121 | constexpr iterator& operator++(); Let inner-range be:
| ^~~~~~~~~
p1059.cpp:1121:21: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1121:55: error: 'Let' does not name a type
1121 | constexpr iterator& operator++(); Let inner-range be:
| ^~~
p1059.cpp:1126:1: error: expected unqualified-id before 'if'
1126 | if (++inner_ == ranges::end(inner_rng)) {
| ^~
p1059.cpp:1130:1: error: expected unqualified-id before 'return'
1130 | return *this;
| ^~~~~~
p1059.cpp:1131:8: error: 'constexpr' does not name a type
1131 | constexpr void operator++(int);
| ^~~~~~~~~
p1059.cpp:1131:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1133:8: error: 'constexpr' does not name a type
1133 | constexpr iterator operator++(int)
| ^~~~~~~~~
p1059.cpp:1133:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1137:8: error: 'outer' does not name a type
1137 | outer);
| ^~~~~
p1059.cpp:1138:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1138 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:1138:6: error: 'tmp' does not name a type; did you mean 'tm'?
1138 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:1139:1: error: expected unqualified-id before '++' token
1139 | ++*this;
| ^~
p1059.cpp:1140:1: error: expected unqualified-id before 'return'
1140 | return tmp;
| ^~~~~~
p1059.cpp:1141:1: error: 'constexpr' does not name a type
1141 | constexpr iterator& operator--()
| ^~~~~~~~~
p1059.cpp:1141:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1145:1: error: expected unqualified-id before 'if'
1145 | if (outer_ == ranges::end(parent_->base_)) inner_ = ranges::end(*--outer_);
| ^~
p1059.cpp:1146:1: error: expected unqualified-id before 'while'
1146 | while (inner_ == ranges::begin(*outer_)) inner_ = ranges::end(*--outer_);
| ^~~~~
p1059.cpp:1147:1: error: expected unqualified-id before '--' token
1147 | --inner_;
| ^~
p1059.cpp:1148:1: error: expected unqualified-id before 'return'
1148 | return *this;
| ^~~~~~
p1059.cpp:1149:1: error: 'bidirectional_range' does not name a type
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1151:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1151 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:1151:6: error: 'tmp' does not name a type; did you mean 'tm'?
1151 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:1152:1: error: expected unqualified-id before '--' token
1152 | --*this;
| ^~
p1059.cpp:1153:1: error: expected unqualified-id before 'return'
1153 | return tmp;
| ^~~~~~
p1059.cpp:1154:1: error: 'requires' does not name a type
1154 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~
p1059.cpp:1154:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1156:1: error: 'requires' does not name a type
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:1156:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1158:1: error: expected declaration before '}' token
1158 | };
| ^
p1059.cpp:1159:1: error: expected declaration before '}' token
1159 | }
| ^
p1059.cpp:1160:1: error: 'constexpr' does not name a type
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~~~~
p1059.cpp:1160:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1162:1: error: 'constexpr' does not name a type
1162 | constexpr iterator operator--(int)
| ^~~~~~~~~
p1059.cpp:1162:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1167:1: error: 'friend' used outside of class
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~~
| ------
p1059.cpp:1167:8: error: 'constexpr' does not name a type
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~~~~~
p1059.cpp:1167:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1170:1: error: expected unqualified-id before 'return'
1170 | return ranges::iter_swap(x.inner_, y.inner_);
| ^~~~~~
p1059.cpp:1173:10: error: 'input_range' has not been declared
1173 | template<input_range V>
| ^~~~~~~~~~~
p1059.cpp:1174:1: error: 'requires' does not name a type
1174 | requires view<V> && input_range<range_reference_t<V>> template<bool Const>
| ^~~~~~~~
p1059.cpp:1174:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1200:16: error: in C++98 'vs' must be initialized by constructor, not by '{...}'
1200 | vector<string> vs = {"the", "quick", "brown", "fox"};
| ^~
p1059.cpp:1200:52: error: could not convert '{"the", "quick", "brown", "fox"}' from '<brace-enclosed initializer list>' to 'std::vector<std::__cxx11::basic_string<char> >'
1200 | vector<string> vs = {"the", "quick", "brown", "fox"};
| ^
| |
| <brace-enclosed initializer list>
p1059.cpp:1201:1: error: expected unqualified-id before 'for'
1201 | for (char c : vs | join_with('-')) {
| ^~~
p1059.cpp:1208:1: error: 'concept' does not name a type
1208 | concept compatible-joinable-ranges =
| ^~~~~~~
p1059.cpp:1208:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1213:1: error: 'concept' does not name a type
1213 | concept bidirectional-common = bidirectional_range<R> && common_range<R>;
| ^~~~~~~
p1059.cpp:1213:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1214:10: error: 'input_range' has not been declared
1214 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1214:25: error: 'forward_range' has not been declared
1214 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1215:1: error: 'requires' does not name a type
1215 | requires view<V> && input_range<range_reference_t<V>>
| ^~~~~~~~
p1059.cpp:1215:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1272:17: error: expected ',' or '...' before '&&' token
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1272:29: error: 'join_with_view' does not name a type
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~~~~~~~~~~
p1059.cpp:1272:43: error: expected constructor, destructor, or type conversion before '<' token
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^
p1059.cpp:1273:10: error: 'input_range' has not been declared
1273 | template<input_range R>
| ^~~~~~~~~~~
p1059.cpp:1274:15: error: expected constructor, destructor, or type conversion before '(' token
1274 | join_with_view(R&&, range_value_t<range_reference_t<R>>)
| ^
p1059.cpp:1277:1: error: 'constexpr' does not name a type
1277 | constexpr join_with_view(V base, Pattern pattern);
| ^~~~~~~~~
p1059.cpp:1277:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1279:10: error: 'input_range' has not been declared
1279 | template<input_range R>
| ^~~~~~~~~~~
p1059.cpp:1280:1: error: 'requires' does not name a type
1280 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~
p1059.cpp:1280:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1285:10: error: 'input_range' has not been declared
1285 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1285:25: error: 'forward_range' has not been declared
1285 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1286:1: error: 'requires' does not name a type
1286 | requires view<V> && input_range<range_reference_t<V>>
| ^~~~~~~~
p1059.cpp:1286:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1353:1: error: 'is_lvalue_reference_v' does not name a type
1353 | is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1361:1: error: expected unqualified-id before 'if'
1361 | if constexpr (ref-is-glvalue) return *x;
| ^~
p1059.cpp:1362:1: error: expected unqualified-id before 'else'
1362 | else
| ^~~~
p1059.cpp:1364:1: error: 'constexpr' does not name a type
1364 | constexpr auto&& get-inner(const OuterIter& x);
| ^~~~~~~~~
p1059.cpp:1364:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1366:1: error: expected unqualified-id before 'if'
1366 | if constexpr (ref-is-glvalue) return *x;
| ^~
p1059.cpp:1367:1: error: expected unqualified-id before 'else'
1367 | else
| ^~~~
p1059.cpp:1369:1: error: 'constexpr' does not name a type
1369 | constexpr void satisfy();
| ^~~~~~~~~
p1059.cpp:1369:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1371:1: error: expected unqualified-id before 'while'
1371 | while (true) {
| ^~~~~
p1059.cpp:1402:1: error: 'constexpr' does not name a type
1402 | constexpr decltype(auto) operator*() const;
| ^~~~~~~~~
p1059.cpp:1402:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1404:7: error: expected nested-name-specifier before 'reference'
1404 | using reference =
| ^~~~~~~~~
p1059.cpp:1406:1: error: expected unqualified-id before 'return'
1406 | return visit([](auto& it) -> reference {
| ^~~~~~
p1059.cpp:1408:2: error: expected unqualified-id before ',' token
1408 | }, inner_it_);
| ^
p1059.cpp:1408:13: error: expected constructor, destructor, or type conversion before ')' token
1408 | }, inner_it_);
| ^
p1059.cpp:1409:1: error: 'constexpr' does not name a type
1409 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:1409:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1411:6: error: expected constructor, destructor, or type conversion before '(' token
1411 | visit([](auto& it) {
| ^
p1059.cpp:1413:2: error: expected unqualified-id before ',' token
1413 | }, inner_it_);
| ^
p1059.cpp:1413:13: error: expected constructor, destructor, or type conversion before ')' token
1413 | }, inner_it_);
| ^
p1059.cpp:1414:10: error: expected constructor, destructor, or type conversion before ';' token
1414 | satisfy();
| ^
p1059.cpp:1415:1: error: expected unqualified-id before 'return'
1415 | return *this;
| ^~~~~~
p1059.cpp:1416:1: error: 'constexpr' does not name a type
1416 | constexpr void operator++(int);
| ^~~~~~~~~
p1059.cpp:1416:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1418:1: error: 'requires' does not name a type
1418 | requires ref-is-glvalue && forward_iterator<OuterIter > &&
| ^~~~~~~~
p1059.cpp:1418:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1421:1: error: invalid use of template-name 'std::iterator' without an argument list
1421 | iterator tmp = *this;
| ^~~~~~~~
p1059.cpp:1421:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
In file included from /usr/local/include/c++/12.1.0/string:45,
from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
from /usr/local/include/c++/12.1.0/ios:42,
from /usr/local/include/c++/12.1.0/ostream:38,
from /usr/local/include/c++/12.1.0/iostream:39,
from N4910.h:2:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1422:1: error: expected unqualified-id before '++' token
1422 | ++*this;
| ^~
p1059.cpp:1423:1: error: expected unqualified-id before 'return'
1423 | return tmp;
| ^~~~~~
p1059.cpp:1424:1: error: 'constexpr' does not name a type
1424 | constexpr iterator& operator--()
| ^~~~~~~~~
p1059.cpp:1424:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1429:1: error: expected unqualified-id before 'if'
1429 | if (outer_it_ == ranges::end(parent_->base_)) {
| ^~
p1059.cpp:1433:1: error: expected unqualified-id before 'while'
1433 | while (true) {
| ^~~~~
p1059.cpp:1454:6: error: expected constructor, destructor, or type conversion before '(' token
1454 | visit([](auto& it) {
| ^
p1059.cpp:1456:2: error: expected unqualified-id before ',' token
1456 | }, inner_it_);
| ^
p1059.cpp:1456:13: error: expected constructor, destructor, or type conversion before ')' token
1456 | }, inner_it_);
| ^
p1059.cpp:1457:1: error: expected unqualified-id before 'return'
1457 | return *this;
| ^~~~~~
p1059.cpp:1458:1: error: 'bidirectional' does not name a type
1458 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~~~
p1059.cpp:1460:1: error: invalid use of template-name 'std::iterator' without an argument list
1460 | iterator tmp = *this;
| ^~~~~~~~
p1059.cpp:1460:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1461:1: error: expected unqualified-id before '--' token
1461 | --*this;
| ^~
p1059.cpp:1462:1: error: expected unqualified-id before 'return'
1462 | return tmp;
| ^~~~~~
p1059.cpp:1463:1: error: 'constexpr' does not name a type
1463 | constexpr iterator operator--(int)
| ^~~~~~~~~
p1059.cpp:1463:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1468:1: error: expected unqualified-id before 'return'
1468 | return x.outer_it_ == y.outer_it_ && x.inner_it_ == y.inner_it_;
| ^~~~~~
p1059.cpp:1471:10: error: 'input_range' has not been declared
1471 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1471:25: error: 'forward_range' has not been declared
1471 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1472:1: error: 'requires' does not name a type
1472 | requires view<V> && input_range<range_reference_t<V>>
| ^~~~~~~~
p1059.cpp:1472:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1490:1: error: 'constexpr' does not name a type
1490 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~~~~
p1059.cpp:1490:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1492:1: error: 'constexpr' does not name a type
1492 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~~
p1059.cpp:1492:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1498:1: error: 'requires' does not name a type
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~
p1059.cpp:1498:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1501:1: error: expected unqualified-id before 'return'
1501 | return x.outer_it_ == y.end_;
| ^~~~~~
p1059.cpp:1505:11: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
1505 | string str{"the quick brown fox"};
| ^
p1059.cpp:1505:8: error: in C++98 'std::ranges::str' must be initialized by constructor, not by '{...}'
1505 | string str{"the quick brown fox"};
| ^~~
p1059.cpp:1506:1: error: expected unqualified-id before 'for'
1506 | for (auto word : str | views::lazy_split(' ')) {
| ^~~
p1059.cpp:1514:10: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1514 | template<auto> struct require-constant;
| ^~~~
| ----
p1059.cpp:1514:10: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
p1059.cpp:1514:10: error: storage class specified for template parameter 'parameter'
p1059.cpp:1514:30: error: expected unqualified-id before '-' token
1514 | template<auto> struct require-constant;
| ^
p1059.cpp:1515:19: error: 'concept' does not name a type
1515 | template<class R> concept tiny-range =
| ^~~~~~~
p1059.cpp:1515:19: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1518:72: error: expected unqualified-id before '&&' token
1518 | requires { typename require-constant<remove_reference_t<R>::size()>; } && (remove_reference_t<R>::size() <= 1);
| ^~
p1059.cpp:1519:10: error: 'input_range' has not been declared
1519 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1519:25: error: 'forward_range' has not been declared
1519 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1520:1: error: 'requires' does not name a type; did you mean 'require'?
1520 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1520:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1565:18: error: expected ',' or '...' before '&&' token
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1565:30: error: 'lazy_split_view' does not name a type
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:45: error: expected constructor, destructor, or type conversion before '<' token
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^
p1059.cpp:1566:10: error: 'input_range' has not been declared
1566 | template<input_range R>
| ^~~~~~~~~~~
p1059.cpp:1567:16: error: expected constructor, destructor, or type conversion before '(' token
1567 | lazy_split_view(R&&, range_value_t<R>)
| ^
p1059.cpp:1570:1: error: 'constexpr' does not name a type
1570 | constexpr lazy_split_view(V base, Pattern pattern);
| ^~~~~~~~~
p1059.cpp:1570:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1572:10: error: 'input_range' has not been declared
1572 | template<input_range R>
| ^~~~~~~~~~~
p1059.cpp:1573:1: error: 'requires' does not name a type
1573 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~
p1059.cpp:1573:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1579:10: error: 'input_range' has not been declared
1579 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1579:25: error: 'forward_range' has not been declared
1579 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1580:1: error: 'requires' does not name a type; did you mean 'require'?
1580 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1580:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1624:1: error: 'constexpr' does not name a type
1624 | constexpr explicit outer-iterator(Parent& parent) requires (!forward_range<Base>);
| ^~~~~~~~~
p1059.cpp:1624:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1626:1: error: 'constexpr' does not name a type
1626 | constexpr outer-iterator(Parent& parent, iterator_t<Base> current)
| ^~~~~~~~~
p1059.cpp:1626:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1629:1: error: 'constexpr' does not name a type
1629 | constexpr outer-iterator(outer-iterator<!Const> i)
| ^~~~~~~~~
p1059.cpp:1629:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1633:1: error: expected unqualified-id before 'return'
1633 | return x.current_ == y.current_ && x.trailing_empty_ == y.trailing_empty_;
| ^~~~~~
p1059.cpp:1635:1: error: 'constexpr' does not name a type
1635 | constexpr outer-iterator& operator++();
| ^~~~~~~~~
p1059.cpp:1635:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1637:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1637 | const auto end = ranges::end(parent_->base_);
| ^~~~
| ----
p1059.cpp:1637:12: error: 'end' does not name a type
1637 | const auto end = ranges::end(parent_->base_);
| ^~~
p1059.cpp:1638:1: error: expected unqualified-id before 'if'
1638 | if (current == end) {
| ^~
p1059.cpp:1642:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1642 | const auto [pbegin, pend] = subrange {
| ^~~~
| ----
p1059.cpp:1642:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
1642 | const auto [pbegin, pend] = subrange {
| ^
p1059.cpp:1642:12: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
1642 | const auto [pbegin, pend] = subrange {
| ^~~~~~~~~~~~~~
p1059.cpp:1642:12: error: structured binding declaration cannot be C++98 'auto'
p1059.cpp:1642:12: error: structured binding declaration cannot have type 'const int'
p1059.cpp:1642:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
p1059.cpp:1642:29: error: 'subrange' was not declared in this scope
1642 | const auto [pbegin, pend] = subrange {
| ^~~~~~~~
p1059.cpp:1642:38: error: expected ';' before '{' token
1642 | const auto [pbegin, pend] = subrange {
| ^
p1059.cpp:1645:1: error: expected unqualified-id before 'if'
1645 | if (pbegin == pend) ++current;
| ^~
p1059.cpp:1646:1: error: expected unqualified-id before 'else'
1646 | else if constexpr (tiny-range<Pattern>) {
| ^~~~
p1059.cpp:1653:1: error: expected unqualified-id before 'else'
1653 | else {
| ^~~~
p1059.cpp:1665:1: error: expected unqualified-id before 'return'
1665 | return *this;
| ^~~~~~
p1059.cpp:1666:1: error: 'friend' used outside of class
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~~
| ------
p1059.cpp:1666:8: error: 'constexpr' does not name a type
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~~~~~
p1059.cpp:1666:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1667:1: error: 'friend' used outside of class
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:1667:8: error: 'constexpr' does not name a type
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^~~~~~~~~
p1059.cpp:1667:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1669:1: error: expected unqualified-id before 'return'
1669 | return x.current == ranges::end(x.parent_->base_) && !x.trailing_empty_;
| ^~~~~~
p1059.cpp:1672:10: error: 'input_range' has not been declared
1672 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1672:25: error: 'forward_range' has not been declared
1672 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1673:1: error: 'requires' does not name a type; did you mean 'require'?
1673 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1673:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1688:1: error: 'constexpr' does not name a type
1688 | constexpr explicit value_type(outer-iterator i);
| ^~~~~~~~~
p1059.cpp:1688:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1690:1: error: 'constexpr' does not name a type
1690 | constexpr inner-iterator<Const> begin() const;
| ^~~~~~~~~
p1059.cpp:1690:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1692:1: error: expected unqualified-id before 'return'
1692 | return inner-iterator <Const> {i_};
| ^~~~~~
p1059.cpp:1693:1: error: 'constexpr' does not name a type
1693 | constexpr default_sentinel_t end() const noexcept;
| ^~~~~~~~~
p1059.cpp:1693:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1695:1: error: expected unqualified-id before 'return'
1695 | return default_sentinel;
| ^~~~~~
p1059.cpp:1698:10: error: 'input_range' has not been declared
1698 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~
p1059.cpp:1698:25: error: 'forward_range' has not been declared
1698 | template<input_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1699:1: error: 'requires' does not name a type; did you mean 'require'?
1699 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1699:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1769:1: error: 'constexpr' does not name a type
1769 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~~~~~~
p1059.cpp:1769:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1771:1: error: 'constexpr' does not name a type
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~~~~~~
p1059.cpp:1771:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1773:1: error: 'constexpr' does not name a type
1773 | constexpr inner-iterator& operator++();
| ^~~~~~~~~
p1059.cpp:1773:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1775:1: error: 'incremented_' does not name a type
1775 | incremented_ = true;
| ^~~~~~~~~~~~
p1059.cpp:1776:1: error: expected unqualified-id before 'if'
1776 | if constexpr (!forward_range<Base>) {
| ^~
p1059.cpp:1781:1: error: expected unqualified-id before '++' token
1781 | ++i_.current ;
| ^~
p1059.cpp:1782:1: error: expected unqualified-id before 'return'
1782 | return *this;
| ^~~~~~
p1059.cpp:1783:1: error: 'friend' used outside of class
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~~
| ------
p1059.cpp:1783:8: error: 'constexpr' does not name a type
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~~~~~
p1059.cpp:1783:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1789:8: error: redefinition of 'std::string std::ranges::str'
1789 | string str{"the quick brown fox"};
| ^~~
p1059.cpp:1505:8: note: 'std::string std::ranges::str' previously declared here
1505 | string str{"the quick brown fox"};
| ^~~
p1059.cpp:1789:11: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
1789 | string str{"the quick brown fox"};
| ^
p1059.cpp:1790:1: error: expected unqualified-id before 'for'
1790 | for (string_view word : split(str, ' ')) {
| ^~~
p1059.cpp:1796:10: error: 'forward_range' has not been declared
1796 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1796:27: error: 'forward_range' has not been declared
1796 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1797:1: error: 'requires' does not name a type; did you mean 'require'?
1797 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1797:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1834:1: error: 'constexpr' does not name a type
1834 | constexpr split_view(V base, Pattern pattern);
| ^~~~~~~~~
p1059.cpp:1834:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1836:10: error: 'forward_range' has not been declared
1836 | template<forward_range R>
| ^~~~~~~~~~~~~
p1059.cpp:1837:1: error: 'requires' does not name a type; did you mean 'require'?
1837 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~
| require
p1059.cpp:1837:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1841:1: error: 'constexpr' does not name a type
1841 | constexpr iterator begin();
| ^~~~~~~~~
p1059.cpp:1841:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1844:1: error: 'constexpr' does not name a type
1844 | constexpr subrange<iterator_t<V>> find-next (iterator_t<V> it); // exposition only
| ^~~~~~~~~
p1059.cpp:1844:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1846:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~
| ----
p1059.cpp:1846:6: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^
p1059.cpp:1846:6: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~
p1059.cpp:1846:6: error: structured binding declaration cannot be C++98 'auto'
p1059.cpp:1846:6: error: structured binding declaration cannot have type 'int'
p1059.cpp:1846:6: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
p1059.cpp:1846:23: error: 'search' is not a member of 'std::ranges::std::ranges'
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~
p1059.cpp:1846:39: error: 'it' was not declared in this scope; did you mean 'is'?
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~
| is
p1059.cpp:1846:51: error: 'end' is not a member of 'std::ranges::std::ranges'
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~
p1059.cpp:1846:55: error: 'base_' was not declared in this scope
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~
p1059.cpp:1846:30: error: 'subrange' was not declared in this scope
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~~~
p1059.cpp:1846:64: error: 'pattern_' was not declared in this scope
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~~~
p1059.cpp:1847:1: error: expected unqualified-id before 'if'
1847 | if (b != ranges::end(base_) && ranges::empty(pattern_)) {
| ^~
p1059.cpp:1851:1: error: expected unqualified-id before 'return'
1851 | return {b, e};
| ^~~~~~
p1059.cpp:1854:10: error: 'forward_range' has not been declared
1854 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1854:27: error: 'forward_range' has not been declared
1854 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1855:1: error: 'requires' does not name a type; did you mean 'require'?
1855 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
| require
p1059.cpp:1855:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1858:7: error: 'split_view' is not a class template
1858 | class split_view<V, Pattern>::iterator {
| ^~~~~~~~~~
p1059.cpp:1858:18: error: 'V' was not declared in this scope
1858 | class split_view<V, Pattern>::iterator {
| ^
p1059.cpp:1858:21: error: 'Pattern' was not declared in this scope
1858 | class split_view<V, Pattern>::iterator {
| ^~~~~~~
p1059.cpp:1858:7: error: 'split_view' has not been declared
1858 | class split_view<V, Pattern>::iterator {
| ^~~~~~~~~~
p1059.cpp:1858:40: error: expected unqualified-id before '{' token
1858 | class split_view<V, Pattern>::iterator {
| ^
p1059.cpp:1878:1: error: 'constexpr' does not name a type
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^~~~~~~~~
p1059.cpp:1878:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1880:1: error: 'with' does not name a type
1880 | with std::move(next).
| ^~~~
p1059.cpp:1883:1: error: 'constexpr' does not name a type
1883 | constexpr iterator operator++(int);
| ^~~~~~~~~
p1059.cpp:1883:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1885:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
1885 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:1885:6: error: 'tmp' does not name a type; did you mean 'tm'?
1885 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:1886:1: error: expected unqualified-id before '++' token
1886 | ++*this;
| ^~
p1059.cpp:1887:1: error: expected unqualified-id before 'return'
1887 | return tmp;
| ^~~~~~
p1059.cpp:1888:1: error: 'friend' used outside of class
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:1888:8: error: 'constexpr' does not name a type
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~~
p1059.cpp:1888:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1891:1: error: 'constexpr' does not name a type
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~~~~
p1059.cpp:1891:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1893:1: error: 'friend' used outside of class
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:1893:8: error: 'constexpr' does not name a type
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~~
p1059.cpp:1893:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1895:1: error: 'constexpr' does not name a type
1895 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:1895:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1897:1: error: 'cur_' does not name a type
1897 | cur_ = next_.begin();
| ^~~~
p1059.cpp:1898:1: error: expected unqualified-id before 'if'
1898 | if (cur_ != ranges::end(parent_->base_)) {
| ^~
p1059.cpp:1907:3: error: expected unqualified-id before 'else'
1907 | } else {
| ^~~~
p1059.cpp:1910:1: error: expected unqualified-id before 'return'
1910 | return *this;
| ^~~~~~
p1059.cpp:1911:1: error: 'friend' used outside of class
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:1911:8: error: 'constexpr' does not name a type
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~~
p1059.cpp:1911:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1913:1: error: expected unqualified-id before 'return'
1913 | return x.cur_ == y.cur_ && x.trailing_empty_ == y.trailing_empty_;
| ^~~~~~
p1059.cpp:1916:10: error: 'forward_range' has not been declared
1916 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1916:27: error: 'forward_range' has not been declared
1916 | template<forward_range V, forward_range Pattern>
| ^~~~~~~~~~~~~
p1059.cpp:1917:1: error: 'requires' does not name a type
1917 | requires view<V> && view<Pattern> &&
| ^~~~~~~~
p1059.cpp:1917:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:1949:14: error: 'forward_range' has not been declared
1949 | template<forward_range R>
| ^~~~~~~~~~~~~
p1059.cpp:1950:10: error: variable or field 'my_algo' declared void
1950 | void my_algo(R&& r) {
| ^~~~~~~
p1059.cpp:1950:18: error: 'R' was not declared in this scope
1950 | void my_algo(R&& r) {
| ^
p1059.cpp:1950:22: error: 'r' was not declared in this scope
1950 | void my_algo(R&& r) {
| ^
p1059.cpp:1956:14: error: 'view' has not been declared
1956 | template<view V>
| ^~~~
p1059.cpp:1957:14: error: expected constructor, destructor, or type conversion before '(' token
1957 | requires (!common_range<V> && copyable<iterator_t<V>>)
| ^
p1059.cpp:1980:18: error: expected ',' or '...' before '&&' token
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:25: error: 'common_view' does not name a type
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~~~~~~~
p1059.cpp:1980:36: error: expected constructor, destructor, or type conversion before '<' token
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^
p1059.cpp:1982:5: error: 'constexpr' does not name a type
1982 | constexpr explicit common_view(V base);
| ^~~~~~~~~
p1059.cpp:1982:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1986:5: error: 'constexpr' does not name a type
1986 | constexpr auto begin() {
| ^~~~~~~~~
p1059.cpp:1986:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1992:5: error: 'constexpr' does not name a type
1992 | constexpr auto begin() const requires range<const V> {
| ^~~~~~~~~
p1059.cpp:1992:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:1998:5: error: 'constexpr' does not name a type
1998 | constexpr auto end() {
| ^~~~~~~~~
p1059.cpp:1998:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2004:5: error: 'constexpr' does not name a type
2004 | constexpr auto end() const requires range<const V> {
| ^~~~~~~~~
p1059.cpp:2004:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2014:17: error: redefinition of 'std::vector<int> is'
2014 | vector<int> is {0,1,2,3,4};
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:2014:20: warning: extended initializer lists only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
2014 | vector<int> is {0,1,2,3,4};
| ^
p1059.cpp:2015:5: error: expected unqualified-id before 'for'
2015 | for (int i : is | views::reverse)
| ^~~
p1059.cpp:2019:14: error: 'view' has not been declared
2019 | template<view V>
| ^~~~
p1059.cpp:2020:5: error: 'requires' does not name a type
2020 | requires bidirectional_range<V>
| ^~~~~~~~
p1059.cpp:2020:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:2041:19: error: expected ',' or '...' before '&&' token
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:26: error: 'reverse_view' does not name a type
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~~~~~~~~
p1059.cpp:2041:38: error: expected constructor, destructor, or type conversion before '<' token
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^
p1059.cpp:2043:5: error: 'constexpr' does not name a type
2043 | constexpr explicit reverse_view(V base);
| ^~~~~~~~~
p1059.cpp:2043:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2044:5: error: 'constexpr' does not name a type
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^~~~~~~~~
p1059.cpp:2044:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2047:5: error: 'constexpr' does not name a type
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~~~~~~~~
p1059.cpp:2047:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2048:5: error: 'constexpr' does not name a type
2048 | constexpr auto begin() const requires common_range<const V>;
| ^~~~~~~~~
p1059.cpp:2048:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2050:5: error: 'constexpr' does not name a type
2050 | constexpr auto end() const requires common_range<const V>;
| ^~~~~~~~~
p1059.cpp:2050:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:2057:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
2057 | auto historical_figures = map {
| ^~~~
| ----
p1059.cpp:2057:10: error: 'historical_figures' does not name a type
2057 | auto historical_figures = map {
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:2063:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
2063 | auto names = historical_figures | views::elements<0>;
| ^~~~
| ----
p1059.cpp:2063:10: error: 'names' does not name a type
2063 | auto names = historical_figures | views::elements<0>;
| ^~~~~
p1059.cpp:2064:5: error: expected unqualified-id before 'for'
2064 | for (auto&& name : names) {
| ^~~
p1059.cpp:3476:5: error: 'constexpr' does not name a type
3476 | constexpr explicit inner-iterator(chunk_view& parent) noexcept;
| ^~~~~~~~~
p1059.cpp:3476:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3478:5: error: 'constexpr' does not name a type
3478 | constexpr const iterator_t<V>& base() const &;
| ^~~~~~~~~
p1059.cpp:3478:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3479:5: error: 'requires' does not name a type
3479 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^~~~~~~~
p1059.cpp:3479:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3481:5: error: expected unqualified-id before 'return'
3481 | return ranges::min(parent_->remainder_, ranges::end(parent_->base_) - *parent_->current_);
| ^~~~~~
p1059.cpp:3484:14: error: 'view' has not been declared
3484 | template<view V>
| ^~~~
p1059.cpp:3485:5: error: 'requires' does not name a type
3485 | requires input_range<V>
| ^~~~~~~~
p1059.cpp:3485:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3532:14: error: 'view' has not been declared
3532 | template<view V>
| ^~~~
p1059.cpp:3533:5: error: 'requires' does not name a type; did you mean 'require'?
3533 | requires forward_range<V>
| ^~~~~~~~
| require
p1059.cpp:3533:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3575:5: error: 'constexpr' does not name a type
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^~~~~~~~~
p1059.cpp:3575:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3576:5: error: 'constexpr' does not name a type
3576 | constexpr auto size() requires sized_range<V>;
| ^~~~~~~~~
p1059.cpp:3576:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3577:5: error: 'constexpr' does not name a type
3577 | constexpr auto size() const requires sized_range<const V>;
| ^~~~~~~~~
p1059.cpp:3577:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3579:5: error: expected unqualified-id before 'return'
3579 | return to_unsigned_like(div_ceil(ranges::distance(base_), n_));
| ^~~~~~
p1059.cpp:3582:14: error: 'view' has not been declared
3582 | template<view V>
| ^~~~
p1059.cpp:3583:5: error: 'requires' does not name a type; did you mean 'require'?
3583 | requires forward_range<V> template<bool Const>
| ^~~~~~~~
| require
p1059.cpp:3583:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3635:5: error: 'range_difference_t' does not name a type
3635 | range_difference_t<Base> missing = 0);
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:3637:5: error: expected unqualified-id before '->' token
3637 | ->n_, and missing_ with missing.
| ^~
p1059.cpp:3642:9: error: 'i' does not name a type
3642 | i.n_, and missing_ with i.missing_. constexpr iterator_t<Base> base() const;
| ^
p1059.cpp:3644:9: error: 'constexpr' does not name a type
3644 | constexpr value_type operator*() const;
| ^~~~~~~~~
p1059.cpp:3644:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3647:9: error: 'constexpr' does not name a type
3647 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:3647:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3650:9: error: 'missing_' does not name a type
3650 | missing_ = ranges::advance(current_, n_, end_);
| ^~~~~~~~
p1059.cpp:3651:9: error: expected unqualified-id before 'return'
3651 | return *this;
| ^~~~~~
p1059.cpp:3652:9: error: 'constexpr' does not name a type
3652 | constexpr iterator operator++(int);
| ^~~~~~~~~
p1059.cpp:3652:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3654:9: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3654 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:3654:14: error: 'tmp' does not name a type; did you mean 'tm'?
3654 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:3655:5: error: expected unqualified-id before '++' token
3655 | ++*this;
| ^~
p1059.cpp:3656:9: error: expected unqualified-id before 'return'
3656 | return tmp;
| ^~~~~~
p1059.cpp:3657:9: error: 'constexpr' does not name a type
3657 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~
p1059.cpp:3657:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3659:24: error: expected constructor, destructor, or type conversion before '(' token
3659 | ranges::advance(current_, missing_ - n_);
| ^
p1059.cpp:3660:9: error: 'missing_' does not name a type
3660 | missing_ = 0;
| ^~~~~~~~
p1059.cpp:3661:9: error: expected unqualified-id before 'return'
3661 | return *this;
| ^~~~~~
p1059.cpp:3662:9: error: 'constexpr' does not name a type
3662 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~
p1059.cpp:3662:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3664:9: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3664 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:3664:14: error: 'tmp' does not name a type; did you mean 'tm'?
3664 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:3665:5: error: expected unqualified-id before '--' token
3665 | --*this;
| ^~
p1059.cpp:3666:9: error: expected unqualified-id before 'return'
3666 | return tmp;
| ^~~~~~
p1059.cpp:3667:9: error: 'constexpr' does not name a type
3667 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3667:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3670:9: error: expected unqualified-id before 'if'
3670 | if (x > 0) {
| ^~
p1059.cpp:3672:7: error: expected unqualified-id before 'else'
3672 | } else if (x < 0) {
| ^~~~
p1059.cpp:3676:5: error: expected unqualified-id before 'return'
3676 | return *this;
| ^~~~~~
p1059.cpp:3677:5: error: 'constexpr' does not name a type
3677 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3677:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3679:5: error: 'requires' does not name a type
3679 | requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3679:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3681:5: error: 'friend' used outside of class
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:3681:12: error: 'constexpr' does not name a type
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~~
p1059.cpp:3681:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3683:5: error: 'friend' used outside of class
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:3683:12: error: 'constexpr' does not name a type
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~~~~
p1059.cpp:3683:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3685:5: error: 'friend' used outside of class
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3685:12: error: 'constexpr' does not name a type
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3685:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3687:5: error: 'friend' used outside of class
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3687:12: error: 'constexpr' does not name a type
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:3687:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3692:5: error: 'requires' does not name a type
3692 | requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3692:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3694:5: error: expected unqualified-id before 'return'
3694 | return y < x;
| ^~~~~~
p1059.cpp:3695:5: error: 'friend' used outside of class
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3695:12: error: 'constexpr' does not name a type
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3695:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3697:5: error: expected unqualified-id before 'return'
3697 | return !(y < x);
| ^~~~~~
p1059.cpp:3698:5: error: 'friend' used outside of class
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3698:12: error: 'constexpr' does not name a type
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:3698:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3701:5: error: expected unqualified-id before 'return'
3701 | return !(x < y);
| ^~~~~~
p1059.cpp:3702:5: error: 'friend' used outside of class
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~
| ------
p1059.cpp:3702:12: error: 'constexpr' does not name a type
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~~~~
p1059.cpp:3702:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3705:5: error: 'friend' used outside of class
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3705:12: error: 'constexpr' does not name a type
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3705:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3706:5: error: 'friend' used outside of class
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3706:12: error: 'constexpr' does not name a type
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3706:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3708:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3708 | auto r = i;
| ^~~~
| ----
p1059.cpp:3708:10: error: 'r' does not name a type
3708 | auto r = i;
| ^
p1059.cpp:3709:5: error: 'r' does not name a type
3709 | r += n;
| ^
p1059.cpp:3710:5: error: expected unqualified-id before 'return'
3710 | return r;
| ^~~~~~
p1059.cpp:3711:5: error: 'friend' used outside of class
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3711:12: error: 'constexpr' does not name a type
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3711:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3713:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3713 | auto r = i;
| ^~~~
| ----
p1059.cpp:3713:10: error: 'r' does not name a type
3713 | auto r = i;
| ^
p1059.cpp:3714:5: error: 'r' does not name a type
3714 | r -= n;
| ^
p1059.cpp:3715:5: error: expected unqualified-id before 'return'
3715 | return r;
| ^~~~~~
p1059.cpp:3716:5: error: 'friend' used outside of class
3716 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3716:12: error: 'constexpr' does not name a type
3716 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~
p1059.cpp:3716:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3718:5: error: 'requires' does not name a type
3718 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:3718:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3720:5: error: 'friend' used outside of class
3720 | friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3720:12: error: 'constexpr' does not name a type
3720 | friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~
p1059.cpp:3720:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3722:5: error: expected unqualified-id before 'return'
3722 | return -(y - x);
| ^~~~~~
p1059.cpp:3726:17: error: expected ',' or '...' before '&&' token
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~
p1059.cpp:3726:49: error: 'slide_view' does not name a type
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~~~~~~
p1059.cpp:3726:59: error: expected constructor, destructor, or type conversion before '<' token
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^
p1059.cpp:3728:5: error: 'constexpr' does not name a type
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^~~~~~~~~
p1059.cpp:3728:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3730:5: error: 'constexpr' does not name a type
3730 | constexpr auto begin()
| ^~~~~~~~~
p1059.cpp:3730:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3737:5: error: 'concept' does not name a type
3737 | concept slide-caches-nothing = random_access_range<V> && sized_range<V>;
| ^~~~~~~
p1059.cpp:3737:5: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3740:5: error: expected unqualified-id before '!' token
3740 | !slide-caches-nothing<V> && bidirectional_range<V> && common_range<V>;
| ^
p1059.cpp:3742:5: error: 'concept' does not name a type
3742 | concept slide-caches-first =
| ^~~~~~~
p1059.cpp:3742:5: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3744:14: error: 'forward_range' has not been declared
3744 | template<forward_range V>
| ^~~~~~~~~~~~~
p1059.cpp:3745:5: error: 'requires' does not name a type
3745 | requires view<V>
| ^~~~~~~~
p1059.cpp:3745:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3764:14: error: expected constructor, destructor, or type conversion before '(' token
3764 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^
p1059.cpp:3766:17: error: expected constructor, destructor, or type conversion before '(' token
3766 | ranges::next(ranges::begin(base_), n_ - 1, ranges::end(base_)), n_)
| ^
p1059.cpp:3772:5: error: 'constexpr' does not name a type
3772 | constexpr auto end()
| ^~~~~~~~~
p1059.cpp:3772:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3775:19: error: wrong number of template arguments (1, should be at least 2)
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3775:34: error: expected ')' before '(' token
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ~ ^
| )
p1059.cpp:3781:13: error: 'constexpr' does not name a type
3781 | constexpr auto size() requires sized_range<V>;
| ^~~~~~~~~
p1059.cpp:3781:13: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3782:13: error: 'constexpr' does not name a type
3782 | constexpr auto size() const requires sized_range<const V>;
| ^~~~~~~~~
p1059.cpp:3782:13: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3784:13: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3784 | auto sz = ranges::distance(base_) - n_ + 1;
| ^~~~
| ----
p1059.cpp:3784:18: error: 'sz' does not name a type
3784 | auto sz = ranges::distance(base_) - n_ + 1;
| ^~
p1059.cpp:3785:13: error: expected unqualified-id before 'if'
3785 | if (sz < 0) sz = 0;
| ^~
p1059.cpp:3786:13: error: expected unqualified-id before 'return'
3786 | return to-unsigned-like(sz);
| ^~~~~~
p1059.cpp:3789:22: error: 'forward_range' has not been declared
3789 | template<forward_range V>
| ^~~~~~~~~~~~~
p1059.cpp:3790:13: error: 'requires' does not name a type; did you mean 'require'?
3790 | requires view<V> template<bool Const>
| ^~~~~~~~
| require
p1059.cpp:3790:13: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3833:5: error: 'constexpr' does not name a type
3833 | constexpr
| ^~~~~~~~~
p1059.cpp:3833:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3836:5: error: 'constexpr' does not name a type
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~~~~~
p1059.cpp:3836:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3839:5: error: 'constexpr' does not name a type
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^~~~~~~~~
p1059.cpp:3839:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3842:5: error: 'constexpr' does not name a type
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~~~~~
p1059.cpp:3842:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3847:5: error: 'constexpr' does not name a type
3847 | constexpr auto operator*() const;
| ^~~~~~~~~
p1059.cpp:3847:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3849:5: error: 'constexpr' does not name a type
3849 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:3849:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3853:5: error: 'constexpr' does not name a type
3853 | constexpr iterator operator++(int);
| ^~~~~~~~~
p1059.cpp:3853:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3855:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3855 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:3855:10: error: 'tmp' does not name a type; did you mean 'tm'?
3855 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:3856:5: error: expected unqualified-id before '++' token
3856 | ++*this;
| ^~
p1059.cpp:3857:5: error: expected unqualified-id before 'return'
3857 | return tmp;
| ^~~~~~
p1059.cpp:3858:5: error: 'constexpr' does not name a type
3858 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~
p1059.cpp:3858:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3862:5: error: 'constexpr' does not name a type
3862 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~
p1059.cpp:3862:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3864:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3864 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:3864:10: error: 'tmp' does not name a type; did you mean 'tm'?
3864 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:3865:5: error: expected unqualified-id before '--' token
3865 | --*this;
| ^~
p1059.cpp:3866:5: error: expected unqualified-id before 'return'
3866 | return tmp;
| ^~~~~~
p1059.cpp:3867:5: error: 'constexpr' does not name a type
3867 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3867:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3869:5: error: 'constexpr' does not name a type
3869 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3869:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3871:5: error: 'constexpr' does not name a type
3871 | constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3871:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3874:5: error: 'friend' used outside of class
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3874:12: error: 'constexpr' does not name a type
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3874:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3876:5: error: 'friend' used outside of class
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3876:12: error: 'constexpr' does not name a type
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:3876:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3879:5: error: expected unqualified-id before 'return'
3879 | return y < x;
| ^~~~~~
p1059.cpp:3880:5: error: 'friend' used outside of class
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3880:12: error: 'constexpr' does not name a type
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3880:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3882:5: error: expected unqualified-id before 'return'
3882 | return !(y < x);
| ^~~~~~
p1059.cpp:3883:5: error: 'friend' used outside of class
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3883:12: error: 'constexpr' does not name a type
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~~~~
p1059.cpp:3883:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3886:5: error: expected unqualified-id before 'return'
3886 | return !(x < y);
| ^~~~~~
p1059.cpp:3887:5: error: 'friend' used outside of class
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~
| ------
p1059.cpp:3887:12: error: 'constexpr' does not name a type
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~~~~
p1059.cpp:3887:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3890:5: error: 'friend' used outside of class
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3890:12: error: 'constexpr' does not name a type
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3890:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3891:5: error: 'friend' used outside of class
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3891:12: error: 'constexpr' does not name a type
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3891:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3893:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3893 | auto r = i;
| ^~~~
| ----
p1059.cpp:3893:10: error: 'r' does not name a type
3893 | auto r = i;
| ^
p1059.cpp:3894:5: error: 'r' does not name a type
3894 | r += n;
| ^
p1059.cpp:3895:5: error: expected unqualified-id before 'return'
3895 | return r;
| ^~~~~~
p1059.cpp:3896:5: error: 'friend' used outside of class
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3896:12: error: 'constexpr' does not name a type
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~
p1059.cpp:3896:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3898:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
3898 | auto r = i;
| ^~~~
| ----
p1059.cpp:3898:10: error: 'r' does not name a type
3898 | auto r = i;
| ^
p1059.cpp:3899:5: error: 'r' does not name a type
3899 | r -= n;
| ^
p1059.cpp:3900:5: error: expected unqualified-id before 'return'
3900 | return r;
| ^~~~~~
p1059.cpp:3901:5: error: 'friend' used outside of class
3901 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3901:12: error: 'constexpr' does not name a type
3901 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~
p1059.cpp:3901:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3905:14: error: 'forward_range' has not been declared
3905 | template<forward_range V>
| ^~~~~~~~~~~~~
p1059.cpp:3906:5: error: 'requires' does not name a type; did you mean 'require'?
3906 | requires view<V>
| ^~~~~~~~
| require
p1059.cpp:3906:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1059.cpp:3924:5: error: 'constexpr' does not name a type
3924 | constexpr explicit sentinel(sentinel_t<V> end);
| ^~~~~~~~~
p1059.cpp:3924:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3926:5: error: 'friend' used outside of class
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:3926:12: error: 'constexpr' does not name a type
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~~~~~
p1059.cpp:3926:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3927:5: error: 'friend' used outside of class
3927 | friend constexpr range_difference_t<V>
| ^~~~~~
| ------
p1059.cpp:3927:12: error: 'constexpr' does not name a type
3927 | friend constexpr range_difference_t<V>
| ^~~~~~~~~
p1059.cpp:3927:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3931:5: error: 'friend' used outside of class
3931 | friend constexpr range_difference_t<V>
| ^~~~~~
| ------
p1059.cpp:3931:12: error: 'constexpr' does not name a type
3931 | friend constexpr range_difference_t<V>
| ^~~~~~~~~
p1059.cpp:3931:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3938:5: error: 'adjacent' does not name a type
3938 | adjacent elements for which the predicate returns false.
| ^~~~~~~~
p1059.cpp:3941:1: error: expected unqualified-id before 'for'
3941 | for (auto r : v | views::chunk_by(ranges::less_equal {})) {
| ^~~
p1059.cpp:3941:56: error: expected unqualified-id before ')' token
3941 | for (auto r : v | views::chunk_by(ranges::less_equal {})) {
| ^
p1059.cpp:3953:14: error: 'forward_range' has not been declared
3953 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^~~~~~~~~~~~~
p1059.cpp:3953:31: error: 'indirect_binary_predicate' has not been declared
3953 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3953:56: error: expected '>' before '<' token
3953 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^
p1059.cpp:3955:73: error: expected unqualified-id before '{' token
3955 | class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
| ^
p1059.cpp:3972:20: error: expected ',' or '...' before '&&' token
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~
p1059.cpp:3972:33: error: 'chunk_by_view' does not name a type
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~~~
p1059.cpp:3972:46: error: expected constructor, destructor, or type conversion before '<' token
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3974:5: error: 'constexpr' does not name a type
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^~~~~~~~~
p1059.cpp:3974:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3977:5: error: expected unqualified-id before 'return'
3977 | return *pred_;
| ^~~~~~
p1059.cpp:3978:5: error: 'constexpr' does not name a type
3978 | constexpr iterator begin();
| ^~~~~~~~~
p1059.cpp:3978:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3982:5: error: 'constexpr' does not name a type
3982 | constexpr auto end();
| ^~~~~~~~~
p1059.cpp:3982:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3984:5: error: expected unqualified-id before 'if'
3984 | if constexpr (common_range<V>) {
| ^~
p1059.cpp:3986:7: error: expected unqualified-id before 'else'
3986 | } else {
| ^~~~
p1059.cpp:3989:5: error: 'constexpr' does not name a type
3989 | constexpr iterator_t<V> find-next(iterator_t<V> current);
| ^~~~~~~~~
p1059.cpp:3989:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:3992:17: error: expected constructor, destructor, or type conversion before '(' token
3992 | ranges::next(ranges::adjacent_find(current, ranges::end(base_), not_fn(ref(*pred_))), 1, ranges::end(base_))
| ^
p1059.cpp:4003:14: error: 'forward_range' has not been declared
4003 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^~~~~~~~~~~~~
p1059.cpp:4003:31: error: 'indirect_binary_predicate' has not been declared
4003 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:4003:56: error: expected '>' before '<' token
4003 | template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
| ^
p1059.cpp:4004:82: error: expected unqualified-id before '{' token
4004 | requires view<V> && is_object_v<Pred> class chunk_by_view<V, Pred>::iterator {
| ^
p1059.cpp:4028:5: error: 'constexpr' does not name a type
4028 | constexpr iterator(chunk_by_view& parent, iterator_t<V> current, iterator_t<V> next);
| ^~~~~~~~~
p1059.cpp:4028:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4030:5: error: 'constexpr' does not name a type
4030 | constexpr value_type operator*() const;
| ^~~~~~~~~
p1059.cpp:4030:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4032:5: error: 'constexpr' does not name a type
4032 | constexpr iterator& operator++();
| ^~~~~~~~~
p1059.cpp:4032:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4035:5: error: 'current_' does not name a type
4035 | current_ = next_;
| ^~~~~~~~
p1059.cpp:4036:5: error: 'next_' does not name a type
4036 | next_ = parent_->find-next(current_);
| ^~~~~
p1059.cpp:4037:5: error: expected unqualified-id before 'return'
4037 | return *this;
| ^~~~~~
p1059.cpp:4038:5: error: 'constexpr' does not name a type
4038 | constexpr iterator operator++(int);
| ^~~~~~~~~
p1059.cpp:4038:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4040:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
4040 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:4040:10: error: 'tmp' does not name a type; did you mean 'tm'?
4040 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:4041:5: error: expected unqualified-id before '++' token
4041 | ++*this;
| ^~
p1059.cpp:4042:5: error: expected unqualified-id before 'return'
4042 | return tmp;
| ^~~~~~
p1059.cpp:4043:5: error: 'constexpr' does not name a type
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~
p1059.cpp:4043:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4045:5: error: 'next_' does not name a type
4045 | next_ = current_;
| ^~~~~
p1059.cpp:4046:5: error: 'current_' does not name a type
4046 | current_ = parent_->find-prev(next_);
| ^~~~~~~~
p1059.cpp:4047:5: error: expected unqualified-id before 'return'
4047 | return *this;
| ^~~~~~
p1059.cpp:4048:5: error: 'constexpr' does not name a type
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~
p1059.cpp:4048:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4050:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
4050 | auto tmp = *this;
| ^~~~
| ----
p1059.cpp:4050:10: error: 'tmp' does not name a type; did you mean 'tm'?
4050 | auto tmp = *this;
| ^~~
| tm
p1059.cpp:4051:5: error: expected unqualified-id before '--' token
4051 | --*this;
| ^~
p1059.cpp:4052:5: error: expected unqualified-id before 'return'
4052 | return tmp;
| ^~~~~~
p1059.cpp:4053:5: error: 'friend' used outside of class
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:4053:12: error: 'constexpr' does not name a type
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~~
p1059.cpp:4053:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1059.cpp:4055:5: error: 'friend' used outside of class
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:4055:12: error: 'constexpr' does not name a type
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~~~~
p1059.cpp:4055:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
$ g++ p1059.cpp -std=2b -o p1059g -I. -Wall
p1059.cpp:62:75: error: extended character — is not valid in an identifier
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^
p1059.cpp:3609:9: error: extended character is not valid in an identifier
3609 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^
p1059.cpp:3611:9: error: extended character is not valid in an identifier
3611 | constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
| ^
p1059.cpp:3775:79: error: extended character — is not valid in an identifier
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ^
p1059.cpp:3776:89: error: extended character — is not valid in an identifier
3776 | iterator<false>(ranges::prev(ranges::end(base_), n_ - 1, ranges::begin(base_)), n_) — Otherwise, if V models common_range,
| ^
p1059.cpp:3777:69: error: extended character — is not valid in an identifier
3777 | iterator<false>(ranges::end(base_), ranges::end(base_), n_) — Otherwise, sentinel (ranges::end(base_)).
| ^
p1059.cpp:3807:21: error: extended character — is not valid in an identifier
3807 | — If Base models random_access_range, then iterator_concept denotes random_access_iterator_- tag.
| ^
p1059.cpp:3808:21: error: extended character — is not valid in an identifier
3808 | — Otherwise, if Base models bidirectional_range, then iterator_concept denotes bidirectional_- iterator_tag.
| ^
p1059.cpp:3812:21: error: extended character is not valid in an identifier
3812 | constexpr iterator& operator++();
| ^
p1059.cpp:3814:21: error: extended character is not valid in an identifier
3814 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^
p1059.cpp:3816:21: error: extended character is not valid in an identifier
3816 | constexpr iterator& operator+=(difference_type x) constexpr iterator& operator-=(difference_type x)
| ^
p1059.cpp:3817:21: error: extended character is not valid in an identifier
3817 | constexpr requires random_access_range<Base>;
| ^
p1059.cpp:3818:66: error: extended character is not valid in an identifier
3818 | constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
| ^
p1059.cpp:26:1: error: expected unqualified-id before 'for'
26 | for (int i : ints | views::filter(even) | views::transform(square)) {
| ^~~
p1059.cpp:43:11: error: expected 'auto' or 'decltype(auto)' after 'copyable'
43 | constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
| ^~~~~~~~
p1059.cpp:43:19: error: expected unqualified-id before '-' token
43 | constexpr copyable-box() noexcept(is_nothrow_default_constructible_v<T>) requires default_initializable<T>
| ^
p1059.cpp:44:24: error: expected unqualified-id before '{' token
44 | copyable-box{in_place} {}
| ^
p1059.cpp:46:11: error: expected 'auto' or 'decltype(auto)' after 'copyable'
46 | constexpr copyable-box& operator=(const copyable-box& that) noexcept(is_nothrow_copy_constructible_v<T>) {
| ^~~~~~~~
p1059.cpp:46:19: error: expected unqualified-id before '-' token
46 | constexpr copyable-box& operator=(const copyable-box& that) noexcept(is_nothrow_copy_constructible_v<T>) {
| ^
p1059.cpp:54:11: error: expected 'auto' or 'decltype(auto)' after 'copyable'
54 | constexpr copyable-box& operator=(copyable-box&& that) noexcept(is_nothrow_move_constructible_v<T>) {
| ^~~~~~~~
p1059.cpp:54:19: error: expected unqualified-id before '-' token
54 | constexpr copyable-box& operator=(copyable-box&& that) noexcept(is_nothrow_move_constructible_v<T>) {
| ^
p1059.cpp:62:11: error: 'non' does not name a type
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^~~
p1059.cpp:62:75: error: '\U00002014' does not name a type
62 | constexpr non-propagating-cache(const non-propagating-cache&) noexcept {} — The move constructor is equivalent to:
| ^
p1059.cpp:67:11: error: 'non' does not name a type
67 | constexpr non-propagating-cache& operator=(const non-propagating-cache& other) noexcept {
| ^~~
p1059.cpp:81:8: error: expected constructor, destructor, or type conversion before ';' token
81 | reset();
| ^
p1059.cpp:82:1: error: expected unqualified-id before 'return'
82 | return *this;
| ^~~~~~
p1059.cpp:83:1: error: expected declaration before '}' token
83 | }
| ^
p1059.cpp:85:11: error: 'non' does not name a type
85 | constexpr non-propagating-cache& operator=(non-propagating-cache&& other) noexcept {
| ^~~
p1059.cpp:91:11: error: 'T' does not name a type
91 | constexpr T& emplace-deref (const I& i); // exposition only
| ^
p1059.cpp:112:14: error: 'different' has not been declared
112 | template<different-from<ref_view> T> requires see_below
| ^~~~~~~~~
p1059.cpp:112:23: error: expected '>' before '-' token
112 | template<different-from<ref_view> T> requires see_below
| ^
p1059.cpp:113:25: error: expected ')' before '&&' token
113 | constexpr ref_view(T&& t);
| ~ ^~
| )
p1059.cpp:133:2: error: expected ';' after class definition
133 | }
| ^
| ;
p1059.cpp:136:6: error: variable or field 'FUN' declared void
136 | void FUN(R&);
| ^~~
p1059.cpp:136:10: error: 'R' was not declared in this scope
136 | void FUN(R&);
| ^
p1059.cpp:136:12: error: expected primary-expression before ')' token
136 | void FUN(R&);
| ^
p1059.cpp:137:6: error: variable or field 'FUN' declared void
137 | void FUN(R&&) = delete;
| ^~~
p1059.cpp:137:10: error: 'R' was not declared in this scope
137 | void FUN(R&&) = delete;
| ^
p1059.cpp:137:13: error: expected primary-expression before ')' token
137 | void FUN(R&&) = delete;
| ^
p1059.cpp:139:16: error: 'T' was not declared in this scope
139 | convertible_to<T, R&> && requires { FUN(declval<T>()); }
| ^
p1059.cpp:139:19: error: 'R' was not declared in this scope
139 | convertible_to<T, R&> && requires { FUN(declval<T>()); }
| ^
p1059.cpp:139:1: error: parse error in template argument list
139 | convertible_to<T, R&> && requires { FUN(declval<T>()); }
| ^~~~~~~~~~~~~~~~~~~~~
p1059.cpp:139:1: error: template argument 1 is invalid
p1059.cpp:139:1: error: template argument 2 is invalid
p1059.cpp:139:1: error: '<expression error>' does not name a type
p1059.cpp:140:55: error: 'R' was not declared in this scope
140 | constexpr auto data() const requires contiguous_range<R>
| ^
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:55: error: 'R' was not declared in this scope
p1059.cpp:140:38: error: 'contiguous_range' was not declared in this scope; did you mean 'std::ranges::contiguous_range'?
140 | constexpr auto data() const requires contiguous_range<R>
| ^~~~~~~~~~~~~~~~
| std::ranges::contiguous_range
In file included from /usr/local/include/c++/12.1.0/string_view:50,
from /usr/local/include/c++/12.1.0/bits/basic_string.h:48,
from /usr/local/include/c++/12.1.0/string:53,
from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
from /usr/local/include/c++/12.1.0/ios:42,
from /usr/local/include/c++/12.1.0/ostream:38,
from /usr/local/include/c++/12.1.0/iostream:39,
from N4910.h:2,
from p1059.cpp:10:
/usr/local/include/c++/12.1.0/bits/ranges_base.h:680:13: note: 'std::ranges::contiguous_range' declared here
680 | concept contiguous_range
| ^~~~~~~~~~~~~~~~
p1059.cpp:140:55: error: 'R' was not declared in this scope
140 | constexpr auto data() const requires contiguous_range<R>
| ^
p1059.cpp:140:29: error: expression must be enclosed in parentheses
140 | constexpr auto data() const requires contiguous_range<R>
| ^~~~~~~~
p1059.cpp:140:38: error: expected initializer before 'contiguous_range'
140 | constexpr auto data() const requires contiguous_range<R>
| ^~~~~~~~~~~~~~~~
p1059.cpp:144:1: error: expected declaration before '}' token
144 | };
| ^
p1059.cpp:146:17: error: 'ref_view' does not name a type
146 | ref_view(R&) -> ref_view<R>;
| ^~~~~~~~
p1059.cpp:146:25: error: expected constructor, destructor, or type conversion before '<' token
146 | ref_view(R&) -> ref_view<R>;
| ^
p1059.cpp:147:1: error: expected declaration before '}' token
147 | }
| ^
p1059.cpp:148:10: error: 'different' has not been declared
148 | template<different-from<ref_view> T> requires see_below
| ^~~~~~~~~
p1059.cpp:148:19: error: expected '>' before '-' token
148 | template<different-from<ref_view> T> requires see_below
| ^
p1059.cpp:149:11: error: ISO C++ forbids declaration of 'ref_view' with no type [-fpermissive]
149 | constexpr ref_view(T&& t);
| ^~~~~~~~
p1059.cpp:149:20: error: 'T' was not declared in this scope
149 | constexpr ref_view(T&& t);
| ^
p1059.cpp:149:24: error: 't' was not declared in this scope; did you mean 'tm'?
149 | constexpr ref_view(T&& t);
| ^
| tm
p1059.cpp:154:26: error: 'is' was not declared in this scope; did you mean 'ws'?
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^~
| ws
p1059.cpp:154:29: error: 'initializer' was not declared in this scope; did you mean 'initializer_list'?
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^~~~~~~~~~~
| initializer_list
p1059.cpp:154:41: error: 'list' was not declared in this scope
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^~~~
p1059.cpp:11:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
10 | #include "N4910.h"
+++ |+#include <list>
11 |
p1059.cpp:154:48: error: expected primary-expression before '>' token
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^
p1059.cpp:154:49: error: expected primary-expression before ')' token
154 | requires movable<R> && (!is-initializer-list <R>) // see 26.4.5 class owning_view : public view_interface<owning_view<R>>
| ^
p1059.cpp:155:1: error: expected unqualified-id before '{' token
155 | { private:
| ^
p1059.cpp:194:11: error: ISO C++ forbids declaration of 'owning_view' with no type [-fpermissive]
194 | constexpr owning_view(R&& t);
| ^~~~~~~~~~~
p1059.cpp:194:23: error: 'R' was not declared in this scope
194 | constexpr owning_view(R&& t);
| ^
p1059.cpp:194:27: error: 't' was not declared in this scope; did you mean 'tm'?
194 | constexpr owning_view(R&& t);
| ^
| tm
p1059.cpp:202:14: error: 'views' has not been declared
202 | auto evens = views::filter(is, [](int i) {
| ^~~~~
p1059.cpp:205:1: error: expected unqualified-id before 'for'
205 | for (int i : evens)
| ^~~
p1059.cpp:218:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
218 | constexpr iterator begin();
| ^~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/stl_construct.h:61,
from /usr/local/include/c++/12.1.0/bits/char_traits.h:46,
from /usr/local/include/c++/12.1.0/ios:40:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:218:15: error: deduced class type 'iterator' in function return type
218 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp: In member function 'constexpr V std::ranges::filter_view<V, Pred>::base() const & requires copy_constructible<V>':
p1059.cpp:216:72: error: 'base_' was not declared in this scope; did you mean 'base'?
216 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~
| base
p1059.cpp: In member function 'constexpr V std::ranges::filter_view<V, Pred>::base() &&':
p1059.cpp:216:122: error: 'base_' was not declared in this scope; did you mean 'base'?
216 | requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~~
| base
p1059.cpp: In member function 'constexpr auto std::ranges::filter_view<V, Pred>::end()':
p1059.cpp:221:48: error: 'base_' was not declared in this scope; did you mean 'base'?
221 | return iterator{*this, ranges::end(base_)};
| ^~~~~
| base
p1059.cpp:223:20: error: 'sentinel' was not declared in this scope; did you mean 'sentinel_t'?
223 | return sentinel{*this};
| ^~~~~~~~
| sentinel_t
p1059.cpp:223:28: error: expected ';' before '{' token
223 | return sentinel{*this};
| ^
p1059.cpp:222:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
222 | else
| ^~~~
p1059.cpp:223:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
223 | return sentinel{*this};
| ^
p1059.cpp:223:34: error: expected ';' before '}' token
223 | return sentinel{*this};
| ^
p1059.cpp: At global scope:
p1059.cpp:227:39: error: 'views' was not declared in this scope; did you mean 'view'?
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:227:60: error: wrong number of template arguments (1, should be 2)
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:211:7: note: provided for 'template<class V, class Pred> requires (input_range<V>) && (indirect_unary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::filter_view'
211 | class filter_view : public view_interface<filter_view<V, Pred>> {
| ^~~~~~~~~~~
p1059.cpp:227:39: error: 'views' was not declared in this scope; did you mean 'view'?
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:227:60: error: wrong number of template arguments (1, should be 2)
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:211:7: note: provided for 'template<class V, class Pred> requires (input_range<V>) && (indirect_unary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::filter_view'
211 | class filter_view : public view_interface<filter_view<V, Pred>> {
| ^~~~~~~~~~~
p1059.cpp:227:39: error: 'views' was not declared in this scope; did you mean 'view'?
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:227:60: error: wrong number of template arguments (1, should be 2)
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:211:7: note: provided for 'template<class V, class Pred> requires (input_range<V>) && (indirect_unary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::filter_view'
211 | class filter_view : public view_interface<filter_view<V, Pred>> {
| ^~~~~~~~~~~
p1059.cpp:227:39: error: 'views' was not declared in this scope; did you mean 'view'?
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:227:60: error: wrong number of template arguments (1, should be 2)
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:211:7: note: provided for 'template<class V, class Pred> requires (input_range<V>) && (indirect_unary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::filter_view'
211 | class filter_view : public view_interface<filter_view<V, Pred>> {
| ^~~~~~~~~~~
p1059.cpp:227:27: error: invalid template-id
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~
p1059.cpp:227:39: error: 'views' has not been declared
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^~~~~
p1059.cpp:227:53: error: expected primary-expression before '>' token
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:227:53: error: trailing return type 'filter_view<...auto...>' of deduction guide is not a specialization of 'std::ranges::filter_view<V, Pred>'
p1059.cpp:227:54: error: expected ';' before ',' token
227 | filter_view(R&&, Pred) -> filter_view<views::all_t<R>, Pred>;
| ^
| ;
p1059.cpp:229:11: error: ISO C++ forbids declaration of 'filter_view' with no type [-fpermissive]
229 | constexpr filter_view(V base, Pred pred);
| ^~~~~~~~~~~
p1059.cpp:229:23: error: 'V' was not declared in this scope
229 | constexpr filter_view(V base, Pred pred);
| ^
p1059.cpp:229:31: error: 'Pred' was not declared in this scope
229 | constexpr filter_view(V base, Pred pred);
| ^~~~
p1059.cpp:229:40: error: expression list treated as compound expression in initializer [-fpermissive]
229 | constexpr filter_view(V base, Pred pred);
| ^
p1059.cpp:231:17: error: 'Pred' does not name a type
231 | constexpr const Pred& pred() const;
| ^~~~
p1059.cpp:233:1: error: expected unqualified-id before 'return'
233 | return *pred_;
| ^~~~~~
p1059.cpp:234:1: error: 'V' does not name a type
234 | V base_ = V();
| ^
p1059.cpp:235:1: error: expected 'auto' or 'decltype(auto)' after 'copyable'
235 | copyable-box<Pred> pred_;
| ^~~~~~~~
p1059.cpp:235:9: error: expected unqualified-id before '-' token
235 | copyable-box<Pred> pred_;
| ^
p1059.cpp:244:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
244 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:244:11: error: deduced class type 'iterator' in function return type
244 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:251:67: error: invalid class name in declaration of 'class std::ranges::filter_view<V, Pred>::iterator'
251 | requires view<V> && is_object_v<Pred> class filter_view<V, Pred>::iterator {
| ^~~~~~~~
p1059.cpp:286:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
286 | constexpr iterator(filter_view& parent, iterator_t<V> current);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:286:31: error: expected ')' before '&' token
286 | constexpr iterator(filter_view& parent, iterator_t<V> current);
| ~ ^
| )
p1059.cpp:288:28: error: 'V' was not declared in this scope
288 | constexpr const iterator_t<V>& base() const & noexcept;
| ^
p1059.cpp:288:28: error: 'V' was not declared in this scope
p1059.cpp:288:28: error: 'V' was not declared in this scope
p1059.cpp:288:28: error: 'V' was not declared in this scope
p1059.cpp:288:28: error: 'V' was not declared in this scope
p1059.cpp:288:28: error: 'V' was not declared in this scope
p1059.cpp:288:17: error: 'iterator_t' does not name a type; did you mean 'error_t'?
288 | constexpr const iterator_t<V>& base() const & noexcept;
| ^~~~~~~~~~
| error_t
p1059.cpp:290:1: error: expected unqualified-id before 'return'
290 | return current_;
| ^~~~~~
p1059.cpp:291:22: error: 'V' was not declared in this scope
291 | constexpr iterator_t<V> base() &&;
| ^
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:22: error: 'V' was not declared in this scope
p1059.cpp:291:11: error: 'iterator_t' does not name a type; did you mean 'error_t'?
291 | constexpr iterator_t<V> base() &&;
| ^~~~~~~~~~
| error_t
p1059.cpp:293:1: error: expected unqualified-id before 'return'
293 | return std::move(current_);
| ^~~~~~
p1059.cpp:294:29: error: 'V' was not declared in this scope
294 | constexpr range_reference_t<V> operator*() const;
| ^
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:29: error: 'V' was not declared in this scope
p1059.cpp:294:11: error: 'range_reference_t' does not name a type
294 | constexpr range_reference_t<V> operator*() const;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:296:1: error: expected unqualified-id before 'return'
296 | return *current_;
| ^~~~~~
p1059.cpp:297:22: error: 'V' was not declared in this scope
297 | constexpr iterator_t<V> operator->() const
| ^
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:22: error: 'V' was not declared in this scope
p1059.cpp:297:11: error: 'iterator_t' does not name a type; did you mean 'error_t'?
297 | constexpr iterator_t<V> operator->() const
| ^~~~~~~~~~
| error_t
p1059.cpp:300:1: error: expected unqualified-id before 'return'
300 | return current_;
| ^~~~~~
p1059.cpp:301:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
301 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:301:11: error: deduced class type 'iterator' in function return type
301 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:303:1: error: 'current_' does not name a type
303 | current_ = ranges::find_if(std::move(++current_), ranges::end(parent_->base_), ref(*parent_->pred_));
| ^~~~~~~~
p1059.cpp:304:1: error: expected unqualified-id before 'return'
304 | return *this;
| ^~~~~~
p1059.cpp:305:16: error: 'constexpr void operator++(int)' must have an argument of class or enumerated type
305 | constexpr void operator++(int);
| ^~~~~~~~
p1059.cpp:307:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:307:59: error: 'V' was not declared in this scope
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:59: error: 'V' was not declared in this scope
p1059.cpp:307:45: error: 'forward_range' was not declared in this scope; did you mean 'std::ranges::forward_range'?
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^~~~~~~~~~~~~
| std::ranges::forward_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:665:13: note: 'std::ranges::forward_range' declared here
665 | concept forward_range
| ^~~~~~~~~~~~~
p1059.cpp:307:59: error: 'V' was not declared in this scope
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^
p1059.cpp:307:36: error: expression must be enclosed in parentheses
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^~~~~~~~
p1059.cpp:307:45: error: expected initializer before 'forward_range'
307 | constexpr iterator operator++(int) requires forward_range<V>;
| ^~~~~~~~~~~~~
p1059.cpp:309:13: error: invalid use of 'this' at top level
309 | auto tmp = *this;
| ^~~~
p1059.cpp:310:1: error: expected unqualified-id before '++' token
310 | ++*this;
| ^~
p1059.cpp:311:1: error: expected unqualified-id before 'return'
311 | return tmp;
| ^~~~~~
p1059.cpp:312:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:312:63: error: 'V' was not declared in this scope
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:63: error: 'V' was not declared in this scope
p1059.cpp:312:43: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:312:63: error: 'V' was not declared in this scope
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^
p1059.cpp:312:34: error: expression must be enclosed in parentheses
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~
p1059.cpp:312:43: error: expected initializer before 'bidirectional_range'
312 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:314:1: error: expected unqualified-id before 'do'
314 | do --current_;
| ^~
p1059.cpp:315:1: error: expected unqualified-id before 'while'
315 | while (!invoke(*parent_->pred_, *current_));
| ^~~~~
p1059.cpp:316:1: error: expected unqualified-id before 'return'
316 | return *this;
| ^~~~~~
p1059.cpp:317:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:317:65: error: 'V' was not declared in this scope
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:65: error: 'V' was not declared in this scope
p1059.cpp:317:45: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:317:65: error: 'V' was not declared in this scope
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^
p1059.cpp:317:36: error: expression must be enclosed in parentheses
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~
p1059.cpp:317:45: error: expected initializer before 'bidirectional_range'
317 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:319:13: error: invalid use of 'this' at top level
319 | auto tmp = *this;
| ^~~~
p1059.cpp:320:1: error: expected unqualified-id before '--' token
320 | --*this;
| ^~
p1059.cpp:321:1: error: expected unqualified-id before 'return'
321 | return tmp;
| ^~~~~~
p1059.cpp:322:1: error: 'friend' used outside of class
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~~
| ------
p1059.cpp:322:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:322:51: error: expected ')' before ',' token
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ~ ^
| )
p1059.cpp:322:23: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~~~~
p1059.cpp:322:53: error: expected unqualified-id before 'const'
322 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
| ^~~~~
p1059.cpp:324:1: error: expected unqualified-id before 'return'
324 | return x.current_ == y.current_;
| ^~~~~~
p1059.cpp:325:1: error: 'friend' used outside of class
325 | friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
| ^~~~~~
| ------
p1059.cpp:325:43: error: 'V' was not declared in this scope
325 | friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
| ^
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:43: error: 'V' was not declared in this scope
p1059.cpp:325:18: error: 'range_rvalue_reference_t' does not name a type
325 | friend constexpr range_rvalue_reference_t<V> iter_move(const iterator& i)
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:328:1: error: expected unqualified-id before 'return'
328 | return ranges::iter_move(i.current_);
| ^~~~~~
p1059.cpp:329:1: error: 'friend' used outside of class
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ^~~~~~
| ------
p1059.cpp:329:33: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:329:50: error: expected ')' before ',' token
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ~ ^
| )
p1059.cpp:329:52: error: expected unqualified-id before 'const'
329 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) requires indirectly_swappable<iterator_t<V>>;
| ^~~~~
p1059.cpp:331:18: error: expected constructor, destructor, or type conversion before '(' token
331 | ranges::iter_swap(x.current_, y.current_).
| ^
p1059.cpp:346:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:346:11: error: 'explicit' outside class declaration
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:346:42: error: 'parent' was not declared in this scope
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~
p1059.cpp:348:22: error: 'V' was not declared in this scope
348 | constexpr sentinel_t<V> base() const;
| ^
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:22: error: 'V' was not declared in this scope
p1059.cpp:348:11: error: 'sentinel_t' does not name a type
348 | constexpr sentinel_t<V> base() const;
| ^~~~~~~~~~
p1059.cpp:350:1: error: 'friend' used outside of class
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:350:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:350:51: error: expected ')' before ',' token
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ~ ^
| )
p1059.cpp:350:23: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:350:53: error: expected unqualified-id before 'const'
350 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
p1059.cpp:354:13: error: redefinition of 'std::vector<int> is'
354 | vector<int> is{ 0, 1, 2, 3, 4 };
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:355:16: error: 'views' has not been declared
355 | auto squares = views::transform(is, [](int i) {
| ^~~~~
p1059.cpp:358:1: error: expected unqualified-id before 'for'
358 | for (int i : squares)
| ^~~
p1059.cpp:364:48: error: 'can' was not declared in this scope; did you mean 'tan'?
364 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
| tan
p1059.cpp:364:52: error: 'reference' was not declared in this scope; did you mean 'is_reference'?
364 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~~~~~~~
| is_reference
p1059.cpp:364:45: error: expression must be enclosed in parentheses
364 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~
p1059.cpp:364:48: error: 'can' does not name a type
364 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:42: error: 'views' was not declared in this scope; did you mean 'view'?
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~
| view
p1059.cpp:398:27: error: 'transform_view' does not name a type
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^~~~~~~~~~~~~~
p1059.cpp:398:41: error: expected constructor, destructor, or type conversion before '<' token
398 | transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;
| ^
p1059.cpp:400:11: error: ISO C++ forbids declaration of 'transform_view' with no type [-fpermissive]
400 | constexpr transform_view(V base, F fun);
| ^~~~~~~~~~~~~~
p1059.cpp:400:26: error: 'V' was not declared in this scope
400 | constexpr transform_view(V base, F fun);
| ^
p1059.cpp:400:34: error: 'F' was not declared in this scope
400 | constexpr transform_view(V base, F fun);
| ^
p1059.cpp:400:39: error: expression list treated as compound expression in initializer [-fpermissive]
400 | constexpr transform_view(V base, F fun);
| ^
p1059.cpp:402:1: error: 'V' does not name a type
402 | V base_ = V();
| ^
p1059.cpp:403:1: error: expected 'auto' or 'decltype(auto)' after 'copyable'
403 | copyable-box<F> fun_;
| ^~~~~~~~
p1059.cpp:403:9: error: expected unqualified-id before '-' token
403 | copyable-box<F> fun_;
| ^
p1059.cpp:405:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
405 | constexpr iterator<false> begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:405:25: error: wrong number of template arguments (1, should be at least 2)
405 | constexpr iterator<false> begin();
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:407:1: error: expected unqualified-id before 'return'
407 | return iterator<false> {*this, ranges::begin(base_)};
| ^~~~~~
p1059.cpp:408:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:408:24: error: wrong number of template arguments (1, should be at least 2)
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:61: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:408:49: error: 'range' was not declared in this scope; did you mean 'std::ranges::range'?
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^~~~~
| std::ranges::range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:583:13: note: 'std::ranges::range' declared here
583 | concept range = requires(_Tp& __t)
| ^~~~~
p1059.cpp:408:40: error: expression must be enclosed in parentheses
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^~~~~~~~
p1059.cpp:408:49: error: expected initializer before 'range'
408 | constexpr iterator<true> begin() const requires range<const V> &&
| ^~~~~
p1059.cpp:411:1: error: expected unqualified-id before 'return'
411 | return iterator<true> {*this, ranges::begin(base_)};
| ^~~~~~
p1059.cpp:412:11: error: 'sentinel' does not name a type
412 | constexpr sentinel<false> end();
| ^~~~~~~~
p1059.cpp:414:1: error: expected unqualified-id before 'return'
414 | return sentinel<false> {ranges::end(base_)};
| ^~~~~~
p1059.cpp:415:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
415 | constexpr iterator<false> end() requires common_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:415:25: error: wrong number of template arguments (1, should be at least 2)
415 | constexpr iterator<false> end() requires common_range<V>;
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:415:55: error: 'V' was not declared in this scope
415 | constexpr iterator<false> end() requires common_range<V>;
| ^
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:55: error: 'V' was not declared in this scope
p1059.cpp:415:42: error: 'common_range' was not declared in this scope; did you mean 'std::ranges::common_range'?
415 | constexpr iterator<false> end() requires common_range<V>;
| ^~~~~~~~~~~~
| std::ranges::common_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:689:13: note: 'std::ranges::common_range' declared here
689 | concept common_range
| ^~~~~~~~~~~~
p1059.cpp:415:55: error: 'V' was not declared in this scope
415 | constexpr iterator<false> end() requires common_range<V>;
| ^
p1059.cpp:415:33: error: expression must be enclosed in parentheses
415 | constexpr iterator<false> end() requires common_range<V>;
| ^~~~~~~~
p1059.cpp:415:42: error: expected initializer before 'common_range'
415 | constexpr iterator<false> end() requires common_range<V>;
| ^~~~~~~~~~~~
p1059.cpp:417:1: error: expected unqualified-id before 'return'
417 | return iterator<false> {*this, ranges::end(base_)};
| ^~~~~~
p1059.cpp:418:11: error: 'sentinel' does not name a type
418 | constexpr sentinel<true> end() const requires range<const V> &&
| ^~~~~~~~
p1059.cpp:421:1: error: expected unqualified-id before 'return'
421 | return sentinel<true> {ranges::end(base_)};
| ^~~~~~
p1059.cpp:422:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:422:24: error: wrong number of template arguments (1, should be at least 2)
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:66: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:422:47: error: 'common_range' was not declared in this scope; did you mean 'std::ranges::common_range'?
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^~~~~~~~~~~~
| std::ranges::common_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:689:13: note: 'std::ranges::common_range' declared here
689 | concept common_range
| ^~~~~~~~~~~~
p1059.cpp:422:38: error: expression must be enclosed in parentheses
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^~~~~~~~
p1059.cpp:422:47: error: expected initializer before 'common_range'
422 | constexpr iterator<true> end() const requires common_range<const V> &&
| ^~~~~~~~~~~~
p1059.cpp:425:1: error: expected unqualified-id before 'return'
425 | return iterator<true> {*this, ranges::end(base_)};
| ^~~~~~
p1059.cpp:430:48: error: 'can' was not declared in this scope; did you mean 'tan'?
430 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
| tan
p1059.cpp:430:52: error: 'reference' was not declared in this scope; did you mean 'is_reference'?
430 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~~~~~~~
| is_reference
p1059.cpp:430:45: error: expression must be enclosed in parentheses
430 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~
p1059.cpp:430:48: error: 'can' does not name a type
430 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
p1059.cpp:496:1: error: expected unqualified-id before 'requires'
496 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:498:28: error: 'Base' was not declared in this scope
498 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~
p1059.cpp:498:28: error: 'Base' was not declared in this scope
p1059.cpp:498:28: error: 'Base' was not declared in this scope
p1059.cpp:498:28: error: 'Base' was not declared in this scope
p1059.cpp:498:28: error: 'Base' was not declared in this scope
p1059.cpp:498:28: error: 'Base' was not declared in this scope
p1059.cpp:498:17: error: 'iterator_t' does not name a type; did you mean 'error_t'?
498 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~~~~~~~
| error_t
p1059.cpp:500:22: error: 'Base' was not declared in this scope
500 | constexpr iterator_t<Base> base() &&;
| ^~~~
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:22: error: 'Base' was not declared in this scope
p1059.cpp:500:11: error: 'iterator_t' does not name a type; did you mean 'error_t'?
500 | constexpr iterator_t<Base> base() &&;
| ^~~~~~~~~~
| error_t
p1059.cpp:502:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
502 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:502:11: error: deduced class type 'iterator' in function return type
502 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:504:1: error: expected unqualified-id before '++' token
504 | ++current_;
| ^~
p1059.cpp:505:1: error: expected unqualified-id before 'return'
505 | return *this;
| ^~~~~~
p1059.cpp:506:16: error: 'constexpr void operator++(int)' must have an argument of class or enumerated type
506 | constexpr void operator++(int);
| ^~~~~~~~
p1059.cpp:508:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:508:63: error: 'Base' was not declared in this scope
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:63: error: 'Base' was not declared in this scope
p1059.cpp:508:43: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:508:63: error: 'Base' was not declared in this scope
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~
p1059.cpp:508:34: error: expression must be enclosed in parentheses
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
p1059.cpp:508:43: error: expected initializer before 'bidirectional_range'
508 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:510:1: error: expected unqualified-id before '--' token
510 | --current_;
| ^~
p1059.cpp:511:1: error: expected unqualified-id before 'return'
511 | return *this;
| ^~~~~~
p1059.cpp:512:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
512 | constexpr iterator operator++(int)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:514:1: error: expected initializer before 'auto'
514 | auto tmp = *this;
| ^~~~
p1059.cpp:515:1: error: expected unqualified-id before '++' token
515 | ++*this;
| ^~
p1059.cpp:516:1: error: expected unqualified-id before 'return'
516 | return tmp;
| ^~~~~~
p1059.cpp:517:1: error: expected unqualified-id before 'requires'
517 | requires
| ^~~~~~~~
p1059.cpp:519:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:519:65: error: 'Base' was not declared in this scope
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:65: error: 'Base' was not declared in this scope
p1059.cpp:519:45: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:519:65: error: 'Base' was not declared in this scope
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~
p1059.cpp:519:36: error: expression must be enclosed in parentheses
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
p1059.cpp:519:45: error: expected initializer before 'bidirectional_range'
519 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:521:13: error: invalid use of 'this' at top level
521 | auto tmp = *this;
| ^~~~
p1059.cpp:522:1: error: expected unqualified-id before '--' token
522 | --*this;
| ^~
p1059.cpp:523:1: error: expected unqualified-id before 'return'
523 | return tmp;
| ^~~~~~
p1059.cpp:524:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
524 | constexpr iterator& operator+=(difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:524:11: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
524 | constexpr iterator& operator+=(difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:524:32: error: 'difference_type' was not declared in this scope
524 | constexpr iterator& operator+=(difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:526:1: error: 'current_' does not name a type
526 | current_ += n;
| ^~~~~~~~
p1059.cpp:527:1: error: expected unqualified-id before 'return'
527 | return *this;
| ^~~~~~
p1059.cpp:528:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
528 | constexpr iterator& operator-=(difference_type n)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:528:11: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
528 | constexpr iterator& operator-=(difference_type n)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:528:32: error: 'difference_type' was not declared in this scope
528 | constexpr iterator& operator-=(difference_type n)
| ^~~~~~~~~~~~~~~
p1059.cpp:531:1: error: 'current_' does not name a type
531 | current_ -= n;
| ^~~~~~~~
p1059.cpp:532:1: error: expected unqualified-id before 'return'
532 | return *this;
| ^~~~~~
p1059.cpp:533:1: error: 'friend' used outside of class
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:533:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:533:51: error: expected ')' before ',' token
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ~ ^
| )
p1059.cpp:533:23: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:533:53: error: expected unqualified-id before 'const'
533 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<Base>>;
| ^~~~~
p1059.cpp:535:1: error: expected unqualified-id before 'return'
535 | return x.current_ == y.current_;
| ^~~~~~
p1059.cpp:536:1: error: 'friend' used outside of class
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:536:33: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:536:50: error: expected ')' before ',' token
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:536:23: error: 'constexpr bool operator<(...)' must have an argument of class or enumerated type
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:536:52: error: expected unqualified-id before 'const'
536 | friend constexpr bool operator<(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:539:1: error: expected unqualified-id before 'return'
539 | return x.current_ < y.current_;
| ^~~~~~
p1059.cpp:540:1: error: 'friend' used outside of class
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:540:33: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:540:50: error: expected ')' before ',' token
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:540:23: error: 'constexpr bool operator>(...)' must have an argument of class or enumerated type
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:540:52: error: expected unqualified-id before 'const'
540 | friend constexpr bool operator>(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:542:1: error: expected unqualified-id before 'return'
542 | return y < x;
| ^~~~~~
p1059.cpp:543:1: error: 'friend' used outside of class
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:543:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:543:51: error: expected ')' before ',' token
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:543:23: error: 'constexpr bool operator<=(...)' must have an argument of class or enumerated type
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:543:53: error: expected unqualified-id before 'const'
543 | friend constexpr bool operator<=(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:546:1: error: expected unqualified-id before 'return'
546 | return !(y < x);
| ^~~~~~
p1059.cpp:547:1: error: 'friend' used outside of class
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:547:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:547:51: error: expected ')' before ',' token
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:547:23: error: 'constexpr bool operator>=(...)' must have an argument of class or enumerated type
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:547:53: error: expected unqualified-id before 'const'
547 | friend constexpr bool operator>=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:549:1: error: expected unqualified-id before 'return'
549 | return !(x < y);
| ^~~~~~
p1059.cpp:550:1: error: 'friend' used outside of class
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:550:35: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:550:52: error: expected ')' before ',' token
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:550:23: error: 'constexpr auto operator<=>(...)' must have an argument of class or enumerated type
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:550:54: error: expected unqualified-id before 'const'
550 | friend constexpr auto operator<=>(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:553:1: error: expected unqualified-id before 'return'
553 | return x.current_ <=> y.current_;
| ^~~~~~
p1059.cpp:554:1: error: 'friend' used outside of class
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:554:18: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:554:37: error: class template placeholder 'std::iterator' not permitted in this context
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:554:37: note: use 'auto' for an abbreviated function template
p1059.cpp:554:49: error: 'difference_type' has not been declared
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:554:97: error: 'Base' was not declared in this scope
554 | iend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:97: error: 'Base' was not declared in this scope
p1059.cpp:554:77: error: 'random_access_range' was not declared in this scope; did you mean 'std::ranges::random_access_range'?
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::random_access_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:675:13: note: 'std::ranges::random_access_range' declared here
675 | concept random_access_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:554:97: error: 'Base' was not declared in this scope
554 | iend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~
p1059.cpp:554:68: error: expression must be enclosed in parentheses
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:554:77: error: expected initializer before 'random_access_range'
554 | friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:555:1: error: 'friend' used outside of class
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:555:18: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:555:27: error: declaration of 'operator+' as non-function
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:555:37: error: 'difference_type' was not declared in this scope
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:555:65: error: missing template arguments before 'i'
555 | friend constexpr iterator operator+(difference_type n, iterator i) requires random_access_range<Base>;
| ^
p1059.cpp:557:1: error: expected unqualified-id before 'return'
557 | return iterator{*i.parent_, i.current_ + n};
| ^~~~~~
p1059.cpp:558:1: error: 'friend' used outside of class
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:558:18: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:558:37: error: class template placeholder 'std::iterator' not permitted in this context
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:558:37: note: use 'auto' for an abbreviated function template
p1059.cpp:558:49: error: 'difference_type' has not been declared
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:558:97: error: 'Base' was not declared in this scope
558 | iend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:97: error: 'Base' was not declared in this scope
p1059.cpp:558:77: error: 'random_access_range' was not declared in this scope; did you mean 'std::ranges::random_access_range'?
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::random_access_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:675:13: note: 'std::ranges::random_access_range' declared here
675 | concept random_access_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:558:97: error: 'Base' was not declared in this scope
558 | iend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~
p1059.cpp:558:68: error: expression must be enclosed in parentheses
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:558:77: error: expected initializer before 'random_access_range'
558 | friend constexpr iterator operator-(iterator i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:560:1: error: expected unqualified-id before 'return'
560 | return iterator{*i.parent_, i.current_ - n};
| ^~~~~~
p1059.cpp:561:1: error: 'friend' used outside of class
561 | friend constexpr difference_type operator-(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:561:18: error: 'difference_type' does not name a type
561 | friend constexpr difference_type operator-(const iterator& x, const iterator& y)
| ^~~~~~~~~~~~~~~
p1059.cpp:563:22: error: 'Base' was not declared in this scope
563 | constexpr sentinel_t<Base> base() const;
| ^~~~
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:22: error: 'Base' was not declared in this scope
p1059.cpp:563:11: error: 'sentinel_t' does not name a type
563 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~~
p1059.cpp:565:34: error: 'Base' was not declared in this scope
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:34: error: 'Base' was not declared in this scope
p1059.cpp:565:23: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:565:34: error: 'Base' was not declared in this scope
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:565:10: error: wrong number of template arguments (1, should be 2)
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:71:
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:619:13: note: provided for 'template<class _Sent, class _Iter> concept std::sentinel_for'
619 | concept sentinel_for = semiregular<_Sent>
| ^~~~~~~~~~~~
p1059.cpp:565:39: error: expected unqualified-id before ',' token
565 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:568:40: error: 'Base' was not declared in this scope
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:40: error: 'Base' was not declared in this scope
p1059.cpp:568:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:568:40: error: 'Base' was not declared in this scope
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:568:10: error: wrong number of template arguments (1, should be 2)
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:627:13: note: provided for 'template<class _Sent, class _Iter> concept std::sized_sentinel_for'
627 | concept sized_sentinel_for = sentinel_for<_Sent, _Iter>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:568:45: error: expected unqualified-id before ',' token
568 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:571:40: error: 'Base' was not declared in this scope
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:40: error: 'Base' was not declared in this scope
p1059.cpp:571:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:571:40: error: 'Base' was not declared in this scope
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:571:10: error: wrong number of template arguments (1, should be 2)
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:627:13: note: provided for 'template<class _Sent, class _Iter> concept std::sized_sentinel_for'
627 | concept sized_sentinel_for = sentinel_for<_Sent, _Iter>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:571:45: error: expected unqualified-id before ',' token
571 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:573:1: error: expected declaration before '}' token
573 | };
| ^
p1059.cpp:574:1: error: expected declaration before '}' token
574 | }
| ^
p1059.cpp:575:40: error: 'Base' was not declared in this scope
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:575:11: error: 'explicit' outside class declaration
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:575:20: error: redefinition of 'constexpr const int sentinel'
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:575:40: error: 'Base' was not declared in this scope
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:40: error: 'Base' was not declared in this scope
p1059.cpp:575:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:575:40: error: 'Base' was not declared in this scope
575 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:577:11: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
577 | constexpr sentinel(sentinel<!Const> i)
| ^~~~~~~~
p1059.cpp:577:11: error: redefinition of 'constexpr const int sentinel'
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:577:30: error: 'Const' was not declared in this scope; did you mean 'const'?
577 | constexpr sentinel(sentinel<!Const> i)
| ^~~~~
| const
p1059.cpp:577:37: error: 'i' was not declared in this scope; did you mean 'is'?
577 | constexpr sentinel(sentinel<!Const> i)
| ^
| is
p1059.cpp:580:22: error: 'Base' was not declared in this scope
580 | constexpr sentinel_t<Base> base() const;
| ^~~~
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:22: error: 'Base' was not declared in this scope
p1059.cpp:580:11: error: 'sentinel_t' does not name a type
580 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~~
p1059.cpp:581:1: error: expected unqualified-id before 'requires'
581 | requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:583:1: error: expected unqualified-id before 'return'
583 | return x.current_ - y.current_;
| ^~~~~~
p1059.cpp:588:48: error: 'can' was not declared in this scope; did you mean 'tan'?
588 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
| tan
p1059.cpp:588:52: error: 'reference' was not declared in this scope; did you mean 'is_reference'?
588 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~~~~~~~
| is_reference
p1059.cpp:588:45: error: expression must be enclosed in parentheses
588 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~
p1059.cpp:588:48: error: 'can' does not name a type
588 | regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>>
| ^~~
p1059.cpp:617:40: error: 'Base' was not declared in this scope
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:40: error: 'Base' was not declared in this scope
p1059.cpp:617:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:617:40: error: 'Base' was not declared in this scope
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:617:10: error: wrong number of template arguments (1, should be 2)
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:627:13: note: provided for 'template<class _Sent, class _Iter> concept std::sized_sentinel_for'
627 | concept sized_sentinel_for = sentinel_for<_Sent, _Iter>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:617:45: error: expected unqualified-id before ',' token
617 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:620:1: error: expected unqualified-id before 'return'
620 | return x.current_ - y.end_;
| ^~~~~~
p1059.cpp:622:40: error: 'Base' was not declared in this scope
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:40: error: 'Base' was not declared in this scope
p1059.cpp:622:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:622:40: error: 'Base' was not declared in this scope
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:622:10: error: wrong number of template arguments (1, should be 2)
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:627:13: note: provided for 'template<class _Sent, class _Iter> concept std::sized_sentinel_for'
627 | concept sized_sentinel_for = sentinel_for<_Sent, _Iter>
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:622:45: error: expected unqualified-id before ',' token
622 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:625:1: error: expected unqualified-id before 'return'
625 | return y.end_ - x.current_;
| ^~~~~~
p1059.cpp:631:13: error: redefinition of 'std::vector<int> is'
631 | vector<int> is{0,1,2,3,4,5,6,7,8,9};
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:632:1: error: expected unqualified-id before 'for'
632 | for (int i : is | views::take(5))
| ^~~
p1059.cpp:641:2: error: expected ';' after class definition
641 | }
| ^
| ;
p1059.cpp:646:1: error: expected unqualified-id before 'public'
646 | public:
| ^~~~~~
p1059.cpp:648:22: error: expected ')' before 'base'
648 | constexpr take_view(V base, range_difference_t<V> count);
| ~ ^~~~~
| )
p1059.cpp:649:11: error: 'V' does not name a type
649 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^
p1059.cpp:649:87: error: 'V' does not name a type
649 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^
p1059.cpp:650:35: error: 'simple' was not declared in this scope
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~~
p1059.cpp:650:47: error: 'V' was not declared in this scope
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^
p1059.cpp:650:42: error: template argument 1 is invalid
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~~~
p1059.cpp:650:16: error: constraints on a non-templated function
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp: In function 'constexpr auto std::ranges::begin()':
p1059.cpp:651:31: error: 'V' was not declared in this scope
651 | if constexpr (sized_range<V>) {
| ^
p1059.cpp:651:19: error: template argument 1 is invalid
651 | if constexpr (sized_range<V>) {
| ^~~~~~~~~~~~~~
p1059.cpp:653:28: error: reference to 'begin' is ambiguous
653 | return ranges::begin(base_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:653:34: error: 'base_' was not declared in this scope
653 | return ranges::begin(base_);
| ^~~~~
p1059.cpp:655:49: error: no match for call to '(const std::ranges::__cust_access::_Size) ()'
655 | auto sz = range_difference_t<V>(size());
| ~~~~^~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:418:9: note: candidate: 'template<class _Tp> requires (is_bounded_array_v<typename std::remove_reference<_Tp>::type>) || (__member_size<_Tp>) || (__adl_size<_Tp>) || (__sentinel_size<_Tp>) constexpr auto std::ranges::__cust_access::_Size::operator()(_Tp&&) const'
418 | operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>())
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:418:9: note: template argument deduction/substitution failed:
p1059.cpp:655:49: note: candidate expects 1 argument, 0 provided
655 | auto sz = range_difference_t<V>(size());
| ~~~~^~
p1059.cpp:656:51: error: 'base_' was not declared in this scope
656 | return counted_iterator(ranges::begin(base_), sz);
| ^~~~~
p1059.cpp:656:36: error: missing template arguments before '(' token
656 | return counted_iterator(ranges::begin(base_), sz);
| ^
p1059.cpp:656:45: error: reference to 'begin' is ambiguous
656 | return counted_iterator(ranges::begin(base_), sz);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:659:47: error: 'base_' was not declared in this scope
659 | return counted_iterator(ranges::begin(base_), count_);
| ^~~~~
p1059.cpp:659:55: error: 'count_' was not declared in this scope; did you mean 'cout'?
659 | return counted_iterator(ranges::begin(base_), count_);
| ^~~~~~
| cout
p1059.cpp:659:32: error: missing template arguments before '(' token
659 | return counted_iterator(ranges::begin(base_), count_);
| ^
p1059.cpp:659:41: error: reference to 'begin' is ambiguous
659 | return counted_iterator(ranges::begin(base_), count_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:650:16: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto std::ranges::begin()'
p1059.cpp: At global scope:
p1059.cpp:662:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
662 | constexpr auto begin() const requires range<const V> {
| ^
p1059.cpp:662:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:662:52: error: template argument 1 is invalid
662 | constexpr auto begin() const requires range<const V> {
| ^
p1059.cpp:662:44: error: missing template arguments before '<' token
662 | constexpr auto begin() const requires range<const V> {
| ^
p1059.cpp:662:44: error: expected initializer before '<' token
p1059.cpp:674:33: error: 'simple' was not declared in this scope
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~~~~
p1059.cpp:674:45: error: 'V' was not declared in this scope
674 | constexpr auto end() requires (!simple-view<V>) {
| ^
p1059.cpp:674:40: error: template argument 1 is invalid
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~~~~~
p1059.cpp:674:16: error: constraints on a non-templated function
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp: In function 'constexpr auto std::ranges::end()':
p1059.cpp:675:31: error: 'V' was not declared in this scope
675 | if constexpr (sized_range<V>) {
| ^
p1059.cpp:675:19: error: template argument 1 is invalid
675 | if constexpr (sized_range<V>) {
| ^~~~~~~~~~~~~~
p1059.cpp:677:28: error: reference to 'begin' is ambiguous
677 | return ranges::begin(base_) + range_difference_t<V>(size());
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:677:34: error: 'base_' was not declared in this scope
677 | return ranges::begin(base_) + range_difference_t<V>(size());
| ^~~~~
p1059.cpp:677:69: error: no match for call to '(const std::ranges::__cust_access::_Size) ()'
677 | return ranges::begin(base_) + range_difference_t<V>(size());
| ~~~~^~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:418:9: note: candidate: 'template<class _Tp> requires (is_bounded_array_v<typename std::remove_reference<_Tp>::type>) || (__member_size<_Tp>) || (__adl_size<_Tp>) || (__sentinel_size<_Tp>) constexpr auto std::ranges::__cust_access::_Size::operator()(_Tp&&) const'
418 | operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>())
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:418:9: note: template argument deduction/substitution failed:
p1059.cpp:677:69: note: candidate expects 1 argument, 0 provided
677 | return ranges::begin(base_) + range_difference_t<V>(size());
| ~~~~^~
p1059.cpp:681:45: error: 'base_' was not declared in this scope
681 | return sentinel<false> {ranges::end(base_)};
| ^~~~~
p1059.cpp:681:32: error: expected primary-expression before '{' token
681 | return sentinel<false> {ranges::end(base_)};
| ^
p1059.cpp:681:31: error: expected ';' before '{' token
681 | return sentinel<false> {ranges::end(base_)};
| ^~
| ;
p1059.cpp:681:41: error: reference to 'end' is ambiguous
681 | return sentinel<false> {ranges::end(base_)};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp: At global scope:
p1059.cpp:684:49: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
684 | constexpr auto end() const requires range<const V> {
| ^
p1059.cpp:684:49: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:684:50: error: template argument 1 is invalid
684 | constexpr auto end() const requires range<const V> {
| ^
p1059.cpp:684:42: error: missing template arguments before '<' token
684 | constexpr auto end() const requires range<const V> {
| ^
p1059.cpp:684:42: error: expected initializer before '<' token
p1059.cpp:694:44: error: 'V' was not declared in this scope
694 | constexpr auto size() requires sized_range<V> {
| ^
p1059.cpp:694:32: error: template argument 1 is invalid
694 | constexpr auto size() requires sized_range<V> {
| ^~~~~~~~~~~~~~
p1059.cpp:694:16: error: constraints on a non-templated function
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: In function 'constexpr auto std::ranges::size()':
p1059.cpp:695:22: error: reference to 'size' is ambiguous
695 | auto n = ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp:695:27: error: 'base_' was not declared in this scope
695 | auto n = ranges::size(base_);
| ^~~~~
p1059.cpp:696:20: error: 'min' is not a member of 'std::ranges'; did you mean 'std::min'?
696 | return ranges::min(n, static_cast<decltype(n)>(count_));
| ^~~
In file included from /usr/local/include/c++/12.1.0/string:50:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:278:5: note: 'std::min' declared here
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
p1059.cpp:696:52: error: 'count_' was not declared in this scope; did you mean 'cout'?
696 | return ranges::min(n, static_cast<decltype(n)>(count_));
| ^~~~~~
| cout
p1059.cpp:694:16: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:698:56: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
698 | constexpr auto size() const requires sized_range<const V> {
| ^
p1059.cpp:698:56: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:698:57: error: template argument 1 is invalid
698 | constexpr auto size() const requires sized_range<const V> {
| ^
p1059.cpp:698:49: error: missing template arguments before '<' token
698 | constexpr auto size() const requires sized_range<const V> {
| ^
p1059.cpp:698:49: error: expected initializer before '<' token
p1059.cpp:704:16: error: 'range_difference_t' has not been declared
704 | take_view(R&&, range_difference_t<R>)
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:704:34: error: expected ',' or '...' before '<' token
704 | take_view(R&&, range_difference_t<R>)
| ^
p1059.cpp:705:14: error: 'views' was not declared in this scope
705 | -> take_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:705:14: error: 'views' was not declared in this scope
p1059.cpp:705:14: error: 'views' was not declared in this scope
p1059.cpp:705:14: error: 'views' was not declared in this scope
p1059.cpp:705:14: error: 'views' was not declared in this scope
p1059.cpp:705:14: error: 'views' was not declared in this scope
p1059.cpp:705:4: error: 'take_view' does not name a type
705 | -> take_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:705:13: error: expected constructor, destructor, or type conversion before '<' token
705 | -> take_view<views::all_t<R>>;
| ^
p1059.cpp:706:1: error: expected declaration before '}' token
706 | }
| ^
p1059.cpp:707:11: error: ISO C++ forbids declaration of 'take_view' with no type [-fpermissive]
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^~~~~~~~~
p1059.cpp:707:21: error: 'V' was not declared in this scope
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:707:48: error: 'V' was not declared in this scope
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:707:48: error: 'V' was not declared in this scope
p1059.cpp:707:48: error: 'V' was not declared in this scope
p1059.cpp:707:48: error: 'V' was not declared in this scope
p1059.cpp:707:48: error: 'V' was not declared in this scope
p1059.cpp:707:29: error: 'range_difference_t' was not declared in this scope; did you mean 'std::ranges::range_difference_t'?
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^~~~~~~~~~~~~~~~~~
| std::ranges::range_difference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:601:11: note: 'std::ranges::range_difference_t' declared here
601 | using range_difference_t = iter_difference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:707:48: error: 'V' was not declared in this scope
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:707:51: error: 'count' was not declared in this scope
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^~~~~
p1059.cpp:707:56: error: expression list treated as compound expression in initializer [-fpermissive]
707 | constexpr take_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:713:21: error: invalid class name in declaration of 'class std::ranges::take_view<V>::sentinel'
713 | class take_view<V>::sentinel {
| ^~~~~~~~
p1059.cpp:731:40: error: 'Base' was not declared in this scope
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:731:11: error: 'explicit' outside class declaration
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:731:20: error: redefinition of 'constexpr const int sentinel'
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:731:40: error: 'Base' was not declared in this scope
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:40: error: 'Base' was not declared in this scope
p1059.cpp:731:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:731:40: error: 'Base' was not declared in this scope
731 | constexpr explicit sentinel(sentinel_t<Base> end);
| ^~~~
p1059.cpp:733:11: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
733 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~
p1059.cpp:733:11: error: redefinition of 'constexpr const int sentinel'
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:733:30: error: 'Const' was not declared in this scope; did you mean 'const'?
733 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~
| const
p1059.cpp:733:37: error: 's' was not declared in this scope; did you mean 'is'?
733 | constexpr sentinel(sentinel<!Const> s)
| ^
| is
p1059.cpp:741:1: error: expected unqualified-id before 'requires'
741 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~
p1059.cpp:743:22: error: 'Base' was not declared in this scope
743 | constexpr sentinel_t<Base> base() const;
| ^~~~
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:22: error: 'Base' was not declared in this scope
p1059.cpp:743:11: error: 'sentinel_t' does not name a type
743 | constexpr sentinel_t<Base> base() const;
| ^~~~~~~~~~
p1059.cpp:745:1: error: expected unqualified-id before 'return'
745 | return end_;
| ^~~~~~
p1059.cpp:746:1: error: 'friend' used outside of class
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~~
| ------
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:43: error: 'Const' was not declared in this scope; did you mean 'const'?
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~
| const
p1059.cpp:746:40: error: 'CI' does not name a type
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~
p1059.cpp:746:42: error: expected ',' or '...' before '<' token
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^
p1059.cpp:746:23: error: 'constexpr bool operator==(int)' must have an argument of class or enumerated type
746 | friend constexpr bool operator==(const CI<Const>& y, const sentinel& x);
| ^~~~~~~~
p1059.cpp:747:29: error: 'Const' was not declared in this scope; did you mean 'const'?
747 | template<bool OtherConst = !Const>
| ^~~~~
| const
p1059.cpp:748:34: error: 'Base' was not declared in this scope
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:34: error: 'Base' was not declared in this scope
p1059.cpp:748:23: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:748:34: error: 'Base' was not declared in this scope
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:748:10: error: wrong number of template arguments (1, should be 2)
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:619:13: note: provided for 'template<class _Sent, class _Iter> concept std::sentinel_for'
619 | concept sentinel_for = semiregular<_Sent>
| ^~~~~~~~~~~~
p1059.cpp:748:39: error: expected unqualified-id before ',' token
748 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:751:1: error: expected unqualified-id before 'return'
751 | return y.count() == 0 || y.base() == x.end_;
| ^~~~~~
p1059.cpp:756:1: error: expected unqualified-id before 'public'
756 | public:
| ^~~~~~
p1059.cpp:758:11: error: ISO C++ forbids declaration of 'take_while_view' with no type [-fpermissive]
758 | constexpr take_while_view(V base, Pred pred);
| ^~~~~~~~~~~~~~~
p1059.cpp:758:27: error: 'V' was not declared in this scope
758 | constexpr take_while_view(V base, Pred pred);
| ^
p1059.cpp:758:35: error: 'Pred' was not declared in this scope
758 | constexpr take_while_view(V base, Pred pred);
| ^~~~
p1059.cpp:758:44: error: expression list treated as compound expression in initializer [-fpermissive]
758 | constexpr take_while_view(V base, Pred pred);
| ^
p1059.cpp:759:11: error: 'V' does not name a type
759 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^
p1059.cpp:759:87: error: 'V' does not name a type
759 | constexpr V base() const & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^
p1059.cpp:760:17: error: 'Pred' does not name a type
760 | constexpr const Pred& pred() const;
| ^~~~
p1059.cpp:761:35: error: 'simple' was not declared in this scope
761 | constexpr auto begin() requires (!simple-view<V>)
| ^~~~~~
p1059.cpp:761:47: error: 'V' was not declared in this scope
761 | constexpr auto begin() requires (!simple-view<V>)
| ^
p1059.cpp:761:47: error: 'V' was not declared in this scope
p1059.cpp:761:47: error: 'V' was not declared in this scope
p1059.cpp:761:47: error: 'V' was not declared in this scope
p1059.cpp:761:47: error: 'V' was not declared in this scope
p1059.cpp:761:42: error: 'view' was not declared in this scope; did you mean 'std::ranges::view'?
761 | constexpr auto begin() requires (!simple-view<V>)
| ^~~~
| std::ranges::view
/usr/local/include/c++/12.1.0/bits/ranges_base.h:649:13: note: 'std::ranges::view' declared here
649 | concept view
| ^~~~
p1059.cpp:761:47: error: 'V' was not declared in this scope
761 | constexpr auto begin() requires (!simple-view<V>)
| ^
p1059.cpp:761:49: error: expected primary-expression before ')' token
761 | constexpr auto begin() requires (!simple-view<V>)
| ^
p1059.cpp:761:16: error: constraints on a non-templated function
761 | constexpr auto begin() requires (!simple-view<V>)
| ^~~~~
p1059.cpp:761:16: error: ambiguating new declaration of 'constexpr auto begin()'
p1059.cpp:405:27: note: old declaration 'constexpr int begin()'
405 | constexpr iterator<false> begin();
| ^~~~~
p1059.cpp: In function 'constexpr auto begin()':
p1059.cpp:763:20: error: reference to 'begin' is ambiguous
763 | return ranges::begin(base_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:763:26: error: 'base_' was not declared in this scope
763 | return ranges::begin(base_);
| ^~~~~
p1059.cpp:761:16: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto begin()'
761 | constexpr auto begin() requires (!simple-view<V>)
| ^~~~~
p1059.cpp: At global scope:
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
766 | requires range<const V> &&
| ^
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:766:10: error: 'range' was not declared in this scope; did you mean 'std::ranges::range'?
766 | requires range<const V> &&
| ^~~~~
| std::ranges::range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:583:13: note: 'std::ranges::range' declared here
583 | concept range = requires(_Tp& __t)
| ^~~~~
p1059.cpp:766:1: error: expression must be enclosed in parentheses
766 | requires range<const V> &&
| ^~~~~~~~
p1059.cpp:766:10: error: expected initializer before 'range'
766 | requires range<const V> &&
| ^~~~~
p1059.cpp:770:33: error: 'simple' was not declared in this scope
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~~~~
p1059.cpp:770:45: error: 'V' was not declared in this scope
770 | constexpr auto end() requires (!simple-view<V>)
| ^
p1059.cpp:770:45: error: 'V' was not declared in this scope
p1059.cpp:770:45: error: 'V' was not declared in this scope
p1059.cpp:770:45: error: 'V' was not declared in this scope
p1059.cpp:770:45: error: 'V' was not declared in this scope
p1059.cpp:770:40: error: 'view' was not declared in this scope; did you mean 'std::ranges::view'?
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~~
| std::ranges::view
/usr/local/include/c++/12.1.0/bits/ranges_base.h:649:13: note: 'std::ranges::view' declared here
649 | concept view
| ^~~~
p1059.cpp:770:45: error: 'V' was not declared in this scope
770 | constexpr auto end() requires (!simple-view<V>)
| ^
p1059.cpp:770:47: error: expected primary-expression before ')' token
770 | constexpr auto end() requires (!simple-view<V>)
| ^
p1059.cpp:770:16: error: constraints on a non-templated function
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
p1059.cpp: In function 'constexpr auto end()':
p1059.cpp:772:36: error: reference to 'end' is ambiguous
772 | return sentinel<false>(ranges::end(base_), addressof(*pred_));
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:772:40: error: 'base_' was not declared in this scope
772 | return sentinel<false>(ranges::end(base_), addressof(*pred_));
| ^~~~~
p1059.cpp:772:59: error: 'pred_' was not declared in this scope
772 | return sentinel<false>(ranges::end(base_), addressof(*pred_));
| ^~~~~
p1059.cpp:770:16: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto end()'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
p1059.cpp: At global scope:
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
775 | requires range<const V> &&
| ^
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:22: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:775:10: error: 'range' was not declared in this scope; did you mean 'std::ranges::range'?
775 | requires range<const V> &&
| ^~~~~
| std::ranges::range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:583:13: note: 'std::ranges::range' declared here
583 | concept range = requires(_Tp& __t)
| ^~~~~
p1059.cpp:775:1: error: expression must be enclosed in parentheses
775 | requires range<const V> &&
| ^~~~~~~~
p1059.cpp:775:10: error: expected initializer before 'range'
775 | requires range<const V> &&
| ^~~~~
p1059.cpp:779:1: error: expected declaration before '}' token
779 | };
| ^
p1059.cpp:781:31: error: 'take_while_view' does not name a type
781 | take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~~~~~
p1059.cpp:781:46: error: expected constructor, destructor, or type conversion before '<' token
781 | take_while_view(R&&, Pred) -> take_while_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:782:1: error: expected declaration before '}' token
782 | }
| ^
p1059.cpp:783:11: error: ISO C++ forbids declaration of 'take_while_view' with no type [-fpermissive]
783 | constexpr take_while_view(V base, Pred pred);
| ^~~~~~~~~~~~~~~
p1059.cpp:783:11: error: redefinition of 'constexpr const int take_while_view'
p1059.cpp:758:11: note: 'constexpr const int take_while_view' previously defined here
758 | constexpr take_while_view(V base, Pred pred);
| ^~~~~~~~~~~~~~~
p1059.cpp:783:27: error: 'V' was not declared in this scope
783 | constexpr take_while_view(V base, Pred pred);
| ^
p1059.cpp:783:35: error: 'Pred' was not declared in this scope
783 | constexpr take_while_view(V base, Pred pred);
| ^~~~
p1059.cpp:785:17: error: 'Pred' does not name a type
785 | constexpr const Pred& pred() const;
| ^~~~
p1059.cpp:787:1: error: expected unqualified-id before 'return'
787 | return *pred_;
| ^~~~~~
p1059.cpp:794:6: error: too many template-parameter-lists
794 | auto small_ints = istream_view<int>(input) | views::take_while(small);
| ^~~~~~~~~~
p1059.cpp:795:1: error: expected unqualified-id before 'for'
795 | for (const auto i : small_ints) {
| ^~~
p1059.cpp:799:1: error: 'input' does not name a type; did you mean 'int'?
799 | input >> i;
| ^~~~~
| int
p1059.cpp:800:1: error: 'cout' does not name a type
800 | cout << i;
| ^~~~
p1059.cpp:813:5: error: expected 'auto' or 'decltype(auto)' after 'copyable'
813 | copyable-box<Pred> pred_;
| ^~~~~~~~
p1059.cpp:813:13: error: expected unqualified-id before '-' token
813 | copyable-box<Pred> pred_;
| ^
p1059.cpp:814:2: error: expected ';' after class definition
814 | }
| ^
| ;
p1059.cpp:822:23: error: 'V' was not declared in this scope
822 | class take_while_view<V, Pred>::sentinel {
| ^
p1059.cpp:822:26: error: 'Pred' was not declared in this scope
822 | class take_while_view<V, Pred>::sentinel {
| ^~~~
p1059.cpp:822:30: error: template argument 1 is invalid
822 | class take_while_view<V, Pred>::sentinel {
| ^
p1059.cpp:822:30: error: template argument 2 is invalid
p1059.cpp:822:42: error: expected unqualified-id before '{' token
822 | class take_while_view<V, Pred>::sentinel {
| ^
p1059.cpp:842:40: error: 'Base' was not declared in this scope
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~~~~
p1059.cpp:842:11: error: 'explicit' outside class declaration
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~~~~
p1059.cpp:842:20: error: redefinition of 'constexpr const int sentinel'
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~~~~
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:842:40: error: 'Base' was not declared in this scope
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:40: error: 'Base' was not declared in this scope
p1059.cpp:842:29: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:842:40: error: 'Base' was not declared in this scope
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~
p1059.cpp:842:51: error: expected primary-expression before 'const'
842 | constexpr explicit sentinel(sentinel_t<Base> end, const Pred* pred);
| ^~~~~
p1059.cpp:844:11: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
844 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~
p1059.cpp:844:11: error: redefinition of 'constexpr const int sentinel'
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:844:30: error: 'Const' was not declared in this scope; did you mean 'const'?
844 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~
| const
p1059.cpp:844:37: error: 's' was not declared in this scope; did you mean 'is'?
844 | constexpr sentinel(sentinel<!Const> s)
| ^
| is
p1059.cpp:847:1: error: 'friend' used outside of class
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:847:51: error: 'Base' was not declared in this scope
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~
p1059.cpp:847:51: error: 'Base' was not declared in this scope
p1059.cpp:847:51: error: 'Base' was not declared in this scope
p1059.cpp:847:51: error: 'Base' was not declared in this scope
p1059.cpp:847:51: error: 'Base' was not declared in this scope
p1059.cpp:847:51: error: 'Base' was not declared in this scope
p1059.cpp:847:40: error: 'iterator_t' does not name a type; did you mean 'error_t'?
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~~~~~~~
| error_t
p1059.cpp:847:50: error: expected ',' or '...' before '<' token
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^
p1059.cpp:847:23: error: 'constexpr bool operator==(int)' must have an argument of class or enumerated type
847 | friend constexpr bool operator==(const iterator_t<Base>& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:848:29: error: 'Const' was not declared in this scope; did you mean 'const'?
848 | template<bool OtherConst = !Const>
| ^~~~~
| const
p1059.cpp:849:34: error: 'Base' was not declared in this scope
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:34: error: 'Base' was not declared in this scope
p1059.cpp:849:23: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:849:34: error: 'Base' was not declared in this scope
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:849:10: error: wrong number of template arguments (1, should be 2)
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:619:13: note: provided for 'template<class _Sent, class _Iter> concept std::sentinel_for'
619 | concept sentinel_for = semiregular<_Sent>
| ^~~~~~~~~~~~
p1059.cpp:849:39: error: expected unqualified-id before ',' token
849 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:854:1: error: expected unqualified-id before 'return'
854 | return y.end_ == x || !invoke(*y.pred_, *x);
| ^~~~~~
p1059.cpp:862:6: error: conflicting declaration 'auto ints'
862 | auto ints = views::iota(0) | views::take(10);
| ^~~~
p1059.cpp:19:13: note: previous declaration as 'std::vector<int> ints'
19 | vector<int> ints{0,1,2,3,4,5};
| ^~~~
p1059.cpp:862:13: error: 'views' has not been declared
862 | auto ints = views::iota(0) | views::take(10);
| ^~~~~
p1059.cpp:862:30: error: 'views' has not been declared
862 | auto ints = views::iota(0) | views::take(10);
| ^~~~~
p1059.cpp:863:1: error: expected unqualified-id before 'for'
863 | for (auto i : ints | views::drop(5)) {
| ^~~
p1059.cpp:876:17: error: 'simple' was not declared in this scope
876 | requires (!(simple-view<V> &&
| ^~~~~~
p1059.cpp:880:37: error: 'simple' was not declared in this scope
880 | constexpr auto end() requires (!simple-view<V>)
| ^~~~~~
p1059.cpp: In member function 'constexpr auto std::ranges::drop_view<V>::end() requires <erroneous-expression>':
p1059.cpp:882:24: error: reference to 'end' is ambiguous
882 | return ranges::end(base_);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp: In member function 'constexpr auto std::ranges::drop_view<V>::end() const requires range<const V':
p1059.cpp:886:24: error: reference to 'end' is ambiguous
886 | return ranges::end(base_);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp: In member function 'constexpr auto std::ranges::drop_view<V>::size() requires sized_range<V>':
p1059.cpp:889:32: error: reference to 'size' is ambiguous
889 | const auto s = ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::drop_view<V>::size() const requires sized_range<const V>':
p1059.cpp:894:32: error: reference to 'size' is ambiguous
894 | const auto s = ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:904:52: error: 'views' was not declared in this scope; did you mean 'view'?
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope; did you mean 'view'?
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope; did you mean 'view'?
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:52: error: 'views' was not declared in this scope; did you mean 'view'?
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:904:66: error: template argument 1 is invalid
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:42: error: invalid template-id
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:904:52: error: 'views' has not been declared
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:904:66: error: expected primary-expression before '>>' token
904 | drop_view(R&&, range_difference_t<R>) -> drop_view<views::all_t<R>>;
| ^~
p1059.cpp:904:66: error: expected initializer before '>' token
p1059.cpp:906:11: error: ISO C++ forbids declaration of 'drop_view' with no type [-fpermissive]
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^~~~~~~~~
p1059.cpp:906:21: error: 'V' was not declared in this scope
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:906:48: error: 'V' was not declared in this scope
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:906:48: error: 'V' was not declared in this scope
p1059.cpp:906:48: error: 'V' was not declared in this scope
p1059.cpp:906:48: error: 'V' was not declared in this scope
p1059.cpp:906:48: error: 'V' was not declared in this scope
p1059.cpp:906:29: error: 'range_difference_t' was not declared in this scope; did you mean 'std::ranges::range_difference_t'?
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^~~~~~~~~~~~~~~~~~
| std::ranges::range_difference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:601:11: note: 'std::ranges::range_difference_t' declared here
601 | using range_difference_t = iter_difference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:906:48: error: 'V' was not declared in this scope
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:906:51: error: 'count' was not declared in this scope
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^~~~~
p1059.cpp:906:56: error: expression list treated as compound expression in initializer [-fpermissive]
906 | constexpr drop_view(V base, range_difference_t<V> count);
| ^
p1059.cpp:909:13: error: 'simple' was not declared in this scope
909 | requires (!(simple-view<V> &&
| ^~~~~~
p1059.cpp:909:25: error: 'V' was not declared in this scope
909 | requires (!(simple-view<V> &&
| ^
p1059.cpp:909:25: error: 'V' was not declared in this scope
p1059.cpp:909:25: error: 'V' was not declared in this scope
p1059.cpp:909:25: error: 'V' was not declared in this scope
p1059.cpp:909:25: error: 'V' was not declared in this scope
p1059.cpp:909:20: error: 'view' was not declared in this scope; did you mean 'std::ranges::view'?
909 | requires (!(simple-view<V> &&
| ^~~~
| std::ranges::view
/usr/local/include/c++/12.1.0/bits/ranges_base.h:649:13: note: 'std::ranges::view' declared here
649 | concept view
| ^~~~
p1059.cpp:909:25: error: 'V' was not declared in this scope
909 | requires (!(simple-view<V> &&
| ^
p1059.cpp:910:13: error: label 'random_access_range' referenced outside of any function
910 | random_access_range<const V> && sized_range<const V>));
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:910:33: error: expected primary-expression before 'const'
910 | random_access_range<const V> && sized_range<const V>));
| ^~~~~
p1059.cpp:910:33: error: expected ')' before 'const'
910 | random_access_range<const V> && sized_range<const V>));
| ^~~~~
| )
p1059.cpp:909:12: note: to match this '('
909 | requires (!(simple-view<V> &&
| ^
p1059.cpp:910:67: error: expected ')' before ';' token
910 | random_access_range<const V> && sized_range<const V>));
| ^
| )
p1059.cpp:909:10: note: to match this '('
909 | requires (!(simple-view<V> &&
| ^
p1059.cpp:908:16: error: constraints on a non-templated function
908 | constexpr auto begin()
| ^~~~~
p1059.cpp:908:16: error: ambiguating new declaration of 'constexpr auto begin()'
p1059.cpp:405:27: note: old declaration 'constexpr int begin()'
405 | constexpr iterator<false> begin();
| ^~~~~
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
912 | requires random_access_range<const V> && sized_range<const V>;
| ^
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:912:10: error: 'random_access_range' was not declared in this scope; did you mean 'std::ranges::random_access_range'?
912 | requires random_access_range<const V> && sized_range<const V>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::random_access_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:675:13: note: 'std::ranges::random_access_range' declared here
675 | concept random_access_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:912:1: error: expression must be enclosed in parentheses
912 | requires random_access_range<const V> && sized_range<const V>;
| ^~~~~~~~
p1059.cpp:912:10: error: expected initializer before 'random_access_range'
912 | requires random_access_range<const V> && sized_range<const V>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:923:16: error: 'views' has not been declared
923 | auto skip_ws = views::drop_while(source, is_invisible);
| ^~~~~
p1059.cpp:924:1: error: expected unqualified-id before 'for'
924 | for (auto c : skip_ws) {
| ^~~
p1059.cpp:953:11: error: ISO C++ forbids declaration of 'drop_while_view' with no type [-fpermissive]
953 | constexpr drop_while_view(V base, Pred pred);
| ^~~~~~~~~~~~~~~
p1059.cpp:953:27: error: 'V' was not declared in this scope
953 | constexpr drop_while_view(V base, Pred pred);
| ^
p1059.cpp:953:35: error: 'Pred' was not declared in this scope
953 | constexpr drop_while_view(V base, Pred pred);
| ^~~~
p1059.cpp:953:44: error: expression list treated as compound expression in initializer [-fpermissive]
953 | constexpr drop_while_view(V base, Pred pred);
| ^
p1059.cpp:954:17: error: 'Pred' does not name a type
954 | constexpr const Pred& pred() const;
| ^~~~
p1059.cpp:959:1: error: expected unqualified-id before 'return'
959 | return *pred_;
| ^~~~~~
p1059.cpp:960:16: error: ambiguating new declaration of 'constexpr auto begin()'
960 | constexpr auto begin();
| ^~~~~
p1059.cpp:405:27: note: old declaration 'constexpr int begin()'
405 | constexpr iterator<false> begin();
| ^~~~~
p1059.cpp:968:1: error: expected unqualified-id before 'for'
968 | for (char ch : ss | views::join)
| ^~~
p1059.cpp:984:5: error: 'non' does not name a type
984 | non-propagating-cache<remove_cv_t<InnerRng>> inner_;
| ^~~
p1059.cpp: In member function 'constexpr auto std::ranges::join_view<V>::begin()':
p1059.cpp:990:36: error: 'simple' was not declared in this scope
990 | constexpr bool use_const = simple-view<V> &&
| ^~~~~~
p1059.cpp:992:36: error: expected primary-expression before '{' token
992 | return iterator<use_const> {*this, ranges::begin(base_)};
| ^
p1059.cpp:992:36: error: expected ';' before '{' token
p1059.cpp:992:52: error: reference to 'begin' is ambiguous
992 | return iterator<use_const> {*this, ranges::begin(base_)};
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:992:64: error: expected ';' before '}' token
992 | return iterator<use_const> {*this, ranges::begin(base_)};
| ^
p1059.cpp: In member function 'constexpr auto std::ranges::join_view<V>::begin() const requires (input_range<const V>) && (is_reference_v<decltype(*(declval<decltype(std::ranges::__cust_access::__begin((declval<const V&>)()))&>)())>)':
p1059.cpp:1005:31: error: expected primary-expression before '{' token
1005 | return iterator<true> {*this, ranges::begin(base_)};
| ^
p1059.cpp:1005:31: error: expected ';' before '{' token
p1059.cpp:1005:47: error: reference to 'begin' is ambiguous
1005 | return iterator<true> {*this, ranges::begin(base_)};
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:1005:59: error: expected ';' before '}' token
1005 | return iterator<true> {*this, ranges::begin(base_)};
| ^
p1059.cpp: In member function 'constexpr auto std::ranges::join_view<V>::end()':
p1059.cpp:1010:82: error: 'simple' was not declared in this scope
1010 | common_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^~~~~~
p1059.cpp:1010:95: error: template argument 1 is invalid
1010 | common_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^~
p1059.cpp:1010:98: error: expected ';' before '{' token
1010 | common_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^
p1059.cpp:1008:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1008 | if constexpr (forward_range<V> &&
| ^~
p1059.cpp:1010:98: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1010 | common_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^
p1059.cpp:1010:114: error: reference to 'end' is ambiguous
1010 | mmon_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:1010:124: error: expected ';' before '}' token
1010 | mon_range<V> && common_range<InnerRng>) return iterator<simple-view<V>> {*this, ranges::end(base_)};
| ^
p1059.cpp:1011:9: error: 'else' without a previous 'if'
1011 | else
| ^~~~
p1059.cpp:1012:29: error: 'simple' was not declared in this scope
1012 | return sentinel<simple-view<V>> {*this};
| ^~~~~~
p1059.cpp:1012:42: error: template argument 1 is invalid
1012 | return sentinel<simple-view<V>> {*this};
| ^~
p1059.cpp: In member function 'constexpr auto std::ranges::join_view<V>::end() const requires (input_range<const V>) && (is_reference_v<decltype(*(declval<decltype(std::ranges::__cust_access::__begin((declval<const V&>)()))&>)())>)':
p1059.cpp:1021:35: error: expected primary-expression before '{' token
1021 | return iterator<true> {*this, ranges::end(base_)};
| ^
p1059.cpp:1021:35: error: expected ';' before '{' token
p1059.cpp:1017:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1017 | if constexpr (forward_range<const V> &&
| ^~
p1059.cpp:1021:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1021 | return iterator<true> {*this, ranges::end(base_)};
| ^
p1059.cpp:1021:51: error: reference to 'end' is ambiguous
1021 | return iterator<true> {*this, ranges::end(base_)};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:1021:61: error: expected ';' before '}' token
1021 | return iterator<true> {*this, ranges::end(base_)};
| ^
p1059.cpp:1022:9: error: 'else' without a previous 'if'
1022 | else
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:1027:38: error: 'views' was not declared in this scope; did you mean 'view'?
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1027:52: error: template argument 1 is invalid
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:38: error: 'views' was not declared in this scope; did you mean 'view'?
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1027:52: error: template argument 1 is invalid
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:38: error: 'views' was not declared in this scope; did you mean 'view'?
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1027:52: error: template argument 1 is invalid
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:38: error: 'views' was not declared in this scope; did you mean 'view'?
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1027:52: error: template argument 1 is invalid
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:28: error: invalid template-id
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~~~~~
p1059.cpp:1027:38: error: 'views' has not been declared
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:1027:52: error: expected primary-expression before '>>' token
1027 | explicit join_view(R&&) -> join_view<views::all_t<R>>;
| ^~
p1059.cpp:1027:52: error: expected initializer before '>' token
p1059.cpp:1029:20: error: ISO C++ forbids declaration of 'join_view' with no type [-fpermissive]
1029 | constexpr explicit join_view(V base);
| ^~~~~~~~~
p1059.cpp:1029:11: error: 'explicit' outside class declaration
1029 | constexpr explicit join_view(V base);
| ^~~~~~~~
p1059.cpp:1029:30: error: 'V' was not declared in this scope
1029 | constexpr explicit join_view(V base);
| ^
p1059.cpp:1037:20: error: 'maybe' does not name a type
1037 | using Parent = maybe-const<Const, join_view>;
| ^~~~~
p1059.cpp:1038:18: error: 'maybe' does not name a type
1038 | using Base = maybe-const<Const, V>;
| ^~~~~
p1059.cpp:1039:34: error: 'Base' was not declared in this scope; did you mean 'base'?
1039 | using OuterIter = iterator_t<Base>;
| ^~~~
| base
p1059.cpp:1039:38: error: template argument 1 is invalid
1039 | using OuterIter = iterator_t<Base>;
| ^
p1059.cpp:1040:52: error: 'Base' was not declared in this scope; did you mean 'base'?
1040 | using InnerIter = iterator_t<range_reference_t<Base>>;
| ^~~~
| base
p1059.cpp:1040:52: error: template argument 1 is invalid
p1059.cpp:1040:56: error: template argument 1 is invalid
1040 | using InnerIter = iterator_t<range_reference_t<Base>>;
| ^~
p1059.cpp:1041:27: error: 'constexpr' static data member 'ref' must have an initializer
1041 | static constexpr bool ref-is-glvalue = is_reference_v<range_reference_t<Base>>;
| ^~~
p1059.cpp:1041:27: error: expected ';' at end of member declaration
1041 | static constexpr bool ref-is-glvalue = is_reference_v<range_reference_t<Base>>;
| ^~~
| ;
p1059.cpp:1041:30: error: expected unqualified-id before '-' token
1041 | static constexpr bool ref-is-glvalue = is_reference_v<range_reference_t<Base>>;
| ^
p1059.cpp:1042:5: error: 'OuterIter' does not name a type
1042 | OuterIter outer_ = OuterIter();
| ^~~~~~~~~
p1059.cpp:1043:5: error: 'InnerIter' does not name a type
1043 | InnerIter inner_ = InnerIter();
| ^~~~~~~~~
p1059.cpp:1044:5: error: 'Parent' does not name a type
1044 | Parent* parent_ = nullptr;
| ^~~~~~
p1059.cpp:1051:30: error: 'see' does not name a type
1051 | using iterator_concept = see below ;
| ^~~
p1059.cpp:1052:32: error: 'see_below' does not name a type
1052 | using iterator_category = see_below ;
| ^~~~~~~~~
p1059.cpp:1053:66: error: 'Base' was not declared in this scope; did you mean 'base'?
1053 | using value_type = range_value_t<range_reference_t<Base>>;
| ^~~~
| base
p1059.cpp:1053:66: error: template argument 1 is invalid
p1059.cpp:1053:70: error: template argument 1 is invalid
1053 | using value_type = range_value_t<range_reference_t<Base>>;
| ^~
p1059.cpp:1054:33: error: 'see_below' does not name a type
1054 | using difference_type = see_below;
| ^~~~~~~~~
p1059.cpp:1055:47: error: 'OuterIter' was not declared in this scope
1055 | iterator() requires default_initializable<OuterIter> && default_initializable<InnerIter> = default;
| ^~~~~~~~~
p1059.cpp:1055:25: error: template argument 1 is invalid
1055 | iterator() requires default_initializable<OuterIter> && default_initializable<InnerIter> = default;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1055:83: error: 'InnerIter' was not declared in this scope; did you mean 'inserter'?
1055 | iterator() requires default_initializable<OuterIter> && default_initializable<InnerIter> = default;
| ^~~~~~~~~
| inserter
p1059.cpp:1055:61: error: template argument 1 is invalid
1055 | iterator() requires default_initializable<OuterIter> && default_initializable<InnerIter> = default;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1063:31: error: expected ')' before '&' token
1063 | constexpr iterator (Parent & parent, OuterIter outer);
| ~ ^~
| )
p1059.cpp:1066:35: error: 'OuterIter' was not declared in this scope
1066 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~
p1059.cpp:1066:5: error: template argument 2 is invalid
1066 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1066:86: error: 'InnerIter' was not declared in this scope; did you mean 'inserter'?
1066 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~
| inserter
p1059.cpp:1066:49: error: template argument 2 is invalid
1066 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1069:17: error: 'InnerIter' does not name a type
1069 | } constexpr InnerIter operator->() const
| ^~~~~~~~~
p1059.cpp:1074:17: error: no match for 'operator-' (operand types are 'const bool' and 'std::vector<int>')
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ~~~^~~
| | |
| | std::vector<int>
| const bool
In file included from /usr/local/include/c++/12.1.0/string:47:
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'const bool'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'const bool'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
In file included from N4910.h:9:
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1074:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~
p1059.cpp:1074:21: error: 'glvalue' was not declared in this scope
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~~~~~~
p1059.cpp:1074:46: error: 'Base' was not declared in this scope; did you mean 'base'?
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1074:32: error: template argument 1 is invalid
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~
p1059.cpp:1074:88: error: 'Base' was not declared in this scope; did you mean 'base'?
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1074:88: error: template argument 1 is invalid
p1059.cpp:1074:56: error: template argument 1 is invalid
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1074:53: error: expression must be enclosed in parentheses
1074 | requires ref-is-glvalue && forward_range<Base > && forward_range<range_reference_t<Base >>;
p1059.cpp:1076:17: error: no match for 'operator-' (operand types are 'const bool' and 'std::vector<int>')
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ~~~^~~
| | |
| | std::vector<int>
| const bool
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'const bool'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'const bool'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1076:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
p1059.cpp:1076:21: error: 'glvalue' was not declared in this scope
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~
p1059.cpp:1076:52: error: 'Base' was not declared in this scope; did you mean 'base'?
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
| base
p1059.cpp:1076:32: error: template argument 1 is invalid
1076 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1077:43: error: 'Base' was not declared in this scope; did you mean 'base'?
1077 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1077:43: error: template argument 1 is invalid
p1059.cpp:1077:5: error: template argument 1 is invalid
1077 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1077:84: error: 'Base' was not declared in this scope; did you mean 'base'?
1077 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1077:84: error: template argument 1 is invalid
p1059.cpp:1077:53: error: template argument 1 is invalid
1077 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1077:50: error: expression must be enclosed in parentheses
1077 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
p1059.cpp:1079:17: error: no match for 'operator-' (operand types are 'const bool' and 'std::vector<int>')
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ~~~^~~
| | |
| | std::vector<int>
| const bool
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'const bool'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'const bool'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1079:18: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
p1059.cpp:1079:21: error: 'glvalue' was not declared in this scope
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~
p1059.cpp:1079:52: error: 'Base' was not declared in this scope; did you mean 'base'?
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
| base
p1059.cpp:1079:32: error: template argument 1 is invalid
1079 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1080:43: error: 'Base' was not declared in this scope; did you mean 'base'?
1080 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1080:43: error: template argument 1 is invalid
p1059.cpp:1080:5: error: template argument 1 is invalid
1080 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1080:84: error: 'Base' was not declared in this scope; did you mean 'base'?
1080 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
| base
p1059.cpp:1080:84: error: template argument 1 is invalid
p1059.cpp:1080:53: error: template argument 1 is invalid
1080 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1080:50: error: expression must be enclosed in parentheses
1080 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
p1059.cpp:1081:88: error: no match for 'operator-' (operand types are 'const bool' and 'std::vector<int>')
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ~~~^~~
| | |
| | std::vector<int>
| const bool
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'const bool'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'const bool'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1081:89: note: mismatched types 'const std::complex<_Tp>' and 'const bool'
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~
p1059.cpp:1081:92: error: 'glvalue' was not declared in this scope
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~~~~~~
p1059.cpp:1081:134: error: 'Base' was not declared in this scope; did you mean 'base'?
1081 | iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~~~
| base
p1059.cpp:1081:134: error: template argument 1 is invalid
p1059.cpp:1081:103: error: template argument 1 is invalid
1081 | nstexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1082:62: error: 'Base' was not declared in this scope; did you mean 'base'?
1082 | equality_comparable<iterator_t<range_reference_t<Base >>>;
| ^~~~
| base
p1059.cpp:1082:62: error: template argument 1 is invalid
p1059.cpp:1082:67: error: template argument 1 is invalid
1082 | equality_comparable<iterator_t<range_reference_t<Base >>>;
| ^~
p1059.cpp:1082:13: error: template argument 1 is invalid
1082 | equality_comparable<iterator_t<range_reference_t<Base >>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1081:142: error: expression must be enclosed in parentheses
1081 | iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
p1059.cpp:1081:27: error: constraints on a non-templated function
1081 | friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref-is-glvalue && equality_comparable<iterator_t<Base >> &&
| ^~~~~~~~
p1059.cpp:1082:13: warning: friend declaration 'constexpr bool std::ranges::operator==(const join_view<V>::iterator<Const>&, const join_view<V>::iterator<Const>&)' declares a non-template function [-Wnon-template-friend]
1082 | equality_comparable<iterator_t<range_reference_t<Base >>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1082:13: note: (if this is not what you intended, make sure the function template has already been declared and add '<>' after the function name here)
p1059.cpp:1087:35: error: 'InnerIter' was not declared in this scope; did you mean 'inserter'?
1087 | requires indirectly_swappable<InnerIter>;
| ^~~~~~~~~
| inserter
p1059.cpp:1087:14: error: template argument 1 is invalid
1087 | requires indirectly_swappable<InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1087:14: error: template argument 2 is invalid
p1059.cpp:1086:27: error: constraints on a non-templated function
1086 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~~~~~
p1059.cpp:1087:14: warning: friend declaration 'constexpr void std::ranges::iter_swap(const join_view<V>::iterator<Const>&, const join_view<V>::iterator<Const>&)' declares a non-template function [-Wnon-template-frien]
1087 | requires indirectly_swappable<InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp: In member function 'constexpr decltype(auto) std::ranges::join_view<V>::iterator<Const>::operator*() const':
p1059.cpp:1068:17: error: 'inner_' was not declared in this scope
1068 | return *inner_;
| ^~~~~~
p1059.cpp: At global scope:
p1059.cpp:1093:27: error: 'V' was not declared in this scope
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:27: error: 'V' was not declared in this scope
p1059.cpp:1093:16: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1059.cpp:1093:27: error: 'V' was not declared in this scope
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^
p1059.cpp:1093:1: error: wrong number of template arguments (1, should be 2)
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/compare:39,
from /usr/local/include/c++/12.1.0/bits/char_traits.h:45:
/usr/local/include/c++/12.1.0/concepts:72:13: note: provided for 'template<class _From, class _To> concept std::convertible_to'
72 | concept convertible_to = is_convertible_v<_From, _To>
| ^~~~~~~~~~~~~~
p1059.cpp:1093:1: error: '<expression error>' does not name a type
1093 | convertible_to<iterator_t<V>, OuterIter> && convertible_to<iterator_t<InnerRng>, InnerIter>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
p1059.cpp:1097:1: error: 'range_difference_t' was not declared in this scope; did you mean 'std::ranges::range_difference_t'?
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~~~~~~~~~~~~~~~
| std::ranges::range_difference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:601:11: note: 'std::ranges::range_difference_t' declared here
601 | using range_difference_t = iter_difference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:1097:20: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:25: error: template argument 1 is invalid
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^
p1059.cpp:1097:26: error: expected unqualified-id before ',' token
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:47: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:47: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
p1059.cpp:1097:47: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1097:65: error: 'Base' was not declared in this scope
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^~~~
p1059.cpp:1097:46: error: expected initializer before '<' token
1097 | range_difference_t<Base >, range_difference_t<range_reference_t<Base >>>
| ^
p1059.cpp:1101:22: error: invalid use of 'this' at top level
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^~~~
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^~~~
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
p1059.cpp:1101:45: error: 'Base' was not declared in this scope
p1059.cpp:1101:34: error: 'iterator_t' does not name a type; did you mean 'error_t'?
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^~~~~~~~~~
| error_t
p1059.cpp:1106:2: error: expected ')' before ';' token
1106 | };
| ^
| )
p1059.cpp:1101:27: note: to match this '('
1101 | auto update_inner = [this](const iterator_t<Base>& x) -> auto&& {
| ^
p1059.cpp: In lambda function:
p1059.cpp:1106:2: error: expected '{' before ';' token
1106 | };
| ^
p1059.cpp: At global scope:
p1059.cpp:1107:1: error: expected unqualified-id before 'for'
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~~
p1059.cpp:1107:8: error: 'outer_' does not name a type
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~~~~~
p1059.cpp:1107:47: error: expected unqualified-id before '++' token
1107 | for (; outer_ != ranges::end(parent_->base_); ++outer_) {
| ^~
p1059.cpp:1113:1: error: expected unqualified-id before 'if'
1113 | if constexpr (ref-is-glvalue) inner_ = InnerIter();
| ^~
p1059.cpp:1114:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1114 | constexpr iterator (Parent & parent, OuterIter
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1114:27: error: expected ')' before '&' token
1114 | constexpr iterator (Parent & parent, OuterIter
| ~ ^~
| )
p1059.cpp:1121:31: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1121 | constexpr iterator& operator++(); Let inner-range be:
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1121:31: error: deduced class type 'iterator' in function return type
1121 | constexpr iterator& operator++(); Let inner-range be:
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1121:55: error: 'Let' does not name a type
1121 | constexpr iterator& operator++(); Let inner-range be:
| ^~~
p1059.cpp:1126:1: error: expected unqualified-id before 'if'
1126 | if (++inner_ == ranges::end(inner_rng)) {
| ^~
p1059.cpp:1130:1: error: expected unqualified-id before 'return'
1130 | return *this;
| ^~~~~~
p1059.cpp:1131:23: error: 'constexpr void operator++(int)' must have an argument of class or enumerated type
1131 | constexpr void operator++(int);
| ^~~~~~~~
p1059.cpp:1133:18: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1133 | constexpr iterator operator++(int)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1134:20: error: no match for 'operator-' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ~~~^~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1134:21: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_IteratorR>'
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1134:21: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorR>'
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1134:21: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&) [with _Tp = vector<int>]'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:35: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::complex<std::vector<int> >&'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1134:21: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1134:21: note: candidate expects 1 argument, 2 provided
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~
p1059.cpp:1134:24: error: 'glvalue' was not declared in this scope
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~~~~~
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~~
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
p1059.cpp:1134:35: error: 'forward_range' was not declared in this scope; did you mean 'std::ranges::forward_range'?
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~~~~~~~~~~~
| std::ranges::forward_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:665:13: note: 'std::ranges::forward_range' declared here
665 | concept forward_range
| ^~~~~~~~~~~~~
p1059.cpp:1134:49: error: 'Base' was not declared in this scope
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~~
p1059.cpp:1135:8: error: label 'forward_range' referenced outside of any function
1135 | forward_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
1135 | forward_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
p1059.cpp:1135:22: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1135 | forward_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1135:40: error: 'Base' was not declared in this scope
1135 | forward_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1134:8: error: expression must be enclosed in parentheses
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~~~~~~
p1059.cpp:1134:17: error: expected initializer before 'ref'
1134 | requires ref-is-glvalue && forward_range<Base > &&
| ^~~
p1059.cpp:1137:8: error: 'outer' does not name a type
1137 | outer);
| ^~~~~
p1059.cpp:1138:13: error: invalid use of 'this' at top level
1138 | auto tmp = *this;
| ^~~~
p1059.cpp:1139:1: error: expected unqualified-id before '++' token
1139 | ++*this;
| ^~
p1059.cpp:1140:1: error: expected unqualified-id before 'return'
1140 | return tmp;
| ^~~~~~
p1059.cpp:1141:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1141 | constexpr iterator& operator--()
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1142:13: error: no match for 'operator-' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ~~~^~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1142:14: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_IteratorR>'
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1142:14: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorR>'
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1142:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&) [with _Tp = vector<int>]'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:35: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::complex<std::vector<int> >&'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1142:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1142:14: note: candidate expects 1 argument, 2 provided
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
p1059.cpp:1142:17: error: 'glvalue' was not declared in this scope
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
p1059.cpp:1142:28: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1142:48: error: 'Base' was not declared in this scope
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1143:1: error: label 'bidirectional_range' referenced outside of any function
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
p1059.cpp:1143:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1143:39: error: 'Base' was not declared in this scope
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1143:49: error: label 'common_range' referenced outside of any function
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
p1059.cpp:1143:62: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1143:80: error: 'Base' was not declared in this scope
1143 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1142:1: error: expression must be enclosed in parentheses
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~
p1059.cpp:1142:10: error: expected initializer before 'ref'
1142 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~
p1059.cpp:1145:1: error: expected unqualified-id before 'if'
1145 | if (outer_ == ranges::end(parent_->base_)) inner_ = ranges::end(*--outer_);
| ^~
p1059.cpp:1146:1: error: expected unqualified-id before 'while'
1146 | while (inner_ == ranges::begin(*outer_)) inner_ = ranges::end(*--outer_);
| ^~~~~
p1059.cpp:1147:1: error: expected unqualified-id before '--' token
1147 | --inner_;
| ^~
p1059.cpp:1148:1: error: expected unqualified-id before 'return'
1148 | return *this;
| ^~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
p1059.cpp:1149:21: error: 'range_reference_t' was not declared in this scope; did you mean 'std::ranges::range_reference_t'?
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~
| std::ranges::range_reference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:607:11: note: 'std::ranges::range_reference_t' declared here
607 | using range_reference_t = iter_reference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1149:39: error: 'Base' was not declared in this scope
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~
p1059.cpp:1149:1: error: 'bidirectional_range' does not name a type
1149 | bidirectional_range<range_reference_t<Base>> && common_range<range_reference_t<Base >>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1151:13: error: invalid use of 'this' at top level
1151 | auto tmp = *this;
| ^~~~
p1059.cpp:1152:1: error: expected unqualified-id before '--' token
1152 | --*this;
| ^~
p1059.cpp:1153:1: error: expected unqualified-id before 'return'
1153 | return tmp;
| ^~~~~~
p1059.cpp:1154:1: error: expected unqualified-id before 'requires'
1154 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
p1059.cpp:1156:23: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:1156:34: error: 'Base' was not declared in this scope
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:1156:10: error: wrong number of template arguments (1, should be 2)
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:619:13: note: provided for 'template<class _Sent, class _Iter> concept std::sentinel_for'
619 | concept sentinel_for = semiregular<_Sent>
| ^~~~~~~~~~~~
p1059.cpp:1156:39: error: expected unqualified-id before ',' token
1156 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:1158:1: error: expected declaration before '}' token
1158 | };
| ^
p1059.cpp:1159:1: error: expected declaration before '}' token
1159 | }
| ^
p1059.cpp:1160:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~~~
p1059.cpp:1160:11: error: 'explicit' outside class declaration
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~~~
p1059.cpp:1160:20: error: redefinition of 'constexpr const int sentinel'
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~~~
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:1160:29: error: 'Parent' was not declared in this scope
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~
p1059.cpp:1160:37: error: 'parent' was not declared in this scope
1160 | constexpr explicit sentinel(Parent& parent);
| ^~~~~~
p1059.cpp:1162:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1162 | constexpr iterator operator--(int)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1163:13: error: no match for 'operator-' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ~~~^~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1163:14: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_IteratorR>'
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1163:14: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorR>'
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1163:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&) [with _Tp = vector<int>]'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:35: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::complex<std::vector<int> >&'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1163:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1163:14: note: candidate expects 1 argument, 2 provided
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
p1059.cpp:1163:17: error: 'glvalue' was not declared in this scope
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
p1059.cpp:1163:28: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1163:48: error: 'Base' was not declared in this scope
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1163:1: error: expression must be enclosed in parentheses
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~
p1059.cpp:1163:10: error: expected initializer before 'ref'
1163 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~
p1059.cpp:1167:1: error: 'friend' used outside of class
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~~
| ------
p1059.cpp:1167:33: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1167:50: error: expected ')' before ',' token
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ~ ^
| )
p1059.cpp:1167:52: error: expected unqualified-id before 'const'
1167 | friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.inner_, y.inner_)))
| ^~~~~
p1059.cpp:1170:1: error: expected unqualified-id before 'return'
1170 | return ranges::iter_swap(x.inner_, y.inner_);
| ^~~~~~
p1059.cpp:1177:20: error: 'maybe' does not name a type
1177 | using Parent = maybe-const <Const, join_view>;
| ^~~~~
p1059.cpp:1178:18: error: 'maybe' does not name a type
1178 | using Base = maybe-const <Const, V>;
| ^~~~~
p1059.cpp:1179:16: error: 'Base' was not declared in this scope; did you mean 'base'?
1179 | sentinel_t<Base > end_ = sentinel_t<Base >();
| ^~~~
| base
p1059.cpp:1179:21: error: template argument 1 is invalid
1179 | sentinel_t<Base > end_ = sentinel_t<Base >();
| ^
p1059.cpp:1182:39: error: expected ')' before '&' token
1182 | constexpr explicit sentinel(Parent& parent);
| ~ ^
| )
p1059.cpp:1183:42: error: expected ';' at end of member declaration
1183 | constexpr sentinel(sentinel<!Const> s)
| ^
| ;
p1059.cpp:1186:64: error: 'Base' was not declared in this scope; did you mean 'base'?
1186 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~
| base
p1059.cpp:1186:64: error: template argument 1 is invalid
p1059.cpp:1186:23: error: template argument 2 is invalid
1186 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1191:38: error: 'Base' was not declared in this scope; did you mean 'base'?
1191 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
| base
p1059.cpp:1191:42: error: template argument 1 is invalid
1191 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:1191:56: error: 'maybe' was not declared in this scope
1191 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~
p1059.cpp:1191:81: error: template argument 1 is invalid
1191 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~
p1059.cpp:1191:14: error: template argument 1 is invalid
1191 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1191:14: error: template argument 2 is invalid
p1059.cpp:1194:5: error: expected unqualified-id before 'return'
1194 | return x.outer_ == y.end_;
| ^~~~~~
p1059.cpp:1195:2: error: expected ';' after struct definition
1195 | }
| ^
| ;
p1059.cpp:1179:41: error: 'Base' was not declared in this scope; did you mean 'base'?
1179 | sentinel_t<Base > end_ = sentinel_t<Base >();
| ^~~~
| base
p1059.cpp:1179:46: error: template argument 1 is invalid
1179 | sentinel_t<Base > end_ = sentinel_t<Base >();
| ^
p1059.cpp:1201:1: error: expected unqualified-id before 'for'
1201 | for (char c : vs | join_with('-')) {
| ^~~
p1059.cpp:1208:19: error: expected '=' before '-' token
1208 | concept compatible-joinable-ranges =
| ^
p1059.cpp:1213:22: error: expected '=' before '-' token
1213 | concept bidirectional-common = bidirectional_range<R> && common_range<R>;
| ^
p1059.cpp:1217:12: error: 'compatible' was not declared in this scope; did you mean 'copyable'?
1217 | && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| copyable
p1059.cpp:1217:23: error: 'joinable' was not declared in this scope
1217 | && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~
p1059.cpp:1217:9: error: expression must be enclosed in parentheses
1217 | && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~
p1059.cpp:1217:12: error: 'compatible' does not name a type; did you mean 'volatile'?
1217 | && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| volatile
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:44: error: 'views' was not declared in this scope; did you mean 'view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1272:29: error: 'join_with_view' does not name a type; did you mean 'join_view'?
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~~~~~~~~~~
| join_view
p1059.cpp:1272:43: error: expected constructor, destructor, or type conversion before '<' token
1272 | join_with_view(R&&, P&&) -> join_with_view<views::all_t<R>, views::all_t<P>>;
| ^
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:19: error: 'views' was not declared in this scope; did you mean 'view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~
| view
p1059.cpp:1275:4: error: 'join_with_view' does not name a type; did you mean 'join_view'?
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^~~~~~~~~~~~~~
| join_view
p1059.cpp:1275:18: error: expected constructor, destructor, or type conversion before '<' token
1275 | -> join_with_view<views::all_t<R>, single_view<range_value_t<range_reference_t<R>>>>;
| ^
p1059.cpp:1277:11: error: ISO C++ forbids declaration of 'join_with_view' with no type [-fpermissive]
1277 | constexpr join_with_view(V base, Pattern pattern);
| ^~~~~~~~~~~~~~
p1059.cpp:1277:26: error: 'V' was not declared in this scope
1277 | constexpr join_with_view(V base, Pattern pattern);
| ^
p1059.cpp:1277:34: error: 'Pattern' was not declared in this scope
1277 | constexpr join_with_view(V base, Pattern pattern);
| ^~~~~~~
p1059.cpp:1277:49: error: expression list treated as compound expression in initializer [-fpermissive]
1277 | constexpr join_with_view(V base, Pattern pattern);
| ^
p1059.cpp:1279:10: error: 'input_range' has not been declared
1279 | template<input_range R>
| ^~~~~~~~~~~
p1059.cpp:1280:29: error: 'V' was not declared in this scope
1280 | requires constructible_from<V, views::all_t<R>> &&
| ^
p1059.cpp:1280:32: error: 'views' was not declared in this scope
1280 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~
p1059.cpp:1280:10: error: parse error in template argument list
1280 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1280:10: error: template argument 1 is invalid
p1059.cpp:1280:10: error: template argument 2 is invalid
p1059.cpp:1281:28: error: 'Pattern' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:37: error: 'single_view' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
p1059.cpp:1281:49: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~
| std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
604 | using range_value_t = iter_value_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~
p1059.cpp:1281:63: error: 'InnerRng' was not declared in this scope
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~
p1059.cpp:1281:9: error: template argument 1 is invalid
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1281:9: error: template argument 2 is invalid
p1059.cpp:1281:73: error: expected unqualified-id before '>' token
1281 | constructible_from<Pattern, single_view<range_value_t<InnerRng>>> constexpr join_with_view(R&& r, range_value_t<InnerRng> e);
| ^
p1059.cpp:1287:29: error: 'compatible' was not declared in this scope; did you mean 'copyable'?
1287 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| copyable
p1059.cpp:1287:40: error: 'joinable' was not declared in this scope
1287 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~
p1059.cpp:1287:26: error: expression must be enclosed in parentheses
1287 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~
p1059.cpp:1287:29: error: 'compatible' does not name a type; did you mean 'volatile'?
1287 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| volatile
p1059.cpp:1353:59: error: 'InnerIter' was not declared in this scope
1353 | is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^~~~~~~~~
p1059.cpp:1353:69: error: template argument 1 is invalid
1353 | is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^
p1059.cpp:1353:89: error: 'PatternIter' was not declared in this scope
1353 | is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^~~~~~~~~~~
p1059.cpp:1353:89: error: template argument 1 is invalid
p1059.cpp:1353:101: error: template argument 1 is invalid
1353 | lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^~
p1059.cpp:1353:101: error: template argument 2 is invalid
p1059.cpp:1353:1: error: 'is_lvalue_reference_v<<expression error> >' does not name a type
1353 | is_lvalue_reference_v<common_reference_t<iter_reference_t<InnerIter >, iter_reference_t<PatternIter >>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1361:1: error: expected unqualified-id before 'if'
1361 | if constexpr (ref-is-glvalue) return *x;
| ^~
p1059.cpp:1362:1: error: expected unqualified-id before 'else'
1362 | else
| ^~~~
p1059.cpp:1364:21: error: expected initializer before '-' token
1364 | constexpr auto&& get-inner(const OuterIter& x);
| ^
p1059.cpp:1366:1: error: expected unqualified-id before 'if'
1366 | if constexpr (ref-is-glvalue) return *x;
| ^~
p1059.cpp:1367:1: error: expected unqualified-id before 'else'
1367 | else
| ^~~~
p1059.cpp:1371:1: error: expected unqualified-id before 'while'
1371 | while (true) {
| ^~~~~
p1059.cpp:1402:38: error: non-member function 'constexpr decltype(auto) operator*()' cannot have cv-qualifier
1402 | constexpr decltype(auto) operator*() const;
| ^~~~~
p1059.cpp:1402:26: error: 'constexpr decltype(auto) operator*()' must have an argument of class or enumerated type
1402 | constexpr decltype(auto) operator*() const;
| ^~~~~~~~
p1059.cpp:1405:41: error: 'InnerIter' was not declared in this scope
1405 | common_reference_t<iter_reference_t<InnerIter>, iter_reference_t<PatternIter>>;
| ^~~~~~~~~
p1059.cpp:1405:50: error: template argument 1 is invalid
1405 | common_reference_t<iter_reference_t<InnerIter>, iter_reference_t<PatternIter>>;
| ^
p1059.cpp:1405:70: error: 'PatternIter' was not declared in this scope
1405 | common_reference_t<iter_reference_t<InnerIter>, iter_reference_t<PatternIter>>;
| ^~~~~~~~~~~
p1059.cpp:1405:70: error: template argument 1 is invalid
p1059.cpp:1405:81: error: template argument 1 is invalid
1405 | common_reference_t<iter_reference_t<InnerIter>, iter_reference_t<PatternIter>>;
| ^~
p1059.cpp:1405:81: error: template argument 2 is invalid
p1059.cpp:1406:1: error: expected unqualified-id before 'return'
1406 | return visit([](auto& it) -> reference {
| ^~~~~~
p1059.cpp:1408:2: error: expected unqualified-id before ',' token
1408 | }, inner_it_);
| ^
p1059.cpp:1408:13: error: expected constructor, destructor, or type conversion before ')' token
1408 | }, inner_it_);
| ^
p1059.cpp:1409:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1409 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1409:11: error: deduced class type 'iterator' in function return type
1409 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1411:6: error: expected constructor, destructor, or type conversion before '(' token
1411 | visit([](auto& it) {
| ^
p1059.cpp:1413:2: error: expected unqualified-id before ',' token
1413 | }, inner_it_);
| ^
p1059.cpp:1413:13: error: expected constructor, destructor, or type conversion before ')' token
1413 | }, inner_it_);
| ^
p1059.cpp:1414:10: error: expected constructor, destructor, or type conversion before ';' token
1414 | satisfy();
| ^
p1059.cpp:1415:1: error: expected unqualified-id before 'return'
1415 | return *this;
| ^~~~~~
p1059.cpp:1416:16: error: 'constexpr void operator++(int)' must have an argument of class or enumerated type
1416 | constexpr void operator++(int);
| ^~~~~~~~
p1059.cpp:1418:1: error: expected unqualified-id before 'requires'
1418 | requires ref-is-glvalue && forward_iterator<OuterIter > &&
| ^~~~~~~~
p1059.cpp:1421:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1421 | iterator tmp = *this;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1421:17: error: invalid use of 'this' at top level
1421 | iterator tmp = *this;
| ^~~~
p1059.cpp:1422:1: error: expected unqualified-id before '++' token
1422 | ++*this;
| ^~
p1059.cpp:1423:1: error: expected unqualified-id before 'return'
1423 | return tmp;
| ^~~~~~
p1059.cpp:1424:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1424 | constexpr iterator& operator--()
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1425:13: error: no match for 'operator-' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ~~~^~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1425:14: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_IteratorR>'
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1425:14: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorR>'
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1425:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&) [with _Tp = vector<int>]'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:35: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::complex<std::vector<int> >&'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1425:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1425:14: note: candidate expects 1 argument, 2 provided
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~
p1059.cpp:1425:17: error: 'glvalue' was not declared in this scope
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~~~~~
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~~
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
p1059.cpp:1425:28: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1425:48: error: 'Base' was not declared in this scope
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~~
p1059.cpp:1427:1: error: label 'bidirectional' referenced outside of any function
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~~~
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
p1059.cpp:1427:15: error: 'common' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~
p1059.cpp:1427:22: error: 'InnerBase' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~
p1059.cpp:1427:36: error: label 'bidirectional' referenced outside of any function
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~~~
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
p1059.cpp:1427:50: error: 'common' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~
p1059.cpp:1427:57: error: 'PatternBase' was not declared in this scope
1427 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~
p1059.cpp:1425:1: error: expression must be enclosed in parentheses
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~~~~~~
p1059.cpp:1425:10: error: expected initializer before 'ref'
1425 | requires ref-is-glvalue && bidirectional_range<Base >
| ^~~
p1059.cpp:1429:1: error: expected unqualified-id before 'if'
1429 | if (outer_it_ == ranges::end(parent_->base_)) {
| ^~
p1059.cpp:1433:1: error: expected unqualified-id before 'while'
1433 | while (true) {
| ^~~~~
p1059.cpp:1454:6: error: expected constructor, destructor, or type conversion before '(' token
1454 | visit([](auto& it) {
| ^
p1059.cpp:1456:2: error: expected unqualified-id before ',' token
1456 | }, inner_it_);
| ^
p1059.cpp:1456:13: error: expected constructor, destructor, or type conversion before ')' token
1456 | }, inner_it_);
| ^
p1059.cpp:1457:1: error: expected unqualified-id before 'return'
1457 | return *this;
| ^~~~~~
p1059.cpp:1458:1: error: 'bidirectional' does not name a type
1458 | bidirectional-common<InnerBase> && bidirectional-common<PatternBase>;
| ^~~~~~~~~~~~~
p1059.cpp:1460:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1460 | iterator tmp = *this;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1460:17: error: invalid use of 'this' at top level
1460 | iterator tmp = *this;
| ^~~~
p1059.cpp:1461:1: error: expected unqualified-id before '--' token
1461 | --*this;
| ^~
p1059.cpp:1462:1: error: expected unqualified-id before 'return'
1462 | return tmp;
| ^~~~~~
p1059.cpp:1463:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1463 | constexpr iterator operator--(int)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1464:13: error: no match for 'operator-' (operand types are '<unresolved overloaded function type>' and 'std::vector<int>')
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ~~~^~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
621 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed:
p1059.cpp:1464:14: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_IteratorR>'
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1778 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed:
p1059.cpp:1464:14: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorR>'
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:362:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
362 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:362:5: note: template argument deduction/substitution failed:
p1059.cpp:1464:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:371:5: note: candidate: 'constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&) [with _Tp = vector<int>]'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:371:35: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::complex<std::vector<int> >&'
371 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/c++/12.1.0/complex:380:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
380 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:380:5: note: template argument deduction/substitution failed:
p1059.cpp:1464:14: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
/usr/local/include/c++/12.1.0/complex:457:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator-(const complex<_Tp>&)'
457 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/complex:457:5: note: template argument deduction/substitution failed:
p1059.cpp:1464:14: note: candidate expects 1 argument, 2 provided
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~
p1059.cpp:1464:17: error: 'glvalue' was not declared in this scope
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
p1059.cpp:1464:28: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1464:48: error: 'Base' was not declared in this scope
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~
p1059.cpp:1464:1: error: expression must be enclosed in parentheses
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~~~~~~
p1059.cpp:1464:10: error: expected initializer before 'ref'
1464 | requires ref-is-glvalue && bidirectional_range<Base > &&
| ^~~
p1059.cpp:1468:1: error: expected unqualified-id before 'return'
1468 | return x.outer_it_ == y.outer_it_ && x.inner_it_ == y.inner_it_;
| ^~~~~~
p1059.cpp:1473:29: error: 'compatible' was not declared in this scope; did you mean 'copyable'?
1473 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| copyable
p1059.cpp:1473:40: error: 'joinable' was not declared in this scope
1473 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~
p1059.cpp:1473:26: error: expression must be enclosed in parentheses
1473 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~
p1059.cpp:1473:29: error: 'compatible' does not name a type; did you mean 'volatile'?
1473 | && view<Pattern> && compatible-joinable-ranges<range_reference_t<V>, Pattern>
| ^~~~~~~~~~
| volatile
p1059.cpp:1490:35: error: expected ')' before '&' token
1490 | constexpr explicit sentinel(Parent& parent);
| ~ ^
| )
p1059.cpp:1492:30: error: 'Const' was not declared in this scope; did you mean 'const'?
1492 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~
| const
p1059.cpp:1492:35: error: template argument 1 is invalid
1492 | constexpr sentinel(sentinel<!Const> s)
| ^
p1059.cpp:1493:45: error: 'V' was not declared in this scope
1493 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^
p1059.cpp:1493:46: error: template argument 1 is invalid
1493 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^
p1059.cpp:1493:60: error: 'Base' was not declared in this scope
1493 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~
p1059.cpp:1493:60: error: template argument 1 is invalid
p1059.cpp:1493:19: error: template argument 1 is invalid
1493 | requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1493:19: error: template argument 2 is invalid
p1059.cpp:1492:1: error: 'decl-specifier' in declaration of deduction guide
1492 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~~
p1059.cpp:1492:11: error: deduction guide for 'std::ranges::sentinel<<anonymous> >' must have trailing return type
1492 | constexpr sentinel(sentinel<!Const> s)
| ^~~~~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:1498:34: error: 'Base' was not declared in this scope
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~
p1059.cpp:1498:38: error: template argument 1 is invalid
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^
p1059.cpp:1498:52: error: 'maybe' was not declared in this scope
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~
p1059.cpp:1498:77: error: template argument 1 is invalid
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~
p1059.cpp:1498:10: error: template argument 1 is invalid
1498 | requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1498:10: error: template argument 2 is invalid
p1059.cpp:1499:1: error: 'friend' used outside of class
1499 | friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:1499:40: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1499 | friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1499:59: error: wrong number of template arguments (1, should be at least 2)
1499 | friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1499:65: error: template placeholder type 'const sentinel<...auto...>' must be followed by a simple declarator-id
1499 | friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
| ^~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:1499:23: error: 'constexpr bool std::ranges::operator==(...)' must have an argument of class or enumerated type
1499 | friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:1501:1: error: expected unqualified-id before 'return'
1501 | return x.outer_it_ == y.end_;
| ^~~~~~
p1059.cpp:1506:1: error: expected unqualified-id before 'for'
1506 | for (auto word : str | views::lazy_split(' ')) {
| ^~~
p1059.cpp:1514:30: error: expected unqualified-id before '-' token
1514 | template<auto> struct require-constant;
| ^
p1059.cpp:1515:31: error: expected '=' before '-' token
1515 | template<class R> concept tiny-range =
| ^
p1059.cpp:1518:71: error: expected ';' before '&&' token
1518 | requires { typename require-constant<remove_reference_t<R>::size()>; } && (remove_reference_t<R>::size() <= 1);
| ^~~
| ;
p1059.cpp:1521:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges'
1521 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
| ^~~~~~~~
p1059.cpp:1521:67: note: suggested alternatives:
In file included from /usr/local/include/c++/12.1.0/string:48:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/iterator_concepts.h:37:
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1521:1: error: template argument 3 is invalid
1521 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1522:22: error: 'tiny' was not declared in this scope
1522 | (forward_range<V> || tiny-range<Pattern>)
| ^~~~
p1059.cpp:1527:5: error: 'non' does not name a type
1527 | non-propagating-cache<iterator_t<V>> current_;
| ^~~
p1059.cpp:1538:36: error: 'views' was not declared in this scope; did you mean 'view'?
1538 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~
| view
p1059.cpp:1538:14: error: parse error in template argument list
1538 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1538:14: error: template argument 2 is invalid
p1059.cpp:1539:41: error: 'single_view' was not declared in this scope
1539 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~
p1059.cpp:1539:13: error: parse error in template argument list
1539 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1539:13: error: template argument 2 is invalid
p1059.cpp:1539:70: error: expected unqualified-id before '>' token
1539 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^
p1059.cpp: In member function 'constexpr V std::ranges::std::ranges::lazy_split_view<V, Pattern>::base() &&':
p1059.cpp:1541:117: error: 'move' is not a member of 'std::ranges::std'
1541 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:1541:117: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
In file included from /usr/local/include/c++/12.1.0/bits/ranges_uninitialized.h:36,
from /usr/local/include/c++/12.1.0/memory:86,
from N4910.h:14:
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::lazy_split_view<V, Pattern>::begin()':
p1059.cpp:1544:20: error: 'outer' was not declared in this scope
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~~~~
p1059.cpp:1544:26: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1544:35: error: 'simple' was not declared in this scope
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~~~~~
p1059.cpp:1544:72: error: wrong number of template arguments (1, should be at least 2)
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1544:91: error: 'begin' is not a member of 'std::ranges::std::ranges'
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~~~~
p1059.cpp:1544:91: note: suggested alternatives:
p1059.cpp:405:27: note: 'begin'
405 | constexpr iterator<false> begin();
| ^~~~~
In file included from /usr/local/include/c++/12.1.0/string:52:
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: 'std::begin'
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
p1059.cpp:1544:91: note: 'std::ranges::__cust::begin, std::ranges::begin'
1544 | return outer-iterator<simple-view<V> && simple-view<Pattern>> {*this, ranges::begin(base_)};
| ^~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:952:10: note: 'std::ranges::__cust_access::begin'
952 | void begin(const auto&) = delete;
| ^~~~~
p1059.cpp:1546:13: error: 'current_' was not declared in this scope
1546 | current_ = ranges::begin(base_);
| ^~~~~~~~
p1059.cpp:1546:32: error: 'begin' is not a member of 'std::ranges::std::ranges'
1546 | current_ = ranges::begin(base_);
| ^~~~~
p1059.cpp:1546:32: note: suggested alternatives:
p1059.cpp:405:27: note: 'begin'
405 | constexpr iterator<false> begin();
| ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: 'std::begin'
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
p1059.cpp:1546:32: note: 'std::ranges::__cust::begin, std::ranges::begin'
1546 | current_ = ranges::begin(base_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:952:10: note: 'std::ranges::__cust_access::begin'
952 | void begin(const auto&) = delete;
| ^~~~~
p1059.cpp:1547:20: error: 'outer' was not declared in this scope
1547 | return outer-iterator<false> {*this};
| ^~~~~
p1059.cpp:1547:26: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1547 | return outer-iterator<false> {*this};
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1547:40: error: wrong number of template arguments (1, should be at least 2)
1547 | return outer-iterator<false> {*this};
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::lazy_split_view<V, Pattern>::begin() const requires (forward_range<V>) && (forward_range<const V>)':
p1059.cpp:1551:16: error: 'outer' was not declared in this scope
1551 | return outer-iterator<true> {*this, ranges::begin(base_)};
| ^~~~~
p1059.cpp:1551:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1551 | return outer-iterator<true> {*this, ranges::begin(base_)};
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1551:35: error: wrong number of template arguments (1, should be at least 2)
1551 | return outer-iterator<true> {*this, ranges::begin(base_)};
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1551:53: error: 'begin' is not a member of 'std::ranges::std::ranges'
1551 | return outer-iterator<true> {*this, ranges::begin(base_)};
| ^~~~~
p1059.cpp:1551:53: note: suggested alternatives:
p1059.cpp:405:27: note: 'begin'
405 | constexpr iterator<false> begin();
| ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: 'std::begin'
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
p1059.cpp:1551:53: note: 'std::ranges::__cust::begin, std::ranges::begin'
1551 | return outer-iterator<true> {*this, ranges::begin(base_)};
| ^~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:952:10: note: 'std::ranges::__cust_access::begin'
952 | void begin(const auto&) = delete;
| ^~~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::lazy_split_view<V, Pattern>::end() requires (forward_range<V>) && (common_range<V>)':
p1059.cpp:1554:16: error: 'outer' was not declared in this scope
1554 | return outer-iterator<simple-view<V> && simple-view<Pattern>>
| ^~~~~
p1059.cpp:1554:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1554 | return outer-iterator<simple-view<V> && simple-view<Pattern>>
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1554:31: error: 'simple' was not declared in this scope
1554 | return outer-iterator<simple-view<V> && simple-view<Pattern>>
| ^~~~~~
p1059.cpp:1554:68: error: wrong number of template arguments (1, should be at least 2)
1554 | return outer-iterator<simple-view<V> && simple-view<Pattern>>
| ^~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1555:25: error: 'end' is not a member of 'std::ranges::std::ranges'
1555 | {*this, ranges::end(base_)};
| ^~~
p1059.cpp:1555:25: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:1555:25: note: 'std::ranges::__cust::end, std::ranges::end'
1555 | {*this, ranges::end(base_)};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::lazy_split_view<V, Pattern>::end() const':
p1059.cpp:1559:20: error: 'outer' was not declared in this scope
1559 | return outer-iterator<true> {*this, ranges::end(base_)};
| ^~~~~
p1059.cpp:1559:26: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1559 | return outer-iterator<true> {*this, ranges::end(base_)};
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1559:39: error: wrong number of template arguments (1, should be at least 2)
1559 | return outer-iterator<true> {*this, ranges::end(base_)};
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1559:57: error: 'end' is not a member of 'std::ranges::std::ranges'
1559 | return outer-iterator<true> {*this, ranges::end(base_)};
| ^~~
p1059.cpp:1559:57: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:1559:57: note: 'std::ranges::__cust::end, std::ranges::end'
1559 | return outer-iterator<true> {*this, ranges::end(base_)};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp: At global scope:
p1059.cpp:1565:46: error: 'views' was not declared in this scope; did you mean 'view'?
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1565:77: error: wrong number of template arguments (1, should be 2)
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:46: error: 'views' was not declared in this scope; did you mean 'view'?
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1565:77: error: wrong number of template arguments (1, should be 2)
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:46: error: 'views' was not declared in this scope; did you mean 'view'?
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1565:77: error: wrong number of template arguments (1, should be 2)
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:46: error: 'views' was not declared in this scope; did you mean 'view'?
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1565:77: error: wrong number of template arguments (1, should be 2)
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:30: error: invalid template-id
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:1565:46: error: 'views' has not been declared
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
p1059.cpp:1565:60: error: expected primary-expression before '>' token
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^
p1059.cpp:1565:60: error: trailing return type 'lazy_split_view<...auto...>' of deduction guide is not a specialization of 'std::ranges::std::ranges::lazy_split_view<V, Pattern>'
p1059.cpp:1565:61: error: expected ';' before ',' token
1565 | lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;
| ^
| ;
p1059.cpp:1568:20: error: 'views' was not declared in this scope; did you mean 'view'?
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1568:66: error: wrong number of template arguments (1, should be 2)
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1568:20: error: 'views' was not declared in this scope; did you mean 'view'?
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1568:66: error: wrong number of template arguments (1, should be 2)
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1568:20: error: 'views' was not declared in this scope; did you mean 'view'?
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1568:66: error: wrong number of template arguments (1, should be 2)
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1568:20: error: 'views' was not declared in this scope; did you mean 'view'?
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1568:66: error: wrong number of template arguments (1, should be 2)
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1523:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::lazy_split_view'
1523 | class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>> {
| ^~~~~~~~~~~~~~~
p1059.cpp:1568:4: error: invalid template-id
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:1568:20: error: 'views' has not been declared
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
p1059.cpp:1568:34: error: expected primary-expression before '>' token
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1568:34: error: trailing return type 'lazy_split_view<...auto...>' of deduction guide is not a specialization of 'std::ranges::std::ranges::lazy_split_view<V, Pattern>'
p1059.cpp:1568:35: error: expected ';' before ',' token
1568 | -> lazy_split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
| ;
p1059.cpp:1570:11: error: ISO C++ forbids declaration of 'lazy_split_view' with no type [-fpermissive]
1570 | constexpr lazy_split_view(V base, Pattern pattern);
| ^~~~~~~~~~~~~~~
p1059.cpp:1570:27: error: 'V' was not declared in this scope
1570 | constexpr lazy_split_view(V base, Pattern pattern);
| ^
p1059.cpp:1570:35: error: 'Pattern' was not declared in this scope
1570 | constexpr lazy_split_view(V base, Pattern pattern);
| ^~~~~~~
p1059.cpp:1570:50: error: expression list treated as compound expression in initializer [-fpermissive]
1570 | constexpr lazy_split_view(V base, Pattern pattern);
| ^
p1059.cpp:1573:29: error: 'V' was not declared in this scope
1573 | requires constructible_from<V, views::all_t<R>> &&
| ^
p1059.cpp:1573:32: error: 'views' was not declared in this scope; did you mean 'view'?
1573 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~
| view
p1059.cpp:1573:10: error: parse error in template argument list
1573 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1573:10: error: template argument 1 is invalid
p1059.cpp:1573:10: error: template argument 2 is invalid
p1059.cpp:1574:28: error: 'Pattern' was not declared in this scope
1574 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~
p1059.cpp:1574:37: error: 'single_view' was not declared in this scope
1574 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~
p1059.cpp:1574:9: error: parse error in template argument list
1574 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1574:9: error: template argument 1 is invalid
p1059.cpp:1574:9: error: template argument 2 is invalid
p1059.cpp:1574:66: error: expected unqualified-id before '>' token
1574 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^
p1059.cpp:1581:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges'
1581 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
| ^~~~~~~~
p1059.cpp:1581:67: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1581:1: error: template argument 3 is invalid
1581 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1582:22: error: 'tiny' was not declared in this scope
1582 | (forward_range<V> || tiny-range<Pattern>) template<bool Const>
| ^~~~
p1059.cpp:1583:42: error: expected unqualified-id before '-' token
1583 | struct lazy_split_view<V, Pattern>::outer-iterator {
| ^
p1059.cpp:1624:20: error: 'outer' does not name a type
1624 | constexpr explicit outer-iterator(Parent& parent) requires (!forward_range<Base>);
| ^~~~~
p1059.cpp:1626:11: error: 'outer' does not name a type
1626 | constexpr outer-iterator(Parent& parent, iterator_t<Base> current)
| ^~~~~
p1059.cpp:1629:11: error: 'outer' does not name a type
1629 | constexpr outer-iterator(outer-iterator<!Const> i)
| ^~~~~
p1059.cpp:1633:1: error: expected unqualified-id before 'return'
1633 | return x.current_ == y.current_ && x.trailing_empty_ == y.trailing_empty_;
| ^~~~~~
p1059.cpp:1635:11: error: 'outer' does not name a type
1635 | constexpr outer-iterator& operator++();
| ^~~~~
p1059.cpp:1637:12: error: 'const auto std::ranges::end' redeclared as different kind of entity
1637 | const auto end = ranges::end(parent_->base_);
| ^~~
p1059.cpp:674:16: note: previous declaration 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:1637:26: error: reference to 'end' is ambiguous
1637 | const auto end = ranges::end(parent_->base_);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:1637:30: error: 'parent_' was not declared in this scope
1637 | const auto end = ranges::end(parent_->base_);
| ^~~~~~~
p1059.cpp:1638:1: error: expected unqualified-id before 'if'
1638 | if (current == end) {
| ^~
p1059.cpp:1642:29: error: 'subrange' was not declared in this scope; did you mean 'range'?
1642 | const auto [pbegin, pend] = subrange {
| ^~~~~~~~
| range
p1059.cpp:1642:38: error: expected ';' before '{' token
1642 | const auto [pbegin, pend] = subrange {
| ^
p1059.cpp:1645:1: error: expected unqualified-id before 'if'
1645 | if (pbegin == pend) ++current;
| ^~
p1059.cpp:1646:1: error: expected unqualified-id before 'else'
1646 | else if constexpr (tiny-range<Pattern>) {
| ^~~~
p1059.cpp:1653:1: error: expected unqualified-id before 'else'
1653 | else {
| ^~~~
p1059.cpp:1665:1: error: expected unqualified-id before 'return'
1665 | return *this;
| ^~~~~~
p1059.cpp:1666:1: error: 'friend' used outside of class
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~~
| ------
p1059.cpp:1666:40: error: 'outer' does not name a type
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~
p1059.cpp:1666:45: error: expected ',' or '...' before '-' token
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^
p1059.cpp:1666:107: error: 'Base' was not declared in this scope
1666 | expr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~
p1059.cpp:1666:93: error: template argument 1 is invalid
1666 | end constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1666:23: error: constraints on a non-templated function
1666 | friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y) requires forward_range<Base>;
| ^~~~~~~~
p1059.cpp:1666:23: error: 'constexpr bool std::ranges::operator==(int)' must have an argument of class or enumerated type
p1059.cpp:1667:1: error: 'friend' used outside of class
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:1667:40: error: 'outer' does not name a type
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^~~~~
p1059.cpp:1667:45: error: expected ',' or '...' before '-' token
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^
p1059.cpp:1667:23: error: 'constexpr bool std::ranges::operator==(int)' must have an argument of class or enumerated type
1667 | friend constexpr bool operator==(const outer-iterator& x, default_sentinel_t);
| ^~~~~~~~
p1059.cpp:1669:1: error: expected unqualified-id before 'return'
1669 | return x.current == ranges::end(x.parent_->base_) && !x.trailing_empty_;
| ^~~~~~
p1059.cpp:1674:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges'
1674 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~~~~~
p1059.cpp:1674:67: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1674:1: error: template argument 3 is invalid
1674 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1674:101: error: 'tiny' was not declared in this scope
1674 | comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~
p1059.cpp:1676:42: error: expected unqualified-id before '-' token
1676 | struct lazy_split_view<V, Pattern>::outer-iterator<Const>::value_type
| ^
p1059.cpp:1688:20: error: ISO C++ forbids declaration of 'value_type' with no type [-fpermissive]
1688 | constexpr explicit value_type(outer-iterator i);
| ^~~~~~~~~~
p1059.cpp:1688:11: error: 'explicit' outside class declaration
1688 | constexpr explicit value_type(outer-iterator i);
| ^~~~~~~~
p1059.cpp:1688:31: error: 'outer' was not declared in this scope
1688 | constexpr explicit value_type(outer-iterator i);
| ^~~~~
p1059.cpp:1688:46: error: missing template arguments before 'i'
1688 | constexpr explicit value_type(outer-iterator i);
| ^
p1059.cpp:1690:11: error: 'inner' does not name a type
1690 | constexpr inner-iterator<Const> begin() const;
| ^~~~~
p1059.cpp:1692:1: error: expected unqualified-id before 'return'
1692 | return inner-iterator <Const> {i_};
| ^~~~~~
p1059.cpp:1693:42: error: non-member function 'constexpr std::default_sentinel_t std::ranges::end()' cannot have cv-qualifier
1693 | constexpr default_sentinel_t end() const noexcept;
| ^~~~~~~~
p1059.cpp:1693:30: error: ambiguating new declaration of 'constexpr std::default_sentinel_t std::ranges::end()'
1693 | constexpr default_sentinel_t end() const noexcept;
| ^~~
p1059.cpp:674:16: note: old declaration 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:1695:1: error: expected unqualified-id before 'return'
1695 | return default_sentinel;
| ^~~~~~
p1059.cpp:1700:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges'
1700 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~~~~~
p1059.cpp:1700:67: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1700:1: error: template argument 3 is invalid
1700 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1700:101: error: 'tiny' was not declared in this scope
1700 | comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && (forward_range<V> || tiny-range<Pattern>)
| ^~~~
p1059.cpp:1702:42: error: expected unqualified-id before '-' token
1702 | struct lazy_split_view<V, Pattern>::inner-iterator {
| ^
p1059.cpp:1769:28: error: 'Base' was not declared in this scope
1769 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~
p1059.cpp:1769:32: error: template argument 1 is invalid
1769 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^
p1059.cpp:1769:50: error: non-member function 'constexpr const int& std::ranges::base()' cannot have cv-qualifier
1769 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~~~~~
p1059.cpp:1769:50: error: non-member function 'constexpr const int& std::ranges::base()' cannot have ref-qualifier
p1059.cpp:1771:22: error: 'Base' was not declared in this scope; did you mean 'base'?
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~
| base
p1059.cpp:1771:26: error: template argument 1 is invalid
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^
p1059.cpp:1771:61: error: 'V' was not declared in this scope
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^
p1059.cpp:1771:47: error: template argument 1 is invalid
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~~~~~~~~~~~~~
p1059.cpp:1771:28: error: constraints on a non-templated function
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~
p1059.cpp:1771:47: error: non-member function 'constexpr int std::ranges::base()' cannot have ref-qualifier
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~~~~~~~~~~~~~
p1059.cpp:1771:28: error: ambiguating new declaration of 'constexpr int std::ranges::base()'
1771 | constexpr iterator_t<Base> base() && requires forward_range<V>;
| ^~~~
p1059.cpp:1769:35: note: old declaration 'constexpr const int& std::ranges::base()'
1769 | constexpr const iterator_t<Base>& base() const & noexcept;
| ^~~~
p1059.cpp:1773:11: error: 'inner' does not name a type
1773 | constexpr inner-iterator& operator++();
| ^~~~~
p1059.cpp:1775:1: error: 'incremented_' does not name a type
1775 | incremented_ = true;
| ^~~~~~~~~~~~
p1059.cpp:1776:1: error: expected unqualified-id before 'if'
1776 | if constexpr (!forward_range<Base>) {
| ^~
p1059.cpp:1781:1: error: expected unqualified-id before '++' token
1781 | ++i_.current ;
| ^~
p1059.cpp:1782:1: error: expected unqualified-id before 'return'
1782 | return *this;
| ^~~~~~
p1059.cpp:1783:1: error: 'friend' used outside of class
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~~
| ------
p1059.cpp:1783:40: error: 'inner' does not name a type
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~
p1059.cpp:1783:45: error: expected ',' or '...' before '-' token
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^
p1059.cpp:1783:107: error: 'Base' was not declared in this scope; did you mean 'base'?
1783 | expr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~
| base
p1059.cpp:1783:93: error: template argument 1 is invalid
1783 | end constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1783:23: error: constraints on a non-templated function
1783 | friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y) requires forward_range<Base>;
| ^~~~~~~~
p1059.cpp:1783:23: error: 'constexpr bool std::ranges::operator==(int)' must have an argument of class or enumerated type
p1059.cpp:1789:8: error: redefinition of 'std::string std::ranges::str'
1789 | string str{"the quick brown fox"};
| ^~~
p1059.cpp:1505:8: note: 'std::string std::ranges::str' previously declared here
1505 | string str{"the quick brown fox"};
| ^~~
p1059.cpp:1790:1: error: expected unqualified-id before 'for'
1790 | for (string_view word : split(str, ' ')) {
| ^~~
p1059.cpp:1798:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges'
1798 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
| ^~~~~~~~
p1059.cpp:1798:67: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1798:1: error: template argument 3 is invalid
1798 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1804:5: error: multiple types in one declaration
1804 | class split_view::iterator struct iterator ;
| ^~~~~
p1059.cpp:1804:39: error: declaration does not declare anything [-fpermissive]
1804 | class split_view::iterator struct iterator ;
| ^~~~~~~~
p1059.cpp:1806:5: error: multiple types in one declaration
1806 | class split_view::sentinel struct sentinel ;
| ^~~~~
p1059.cpp:1806:39: error: declaration does not declare anything [-fpermissive]
1806 | class split_view::sentinel struct sentinel ;
| ^~~~~~~~
p1059.cpp:1814:36: error: 'views' was not declared in this scope; did you mean 'view'?
1814 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~
| view
p1059.cpp:1814:14: error: parse error in template argument list
1814 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1814:14: error: template argument 2 is invalid
p1059.cpp:1815:41: error: 'single_view' was not declared in this scope
1815 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~
p1059.cpp:1815:13: error: parse error in template argument list
1815 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1815:13: error: template argument 2 is invalid
p1059.cpp:1815:70: error: expected unqualified-id before '>' token
1815 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^
p1059.cpp:1827:15: error: 'subrange' does not name a type
1827 | constexpr subrange<iterator_t<V>> find-next (iterator_t<V>); // exposition only };
| ^~~~~~~~
p1059.cpp:1829:40: error: 'views' was not declared in this scope; did you mean 'view'?
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1829:71: error: wrong number of template arguments (1, should be 2)
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1829:40: error: 'views' was not declared in this scope; did you mean 'view'?
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1829:71: error: wrong number of template arguments (1, should be 2)
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1829:40: error: 'views' was not declared in this scope; did you mean 'view'?
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
| view
p1059.cpp:1829:71: error: wrong number of template arguments (1, should be 2)
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1829:29: error: 'std::ranges::std::ranges::split_view<V, Pattern>' is not a template
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~~~~~~
p1059.cpp:1829:40: error: 'views' has not been declared
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^~~~~
p1059.cpp:1829:54: error: expected primary-expression before '>' token
1829 | split_view(R&&, P&&) -> split_view<views::all_t<R>, views::all_t<P>>;
| ^
p1059.cpp:1829:54: error: 'split_view' function with trailing return type not declared with 'auto' type specifier
p1059.cpp:1832:19: error: 'views' was not declared in this scope; did you mean 'view'?
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1832:65: error: wrong number of template arguments (1, should be 2)
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1832:19: error: 'views' was not declared in this scope; did you mean 'view'?
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1832:65: error: wrong number of template arguments (1, should be 2)
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1832:19: error: 'views' was not declared in this scope; did you mean 'view'?
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
| view
p1059.cpp:1832:65: error: wrong number of template arguments (1, should be 2)
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1799:7: note: provided for 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view'
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1832:8: error: 'std::ranges::std::ranges::split_view<V, Pattern>' is not a template
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~~~~~~
p1059.cpp:1832:19: error: 'views' has not been declared
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^~~~~
p1059.cpp:1832:33: error: expected primary-expression before '>' token
1832 | -> split_view<views::all_t<R>, single_view<range_value_t<R>>>;
| ^
p1059.cpp:1832:33: error: 'split_view' function with trailing return type not declared with 'auto' type specifier
p1059.cpp: In member function 'constexpr V std::ranges::std::ranges::split_view<V, Pattern>::base() &&':
p1059.cpp:1817:117: error: 'move' is not a member of 'std::ranges::std'
1817 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:1817:117: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::split_view<V, Pattern>::end()':
p1059.cpp:1821:44: error: 'end' is not a member of 'std::ranges::std::ranges'
1821 | return iterator{*this, ranges::end(base_), {}};
| ^~~
p1059.cpp:1821:44: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:1821:44: note: 'std::ranges::__cust::end, std::ranges::end'
1821 | return iterator{*this, ranges::end(base_), {}};
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp: At global scope:
p1059.cpp:1834:1: error: 'constexpr' cannot be used for type declarations
1834 | constexpr split_view(V base, Pattern pattern);
| ^~~~~~~~~
p1059.cpp:1834:10: error: expected ';' before 'split_view'
1834 | constexpr split_view(V base, Pattern pattern);
| ^~~~~~~~~~~
| ;
p1059.cpp:1837:29: error: 'V' was not declared in this scope
1837 | requires constructible_from<V, views::all_t<R>> &&
| ^
p1059.cpp:1837:32: error: 'views' was not declared in this scope; did you mean 'view'?
1837 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~
| view
p1059.cpp:1837:10: error: parse error in template argument list
1837 | requires constructible_from<V, views::all_t<R>> &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1837:10: error: template argument 1 is invalid
p1059.cpp:1837:10: error: template argument 2 is invalid
p1059.cpp:1838:28: error: 'Pattern' was not declared in this scope
1838 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~
p1059.cpp:1838:37: error: 'single_view' was not declared in this scope
1838 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~
p1059.cpp:1838:9: error: parse error in template argument list
1838 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1838:9: error: template argument 1 is invalid
p1059.cpp:1838:9: error: template argument 2 is invalid
p1059.cpp:1838:66: error: expected unqualified-id before '>' token
1838 | constructible_from<Pattern, single_view<range_value_t<R>>>
| ^
p1059.cpp:1841:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1841 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1841:11: error: deduced class type 'iterator' in function return type
1841 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1844:31: error: 'V' was not declared in this scope
1844 | constexpr subrange<iterator_t<V>> find-next (iterator_t<V> it); // exposition only
| ^
p1059.cpp:1844:31: error: template argument 1 is invalid
p1059.cpp:1844:11: error: 'subrange' does not name a type
1844 | constexpr subrange<iterator_t<V>> find-next (iterator_t<V> it); // exposition only
| ^~~~~~~~
p1059.cpp:1846:23: error: 'search' is not a member of 'std::ranges::std::ranges'
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~
p1059.cpp:1846:39: error: 'it' was not declared in this scope; did you mean 'i'?
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~
| i
p1059.cpp:1846:51: error: 'end' is not a member of 'std::ranges::std::ranges'
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~
p1059.cpp:1846:51: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:1846:51: note: 'std::ranges::__cust::end, std::ranges::end'
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp:1846:55: error: 'base_' was not declared in this scope; did you mean 'base'?
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~
| base
p1059.cpp:1846:30: error: 'subrange' was not declared in this scope; did you mean 'range'?
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~~~
| range
p1059.cpp:1846:64: error: 'pattern_' was not declared in this scope
1846 | auto [b, e] = ranges::search(subrange(it, ranges::end(base_)), pattern_);
| ^~~~~~~~
p1059.cpp:1847:1: error: expected unqualified-id before 'if'
1847 | if (b != ranges::end(base_) && ranges::empty(pattern_)) {
| ^~
p1059.cpp:1851:1: error: expected unqualified-id before 'return'
1851 | return {b, e};
| ^~~~~~
p1059.cpp:1856:67: error: 'equal_to' is not a member of 'std::ranges::std::ranges::std::ranges'
1856 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
| ^~~~~~~~
p1059.cpp:1856:67: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_function.h:350:12: note: 'std::equal_to'
350 | struct equal_to;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_cmp.h:86:10: note: 'std::ranges::equal_to'
86 | struct equal_to
| ^~~~~~~~
p1059.cpp:1856:1: error: template argument 3 is invalid
1856 | indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:1857:1: error: expected unqualified-id before '}' token
1857 | }
| ^
p1059.cpp:1858:18: error: 'V' was not declared in this scope
1858 | class split_view<V, Pattern>::iterator {
| ^
p1059.cpp:1858:21: error: 'Pattern' was not declared in this scope
1858 | class split_view<V, Pattern>::iterator {
| ^~~~~~~
p1059.cpp:1858:28: error: template argument 1 is invalid
1858 | class split_view<V, Pattern>::iterator {
| ^
p1059.cpp:1858:28: error: template argument 2 is invalid
p1059.cpp:1858:40: error: expected unqualified-id before '{' token
1858 | class split_view<V, Pattern>::iterator {
| ^
p1059.cpp:1878:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1878:20: error: template placeholder type 'split_view<...auto...>' must be followed by a simple declarator-id
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^~~~~~~~~~
p1059.cpp:1799:7: note: 'template<class V, class Pattern> requires <erroneous-expression> class std::ranges::std::ranges::split_view' declared here
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1878:38: error: expected ')' before ',' token
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ~ ^
| )
p1059.cpp:1878:1: error: 'decl-specifier' in declaration of deduction guide
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^~~~~~~~~
p1059.cpp:1878:11: error: deduction guide for 'std::iterator<_Category, _Tp, _Distance, _Pointer, _Reference' must have trailing return type
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1878:51: error: 'V' was not declared in this scope
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^
p1059.cpp:1878:52: error: template argument 1 is invalid
1878 | constexpr iterator(split_view& parent, iterator_t<V> current, subrange<iterator_t<V>> next);
| ^
p1059.cpp:1880:1: error: 'with' does not name a type
1880 | with std::move(next).
| ^~~~
p1059.cpp:1883:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1883 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1883:11: error: deduced class type 'iterator' in function return type
1883 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1885:13: error: invalid use of 'this' at top level
1885 | auto tmp = *this;
| ^~~~
p1059.cpp:1886:1: error: expected unqualified-id before '++' token
1886 | ++*this;
| ^~
p1059.cpp:1887:1: error: expected unqualified-id before 'return'
1887 | return tmp;
| ^~~~~~
p1059.cpp:1888:1: error: 'friend' used outside of class
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:1888:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1888:51: error: expected ')' before ',' token
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ~ ^
| )
p1059.cpp:1888:23: error: 'constexpr bool std::ranges::std::ranges::operator==(...)' must have an argument of class or enumerated type
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:1888:53: error: expected unqualified-id before 'const'
1888 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
p1059.cpp:1891:20: error: ISO C++ forbids declaration of 'sentinel' with no type [-fpermissive]
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~~~
p1059.cpp:1891:11: error: 'explicit' outside class declaration
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~~~
p1059.cpp:1891:20: error: redefinition of 'constexpr const int sentinel'
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~~~
p1059.cpp:346:20: note: 'constexpr const int sentinel' previously defined here
346 | constexpr explicit sentinel(filter_view& parent);
| ^~~~~~~~
p1059.cpp:1891:29: error: 'split_view' was not declared in this scope; did you mean 'std::ranges::std::ranges::split_view'?
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~~~~~
| std::ranges::std::ranges::split_view
p1059.cpp:1799:7: note: 'std::ranges::std::ranges::split_view' declared here
1799 | class split_view : public view_interface<split_view<V, Pattern>> {
| ^~~~~~~~~~
p1059.cpp:1891:41: error: 'parent' was not declared in this scope
1891 | constexpr explicit sentinel(split_view& parent);
| ^~~~~~
p1059.cpp:1893:1: error: 'friend' used outside of class
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:1893:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1893:51: error: expected ')' before ',' token
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ~ ^
| )
p1059.cpp:1893:23: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:1893:53: error: expected unqualified-id before 'const'
1893 | friend constexpr bool operator==(const iterator& x, const sentinel& y);
| ^~~~~
p1059.cpp:1895:11: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
1895 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1895:11: error: deduced class type 'iterator' in function return type
1895 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1897:1: error: 'cur_' does not name a type
1897 | cur_ = next_.begin();
| ^~~~
p1059.cpp:1898:1: error: expected unqualified-id before 'if'
1898 | if (cur_ != ranges::end(parent_->base_)) {
| ^~
p1059.cpp:1907:3: error: expected unqualified-id before 'else'
1907 | } else {
| ^~~~
p1059.cpp:1910:1: error: expected unqualified-id before 'return'
1910 | return *this;
| ^~~~~~
p1059.cpp:1911:1: error: 'friend' used outside of class
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:1911:34: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:1911:51: error: expected ')' before ',' token
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ~ ^
| )
p1059.cpp:1911:23: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~
p1059.cpp:1911:53: error: expected unqualified-id before 'const'
1911 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
p1059.cpp:1913:1: error: expected unqualified-id before 'return'
1913 | return x.cur_ == y.cur_ && x.trailing_empty_ == y.trailing_empty_;
| ^~~~~~
p1059.cpp:1919:8: error: 'split_view' is not a class template
1919 | struct split_view<V, Pattern>::sentinel {
| ^~~~~~~~~~
p1059.cpp:1919:8: error: 'split_view' has not been declared
p1059.cpp:1919:41: error: expected unqualified-id before '{' token
1919 | struct split_view<V, Pattern>::sentinel {
| ^
p1059.cpp:1949:14: error: 'forward_range' has not been declared
1949 | template<forward_range R>
| ^~~~~~~~~~~~~
p1059.cpp:1950:10: error: variable or field 'my_algo' declared void
1950 | void my_algo(R&& r) {
| ^~~~~~~
p1059.cpp:1950:18: error: 'R' was not declared in this scope
1950 | void my_algo(R&& r) {
| ^
p1059.cpp:1950:22: error: 'r' was not declared in this scope
1950 | void my_algo(R&& r) {
| ^
p1059.cpp:1967:18: error: 'I' was not declared in this scope
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
p1059.cpp:1967:21: error: 'I' was not declared in this scope
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
p1059.cpp:1967:24: error: 'K' was not declared in this scope
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
p1059.cpp:1967:27: error: 'E' has not been declared
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
p1059.cpp:1967:28: error: expected ',' or '...' before '.' token
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
p1059.cpp:1967:9: error: ISO C++ forbids declaration of 'subrange' with no type [-fpermissive]
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1967:9: error: template-id 'subrange<<expression error>, <expression error>, <expression error> >' in declaration of primary template
p1059.cpp:1967:69: error: expected ';' at end of member declaration
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^
| ;
p1059.cpp:1969:18: error: 'I' was not declared in this scope
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
p1059.cpp:1969:21: error: 'I' was not declared in this scope
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
p1059.cpp:1969:24: error: 'K' was not declared in this scope
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
p1059.cpp:1969:27: error: 'E' has not been declared
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
p1059.cpp:1969:28: error: expected ',' or '...' before '.' token
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
p1059.cpp:1969:9: error: ISO C++ forbids declaration of 'subrange' with no type [-fpermissive]
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1969:9: error: template-id 'subrange<<expression error>, <expression error>, <expression error> >' in declaration of primary template
p1059.cpp:1969:59: error: expected ';' at end of member declaration
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^
| ;
p1059.cpp:1969:9: error: 'int std::ranges::common_view<V>::subrange(int)' cannot be overloaded with 'int std::ranges::common_view<V>::subrange(int)'
1969 | subrange<I, I, K>(E.end().base(), E.begin().base())
| ^~~~~~~~~~~~~~~~~
p1059.cpp:1967:9: note: previous declaration 'int std::ranges::common_view<V>::subrange(int)'
1967 | subrange<I, I, K>(E.end().base(), E.begin().base(), E.size())
| ^~~~~~~~~~~~~~~~~
p1059.cpp: In member function 'constexpr V std::ranges::common_view<V>::base() &&':
p1059.cpp:1963:121: error: 'move' is not a member of 'std::ranges::std'
1963 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:1963:121: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::common_view<V>::size() requires sized_range<V>':
p1059.cpp:1973:28: error: reference to 'size' is ambiguous
1973 | return ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::common_view<V>::size() const requires sized_range<const V>':
p1059.cpp:1976:28: error: reference to 'size' is ambiguous
1976 | return ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:1980:37: error: 'views' was not declared in this scope; did you mean 'view'?
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1980:51: error: template argument 1 is invalid
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:37: error: 'views' was not declared in this scope; did you mean 'view'?
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1980:51: error: template argument 1 is invalid
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:37: error: 'views' was not declared in this scope; did you mean 'view'?
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1980:51: error: template argument 1 is invalid
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:37: error: 'views' was not declared in this scope; did you mean 'view'?
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:1980:51: error: template argument 1 is invalid
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:25: error: invalid template-id
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~~~~~~~
p1059.cpp:1980:37: error: 'views' has not been declared
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:1980:51: error: expected primary-expression before '>>' token
1980 | common_view(R&&) -> common_view<views::all_t<R>>;
| ^~
p1059.cpp:1980:51: error: expected initializer before '>' token
p1059.cpp:1982:24: error: ISO C++ forbids declaration of 'common_view' with no type [-fpermissive]
1982 | constexpr explicit common_view(V base);
| ^~~~~~~~~~~
p1059.cpp:1982:15: error: 'explicit' outside class declaration
1982 | constexpr explicit common_view(V base);
| ^~~~~~~~
p1059.cpp:1982:36: error: 'V' was not declared in this scope
1982 | constexpr explicit common_view(V base);
| ^
p1059.cpp:1986:20: error: ambiguating new declaration of 'constexpr auto begin()'
1986 | constexpr auto begin() {
| ^~~~~
p1059.cpp:405:27: note: old declaration 'constexpr int begin()'
405 | constexpr iterator<false> begin();
| ^~~~~
p1059.cpp: In function 'constexpr auto begin()':
p1059.cpp:1987:43: error: 'V' was not declared in this scope
1987 | if constexpr (random_access_range<V> && sized_range<V>)
| ^
p1059.cpp:1987:23: error: 'random_access_range' was not declared in this scope; did you mean 'std::ranges::random_access_range'?
1987 | if constexpr (random_access_range<V> && sized_range<V>)
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::random_access_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:675:13: note: 'std::ranges::random_access_range' declared here
675 | concept random_access_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1987:63: error: expected primary-expression before ')' token
1987 | if constexpr (random_access_range<V> && sized_range<V>)
| ^
p1059.cpp:1988:28: error: reference to 'begin' is ambiguous
1988 | return ranges::begin(base_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:1988:34: error: 'base_' was not declared in this scope
1988 | return ranges::begin(base_);
| ^~~~~
p1059.cpp:1990:36: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
1990 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1059.cpp:1990:48: error: wrong number of template arguments (1, should be 2)
1990 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1834:9: note: provided for 'template<class _It, class _Sent> requires (input_or_output_iterator<_It>) && (sentinel_for<_Sent, _It>) && (!(same_as<_It, _Sent>) && (copyable<_It>)) class std::common_iterator'
1834 | class common_iterator
| ^~~~~~~~~~~~~~~
p1059.cpp:1990:74: error: reference to 'begin' is ambiguous
1990 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:1990:80: error: 'base_' was not declared in this scope
1990 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
| ^~~~~
p1059.cpp:1990:51: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
1990 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::begin(base_));
| ^~~~~~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:1987:49: error: label 'sized_range' used but not defined
1987 | if constexpr (random_access_range<V> && sized_range<V>)
| ^~~~~~~~~~~
p1059.cpp:1986:20: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto begin()'
1986 | constexpr auto begin() {
| ^~~~~
p1059.cpp: At global scope:
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
1992 | constexpr auto begin() const requires range<const V> {
| ^
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:55: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:1992:43: error: 'range' was not declared in this scope; did you mean 'std::ranges::range'?
1992 | constexpr auto begin() const requires range<const V> {
| ^~~~~
| std::ranges::range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:583:13: note: 'std::ranges::range' declared here
583 | concept range = requires(_Tp& __t)
| ^~~~~
p1059.cpp:1992:34: error: expression must be enclosed in parentheses
1992 | constexpr auto begin() const requires range<const V> {
| ^~~~~~~~
p1059.cpp:1992:43: error: expected initializer before 'range'
1992 | constexpr auto begin() const requires range<const V> {
| ^~~~~
p1059.cpp:1998:20: error: redefinition of 'constexpr auto end()'
1998 | constexpr auto end() {
| ^~~
p1059.cpp:770:16: note: 'constexpr auto end()' previously defined here
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
p1059.cpp: In function 'constexpr auto end()':
p1059.cpp:1999:43: error: 'V' was not declared in this scope
1999 | if constexpr (random_access_range<V> && sized_range<V>)
| ^
p1059.cpp:1999:23: error: 'random_access_range' was not declared in this scope; did you mean 'std::ranges::random_access_range'?
1999 | if constexpr (random_access_range<V> && sized_range<V>)
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::random_access_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:675:13: note: 'std::ranges::random_access_range' declared here
675 | concept random_access_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:1999:63: error: expected primary-expression before ')' token
1999 | if constexpr (random_access_range<V> && sized_range<V>)
| ^
p1059.cpp:2000:28: error: reference to 'begin' is ambiguous
2000 | return ranges::begin(base_) + ranges::size(base_);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:566:44: note: candidates are: 'constexpr const std::ranges::__cust_access::_Begin std::ranges::__cust::begin'
566 | inline constexpr __cust_access::_Begin begin{};
| ^~~~~
p1059.cpp:650:16: note: 'constexpr auto std::ranges::begin()'
650 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~
p1059.cpp:2000:34: error: 'base_' was not declared in this scope
2000 | return ranges::begin(base_) + ranges::size(base_);
| ^~~~~
p1059.cpp:2000:51: error: reference to 'size' is ambiguous
2000 | return ranges::begin(base_) + ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp:2002:36: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
2002 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1059.cpp:2002:48: error: wrong number of template arguments (1, should be 2)
2002 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1834:9: note: provided for 'template<class _It, class _Sent> requires (input_or_output_iterator<_It>) && (sentinel_for<_Sent, _It>) && (!(same_as<_It, _Sent>) && (copyable<_It>)) class std::common_iterator'
1834 | class common_iterator
| ^~~~~~~~~~~~~~~
p1059.cpp:2002:74: error: reference to 'end' is ambiguous
2002 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:567:42: note: candidates are: 'constexpr const std::ranges::__cust_access::_End std::ranges::__cust::end'
567 | inline constexpr __cust_access::_End end{};
| ^~~
p1059.cpp:674:16: note: 'constexpr auto std::ranges::end()'
674 | constexpr auto end() requires (!simple-view<V>) {
| ^~~
p1059.cpp:2002:78: error: 'base_' was not declared in this scope
2002 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
| ^~~~~
p1059.cpp:2002:51: error: 'sentinel_t' was not declared in this scope; did you mean 'std::ranges::sentinel_t'?
2002 | return common_iterator<iterator_t<V>, sentinel_t<V>>(ranges::end(base_));
| ^~~~~~~~~~~~~~
| std::ranges::sentinel_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:598:11: note: 'std::ranges::sentinel_t' declared here
598 | using sentinel_t = decltype(ranges::end(std::declval<_Range&>()));
| ^~~~~~~~~~
p1059.cpp:1999:49: error: label 'sized_range' used but not defined
1999 | if constexpr (random_access_range<V> && sized_range<V>)
| ^~~~~~~~~~~
p1059.cpp:1998:20: error: invalid return type 'auto' of 'constexpr' function 'constexpr auto end()'
1998 | constexpr auto end() {
| ^~~
p1059.cpp: At global scope:
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
2004 | constexpr auto end() const requires range<const V> {
| ^
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:53: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2004:41: error: 'range' was not declared in this scope; did you mean 'std::ranges::range'?
2004 | constexpr auto end() const requires range<const V> {
| ^~~~~
| std::ranges::range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:583:13: note: 'std::ranges::range' declared here
583 | concept range = requires(_Tp& __t)
| ^~~~~
p1059.cpp:2004:32: error: expression must be enclosed in parentheses
2004 | constexpr auto end() const requires range<const V> {
| ^~~~~~~~
p1059.cpp:2004:41: error: expected initializer before 'range'
2004 | constexpr auto end() const requires range<const V> {
| ^~~~~
p1059.cpp:2014:17: error: redefinition of 'std::vector<int> is'
2014 | vector<int> is {0,1,2,3,4};
| ^~
p1059.cpp:201:13: note: 'std::vector<int> is' previously declared here
201 | vector<int> is{ 0, 1, 2, 3, 4, 5, 6 };
| ^~
p1059.cpp:2015:5: error: expected unqualified-id before 'for'
2015 | for (int i : is | views::reverse)
| ^~~
p1059.cpp: In member function 'constexpr V std::ranges::reverse_view<V>::base() &&':
p1059.cpp:2027:121: error: 'move' is not a member of 'std::ranges::std'
2027 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:2027:121: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::reverse_view<V>::size() requires sized_range<V>':
p1059.cpp:2034:28: error: reference to 'size' is ambiguous
2034 | return ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::reverse_view<V>::size() const requires sized_range<const V>':
p1059.cpp:2037:28: error: reference to 'size' is ambiguous
2037 | return ranges::size(base_);
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:574:43: note: candidates are: 'constexpr const std::ranges::__cust_access::_Size std::ranges::__cust::size'
574 | inline constexpr __cust_access::_Size size{};
| ^~~~
p1059.cpp:694:16: note: 'constexpr auto std::ranges::size()'
694 | constexpr auto size() requires sized_range<V> {
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:2041:39: error: 'views' was not declared in this scope; did you mean 'view'?
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:2041:53: error: template argument 1 is invalid
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:39: error: 'views' was not declared in this scope; did you mean 'view'?
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:2041:53: error: template argument 1 is invalid
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:39: error: 'views' was not declared in this scope; did you mean 'view'?
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:2041:53: error: template argument 1 is invalid
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:39: error: 'views' was not declared in this scope; did you mean 'view'?
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:2041:53: error: template argument 1 is invalid
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:26: error: invalid template-id
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~~~~~~~~
p1059.cpp:2041:39: error: 'views' has not been declared
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~~~~
p1059.cpp:2041:53: error: expected primary-expression before '>>' token
2041 | reverse_view(R&&) -> reverse_view<views::all_t<R>>;
| ^~
p1059.cpp:2041:53: error: expected initializer before '>' token
p1059.cpp:2043:24: error: ISO C++ forbids declaration of 'reverse_view' with no type [-fpermissive]
2043 | constexpr explicit reverse_view(V base);
| ^~~~~~~~~~~~
p1059.cpp:2043:15: error: 'explicit' outside class declaration
2043 | constexpr explicit reverse_view(V base);
| ^~~~~~~~
p1059.cpp:2043:37: error: 'V' was not declared in this scope
2043 | constexpr explicit reverse_view(V base);
| ^
p1059.cpp:2044:43: error: 'V' was not declared in this scope
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:43: error: 'V' was not declared in this scope
p1059.cpp:2044:32: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1059.cpp:2044:43: error: 'V' was not declared in this scope
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^
p1059.cpp:2044:44: error: template argument 1 is invalid
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^~
p1059.cpp:2047:43: error: 'V' was not declared in this scope
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:43: error: 'V' was not declared in this scope
p1059.cpp:2047:32: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1059.cpp:2047:43: error: 'V' was not declared in this scope
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^
p1059.cpp:2047:44: error: template argument 1 is invalid
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~
p1059.cpp:2047:77: error: 'V' was not declared in this scope
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:77: error: 'V' was not declared in this scope
p1059.cpp:2047:64: error: 'common_range' was not declared in this scope; did you mean 'std::ranges::common_range'?
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~~~~~~~~~~~
| std::ranges::common_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:689:13: note: 'std::ranges::common_range' declared here
689 | concept common_range
| ^~~~~~~~~~~~
p1059.cpp:2047:77: error: 'V' was not declared in this scope
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^
p1059.cpp:2047:55: error: expression must be enclosed in parentheses
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~~~~~~~
p1059.cpp:2047:64: error: expected initializer before 'common_range'
2047 | constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;
| ^~~~~~~~~~~~
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
2048 | constexpr auto begin() const requires common_range<const V>;
| ^
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2048:43: error: 'common_range' was not declared in this scope; did you mean 'std::ranges::common_range'?
2048 | constexpr auto begin() const requires common_range<const V>;
| ^~~~~~~~~~~~
| std::ranges::common_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:689:13: note: 'std::ranges::common_range' declared here
689 | concept common_range
| ^~~~~~~~~~~~
p1059.cpp:2048:34: error: expression must be enclosed in parentheses
2048 | constexpr auto begin() const requires common_range<const V>;
| ^~~~~~~~
p1059.cpp:2048:43: error: expected initializer before 'common_range'
2048 | constexpr auto begin() const requires common_range<const V>;
| ^~~~~~~~~~~~
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
2050 | constexpr auto end() const requires common_range<const V>;
| ^
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:2050:41: error: 'common_range' was not declared in this scope; did you mean 'std::ranges::common_range'?
2050 | constexpr auto end() const requires common_range<const V>;
| ^~~~~~~~~~~~
| std::ranges::common_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:689:13: note: 'std::ranges::common_range' declared here
689 | concept common_range
| ^~~~~~~~~~~~
p1059.cpp:2050:32: error: expression must be enclosed in parentheses
2050 | constexpr auto end() const requires common_range<const V>;
| ^~~~~~~~
p1059.cpp:2050:41: error: expected initializer before 'common_range'
2050 | constexpr auto end() const requires common_range<const V>;
| ^~~~~~~~~~~~
p1059.cpp:2063:39: error: 'views' has not been declared
2063 | auto names = historical_figures | views::elements<0>;
| ^~~~~
p1059.cpp:2063:57: error: expected primary-expression before ';' token
2063 | auto names = historical_figures | views::elements<0>;
| ^
p1059.cpp:2064:5: error: expected unqualified-id before 'for'
2064 | for (auto&& name : names) {
| ^~~
p1059.cpp:3476:24: error: 'inner' does not name a type
3476 | constexpr explicit inner-iterator(chunk_view& parent) noexcept;
| ^~~~~
p1059.cpp:3478:32: error: 'V' was not declared in this scope
3478 | constexpr const iterator_t<V>& base() const &;
| ^
p1059.cpp:3478:32: error: 'V' was not declared in this scope
p1059.cpp:3478:32: error: 'V' was not declared in this scope
p1059.cpp:3478:32: error: 'V' was not declared in this scope
p1059.cpp:3478:32: error: 'V' was not declared in this scope
p1059.cpp:3478:32: error: 'V' was not declared in this scope
p1059.cpp:3478:21: error: 'iterator_t' does not name a type; did you mean 'error_t'?
3478 | constexpr const iterator_t<V>& base() const &;
| ^~~~~~~~~~
| error_t
p1059.cpp:3479:5: error: expected unqualified-id before 'requires'
3479 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^~~~~~~~
p1059.cpp:3481:5: error: expected unqualified-id before 'return'
3481 | return ranges::min(parent_->remainder_, ranges::end(parent_->base_) - *parent_->current_);
| ^~~~~~
p1059.cpp:3486:11: error: 'chunk_view' is not a class template
3486 | class chunk_view<V>::inner-iterator {
| ^~~~~~~~~~
p1059.cpp:3486:11: error: 'chunk_view' has not been declared
p1059.cpp:3486:31: error: expected unqualified-id before '-' token
3486 | class chunk_view<V>::inner-iterator {
| ^
p1059.cpp:3534:11: error: 'chunk_view' is not a class template
3534 | class chunk_view<V> : public view_interface<chunk_view<V>> {
| ^~~~~~~~~~
p1059.cpp:3541:43: error: 'simple' was not declared in this scope
3541 | constexpr auto begin() requires (!simple-view<V>) {
| ^~~~~~
p1059.cpp:3547:41: error: 'simple' was not declared in this scope
3547 | constexpr auto end() requires (!simple-view<V>) {
| ^~~~~~
p1059.cpp: In member function 'constexpr V std::ranges::std::ranges::chunk_view<V>::base() &&':
p1059.cpp:3540:121: error: 'move' is not a member of 'std::ranges::std::ranges::std'
3540 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:3540:121: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::chunk_view<V>::begin() requires <erroneous-expression>':
p1059.cpp:3542:20: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3542 | return iterator<false>(this, ranges::begin(base_));
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3542:34: error: wrong number of template arguments (1, should be at least 2)
3542 | return iterator<false>(this, ranges::begin(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3542:50: error: 'begin' is not a member of 'std::ranges::std::ranges'
3542 | return iterator<false>(this, ranges::begin(base_));
| ^~~~~
p1059.cpp:3542:50: note: suggested alternatives:
p1059.cpp:2044:47: note: 'begin'
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: 'std::begin'
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
p1059.cpp:3542:50: note: 'std::ranges::__cust::begin, std::ranges::begin'
3542 | return iterator<false>(this, ranges::begin(base_));
| ^~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:952:10: note: 'std::ranges::__cust_access::begin'
952 | void begin(const auto&) = delete;
| ^~~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::chunk_view<V>::begin() const requires forward_range<const V>':
p1059.cpp:3545:20: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3545 | return iterator<true>(this, ranges::begin(base_));
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3545:33: error: wrong number of template arguments (1, should be at least 2)
3545 | return iterator<true>(this, ranges::begin(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3545:49: error: 'begin' is not a member of 'std::ranges::std::ranges'
3545 | return iterator<true>(this, ranges::begin(base_));
| ^~~~~
p1059.cpp:3545:49: note: suggested alternatives:
p1059.cpp:2044:47: note: 'begin'
2044 | constexpr reverse_iterator<iterator_t<V>> begin();
| ^~~~~
/usr/local/include/c++/12.1.0/bits/range_access.h:114:37: note: 'std::begin'
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
p1059.cpp:3545:49: note: 'std::ranges::__cust::begin, std::ranges::begin'
3545 | return iterator<true>(this, ranges::begin(base_));
| ^~~~~
/usr/local/include/c++/12.1.0/bits/iterator_concepts.h:952:10: note: 'std::ranges::__cust_access::begin'
952 | void begin(const auto&) = delete;
| ^~~~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::chunk_view<V>::end() requires <erroneous-expression>':
p1059.cpp:3549:33: error: 'n_' was not declared in this scope
3549 | auto missing = (n_ - ranges::distance(base_) % n_) % n_;
| ^~
p1059.cpp:3549:46: error: 'distance' is not a member of 'std::ranges::std::ranges'
3549 | auto missing = (n_ - ranges::distance(base_) % n_) % n_;
| ^~~~~~~~
p1059.cpp:3549:46: note: suggested alternatives:
In file included from /usr/local/include/c++/12.1.0/bits/stl_construct.h:62:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_funcs.h:146:5: note: 'std::distance'
146 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:864:34: note: 'std::ranges::distance'
864 | inline constexpr __distance_fn distance{};
| ^~~~~~~~
p1059.cpp:3550:24: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3550 | return iterator<false>(this, ranges::end(base_), missing);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3550:38: error: wrong number of template arguments (1, should be at least 2)
3550 | return iterator<false>(this, ranges::end(base_), missing);
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3550:54: error: 'end' is not a member of 'std::ranges::std::ranges'
3550 | return iterator<false>(this, ranges::end(base_), missing);
| ^~~
p1059.cpp:3550:54: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:3550:54: note: 'std::ranges::__cust::end, std::ranges::end'
3550 | return iterator<false>(this, ranges::end(base_), missing);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp:3552:24: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3552 | return iterator<false>(this, ranges::end(base_));
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3552:38: error: wrong number of template arguments (1, should be at least 2)
3552 | return iterator<false>(this, ranges::end(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3552:54: error: 'end' is not a member of 'std::ranges::std::ranges'
3552 | return iterator<false>(this, ranges::end(base_));
| ^~~
p1059.cpp:3552:54: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:3552:54: note: 'std::ranges::__cust::end, std::ranges::end'
3552 | return iterator<false>(this, ranges::end(base_));
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp: In member function 'constexpr auto std::ranges::std::ranges::chunk_view<V>::end() const requires forward_range<const V>':
p1059.cpp:3562:33: error: 'n_' was not declared in this scope
3562 | auto missing = (n_ - ranges::distance(base_) % n_) % n_;
| ^~
p1059.cpp:3562:46: error: 'distance' is not a member of 'std::ranges::std::ranges'
3562 | auto missing = (n_ - ranges::distance(base_) % n_) % n_;
| ^~~~~~~~
p1059.cpp:3562:46: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_funcs.h:146:5: note: 'std::distance'
146 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:864:34: note: 'std::ranges::distance'
864 | inline constexpr __distance_fn distance{};
| ^~~~~~~~
p1059.cpp:3563:24: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3563 | return iterator<true>(this, ranges::end(base_), missing);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3563:37: error: wrong number of template arguments (1, should be at least 2)
3563 | return iterator<true>(this, ranges::end(base_), missing);
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3563:53: error: 'end' is not a member of 'std::ranges::std::ranges'
3563 | return iterator<true>(this, ranges::end(base_), missing);
| ^~~
p1059.cpp:3563:53: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:3563:53: note: 'std::ranges::__cust::end, std::ranges::end'
3563 | return iterator<true>(this, ranges::end(base_), missing);
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp:3565:24: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3565 | return iterator<true>(this, ranges::end(base_));
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3565:37: error: wrong number of template arguments (1, should be at least 2)
3565 | return iterator<true>(this, ranges::end(base_));
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3565:53: error: 'end' is not a member of 'std::ranges::std::ranges'
3565 | return iterator<true>(this, ranges::end(base_));
| ^~~
p1059.cpp:3565:53: note: suggested alternatives:
p1059.cpp:770:16: note: 'end'
770 | constexpr auto end() requires (!simple-view<V>)
| ^~~
/usr/local/include/c++/12.1.0/bits/range_access.h:116:37: note: 'std::end'
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
p1059.cpp:3565:53: note: 'std::ranges::__cust::end, std::ranges::end'
3565 | return iterator<true>(this, ranges::end(base_));
| ^~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:136:10: note: 'std::ranges::__cust_access::end'
136 | void end(const auto&) = delete;
| ^~~
p1059.cpp: At global scope:
p1059.cpp:3575:24: error: ISO C++ forbids declaration of 'chunk_view' with no type [-fpermissive]
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^~~~~~~~~~
p1059.cpp:3575:15: error: 'explicit' outside class declaration
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^~~~~~~~
p1059.cpp:3575:35: error: 'V' was not declared in this scope
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3575:62: error: 'V' was not declared in this scope
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3575:63: error: template argument 1 is invalid
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3575:66: error: expression list treated as compound expression in initializer [-fpermissive]
3575 | constexpr explicit chunk_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3576:48: error: 'V' was not declared in this scope
3576 | constexpr auto size() requires sized_range<V>;
| ^
p1059.cpp:3576:36: error: template argument 1 is invalid
3576 | constexpr auto size() requires sized_range<V>;
| ^~~~~~~~~~~~~~
p1059.cpp:3576:20: error: constraints on a non-templated function
3576 | constexpr auto size() requires sized_range<V>;
| ^~~~
p1059.cpp:3577:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
3577 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3577:60: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3577:61: error: template argument 1 is invalid
3577 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3577:53: error: missing template arguments before '<' token
3577 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3577:53: error: expected initializer before '<' token
p1059.cpp:3579:5: error: expected unqualified-id before 'return'
3579 | return to_unsigned_like(div_ceil(ranges::distance(base_), n_));
| ^~~~~~
p1059.cpp:3584:26: error: invalid class name in declaration of 'class std::ranges::std::ranges::chunk_view<V>::iterator'
3584 | class chunk_view<V>::iterator {
| ^~~~~~~~
p1059.cpp:3635:24: error: 'Base' was not declared in this scope; did you mean 'base'?
3635 | range_difference_t<Base> missing = 0);
| ^~~~
| base
p1059.cpp:3635:28: error: template argument 1 is invalid
3635 | range_difference_t<Base> missing = 0);
| ^
p1059.cpp:3635:41: error: expected ',' or ';' before ')' token
3635 | range_difference_t<Base> missing = 0);
| ^
p1059.cpp:3637:5: error: expected unqualified-id before '->' token
3637 | ->n_, and missing_ with missing.
| ^~
p1059.cpp:3642:9: error: 'i' does not name a type
3642 | i.n_, and missing_ with i.missing_. constexpr iterator_t<Base> base() const;
| ^
p1059.cpp:3644:19: error: 'value_type' does not name a type; did you mean 'false_type'?
3644 | constexpr value_type operator*() const;
| ^~~~~~~~~~
| false_type
p1059.cpp:3647:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3647 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3647:19: error: deduced class type 'iterator' in function return type
3647 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3650:9: error: 'missing_' does not name a type
3650 | missing_ = ranges::advance(current_, n_, end_);
| ^~~~~~~~
p1059.cpp:3651:9: error: expected unqualified-id before 'return'
3651 | return *this;
| ^~~~~~
p1059.cpp:3652:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3652 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3652:19: error: deduced class type 'iterator' in function return type
3652 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3654:21: error: invalid use of 'this' at top level
3654 | auto tmp = *this;
| ^~~~
p1059.cpp:3655:5: error: expected unqualified-id before '++' token
3655 | ++*this;
| ^~
p1059.cpp:3656:9: error: expected unqualified-id before 'return'
3656 | return tmp;
| ^~~~~~
p1059.cpp:3657:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3657 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3657:71: error: 'Base' was not declared in this scope; did you mean 'base'?
3657 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~
| base
p1059.cpp:3657:51: error: template argument 1 is invalid
3657 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3657:19: error: deduced class type 'iterator' in function return type
3657 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3659:24: error: expected constructor, destructor, or type conversion before '(' token
3659 | ranges::advance(current_, missing_ - n_);
| ^
p1059.cpp:3660:9: error: 'missing_' does not name a type
3660 | missing_ = 0;
| ^~~~~~~~
p1059.cpp:3661:9: error: expected unqualified-id before 'return'
3661 | return *this;
| ^~~~~~
p1059.cpp:3662:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3662 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3662:73: error: 'Base' was not declared in this scope; did you mean 'base'?
3662 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~
| base
p1059.cpp:3662:53: error: template argument 1 is invalid
3662 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3662:19: error: deduced class type 'iterator' in function return type
3662 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3664:21: error: invalid use of 'this' at top level
3664 | auto tmp = *this;
| ^~~~
p1059.cpp:3665:5: error: expected unqualified-id before '--' token
3665 | --*this;
| ^~
p1059.cpp:3666:9: error: expected unqualified-id before 'return'
3666 | return tmp;
| ^~~~~~
p1059.cpp:3667:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3667 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3667:19: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
3667 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3667:40: error: 'difference_type' was not declared in this scope
3667 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3670:9: error: expected unqualified-id before 'if'
3670 | if (x > 0) {
| ^~
p1059.cpp:3672:7: error: expected unqualified-id before 'else'
3672 | } else if (x < 0) {
| ^~~~
p1059.cpp:3676:5: error: expected unqualified-id before 'return'
3676 | return *this;
| ^~~~~~
p1059.cpp:3677:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3677 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3677:15: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
3677 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3677:36: error: 'difference_type' was not declared in this scope
3677 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3679:5: error: expected unqualified-id before 'requires'
3679 | requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3681:5: error: 'friend' used outside of class
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:3681:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3681:55: error: expected ')' before ',' token
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ~ ^
| )
p1059.cpp:3681:27: error: 'constexpr bool std::ranges::operator==(...)' must have an argument of class or enumerated type
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~
p1059.cpp:3681:57: error: expected unqualified-id before 'const'
3681 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
p1059.cpp:3683:5: error: 'friend' used outside of class
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:3683:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3683:55: error: expected ')' before ',' token
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ~ ^
| )
p1059.cpp:3683:27: error: 'constexpr bool std::ranges::operator==(...)' must have an argument of class or enumerated type
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~~~
p1059.cpp:3683:75: error: expected initializer before ')' token
3683 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^
p1059.cpp:3685:5: error: 'friend' used outside of class
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3685:37: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3685:54: error: expected ')' before ',' token
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3685:27: error: 'constexpr bool std::ranges::operator<(...)' must have an argument of class or enumerated type
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3685:56: error: expected unqualified-id before 'const'
3685 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3687:5: error: 'friend' used outside of class
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3687:37: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3687:54: error: expected ')' before ',' token
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:3687:27: error: 'constexpr bool std::ranges::operator>(...)' must have an argument of class or enumerated type
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:3687:56: error: expected unqualified-id before 'const'
3687 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:3692:5: error: expected unqualified-id before 'requires'
3692 | requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3694:5: error: expected unqualified-id before 'return'
3694 | return y < x;
| ^~~~~~
p1059.cpp:3695:5: error: 'friend' used outside of class
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3695:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3695:55: error: expected ')' before ',' token
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3695:27: error: 'constexpr bool std::ranges::operator<=(...)' must have an argument of class or enumerated type
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3695:57: error: expected unqualified-id before 'const'
3695 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3697:5: error: expected unqualified-id before 'return'
3697 | return !(y < x);
| ^~~~~~
p1059.cpp:3698:5: error: 'friend' used outside of class
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3698:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3698:55: error: expected ')' before ',' token
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:3698:27: error: 'constexpr bool std::ranges::operator>=(...)' must have an argument of class or enumerated type
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:3698:57: error: expected unqualified-id before 'const'
3698 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:3701:5: error: expected unqualified-id before 'return'
3701 | return !(x < y);
| ^~~~~~
p1059.cpp:3702:5: error: 'friend' used outside of class
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~
| ------
p1059.cpp:3702:39: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3702:56: error: expected ')' before ',' token
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ~ ^
| )
p1059.cpp:3702:27: error: 'constexpr auto std::ranges::operator<=>(...)' must have an argument of class or enumerated type
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~~~
p1059.cpp:3702:58: error: expected unqualified-id before 'const'
3702 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~
p1059.cpp:3705:5: error: 'friend' used outside of class
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3705:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3705:41: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3705:58: error: expected ')' before ',' token
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3705:22: error: deduced class type 'iterator' in function return type
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3705:76: error: expected initializer before 'n'
3705 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^
p1059.cpp:3706:5: error: 'friend' used outside of class
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3706:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3706:31: error: declaration of 'operator+' as non-function
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3706:41: error: 'difference_type' was not declared in this scope
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3706:60: error: expected primary-expression before 'const'
3706 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3709:5: error: 'r' does not name a type
3709 | r += n;
| ^
p1059.cpp:3710:5: error: expected unqualified-id before 'return'
3710 | return r;
| ^~~~~~
p1059.cpp:3711:5: error: 'friend' used outside of class
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3711:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3711:41: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3711:58: error: expected ')' before ',' token
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3711:22: error: deduced class type 'iterator' in function return type
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3711:76: error: expected initializer before 'n'
3711 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^
p1059.cpp:3713:10: error: conflicting declaration 'auto std::ranges::r'
3713 | auto r = i;
| ^
p1059.cpp:3708:10: note: previous declaration as 'int std::ranges::r'
3708 | auto r = i;
| ^
p1059.cpp:3714:5: error: 'r' does not name a type
3714 | r -= n;
| ^
p1059.cpp:3715:5: error: expected unqualified-id before 'return'
3715 | return r;
| ^~~~~~
p1059.cpp:3716:5: error: 'friend' used outside of class
3716 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3716:22: error: 'difference_type' does not name a type
3716 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3718:5: error: expected unqualified-id before 'requires'
3718 | requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~~~
p1059.cpp:3720:5: error: 'friend' used outside of class
3720 | friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3720:22: error: 'difference_type' does not name a type
3720 | friend constexpr difference_type operator-(const iterator& x, default_sentinel_t y) requires sized_sentinel_for<sentinel_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3722:5: error: expected unqualified-id before 'return'
3722 | return -(y - x);
| ^~~~~~
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:60: error: 'views' was not declared in this scope; did you mean 'view'?
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~
| view
p1059.cpp:3726:49: error: 'slide_view' does not name a type
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^~~~~~~~~~
p1059.cpp:3726:59: error: expected constructor, destructor, or type conversion before '<' token
3726 | slide_view(R&& r, range_difference_t<R>) -> slide_view<views::all_t<R>>;
| ^
p1059.cpp:3728:24: error: ISO C++ forbids declaration of 'slide_view' with no type [-fpermissive]
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^~~~~~~~~~
p1059.cpp:3728:15: error: 'explicit' outside class declaration
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^~~~~~~~
p1059.cpp:3728:35: error: 'V' was not declared in this scope
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3728:62: error: 'V' was not declared in this scope
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3728:62: error: 'V' was not declared in this scope
p1059.cpp:3728:62: error: 'V' was not declared in this scope
p1059.cpp:3728:62: error: 'V' was not declared in this scope
p1059.cpp:3728:62: error: 'V' was not declared in this scope
p1059.cpp:3728:43: error: 'range_difference_t' was not declared in this scope; did you mean 'std::ranges::range_difference_t'?
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^~~~~~~~~~~~~~~~~~
| std::ranges::range_difference_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:601:11: note: 'std::ranges::range_difference_t' declared here
601 | using range_difference_t = iter_difference_t<iterator_t<_Range>>;
| ^~~~~~~~~~~~~~~~~~
p1059.cpp:3728:62: error: 'V' was not declared in this scope
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3728:65: error: 'n' was not declared in this scope; did you mean 'yn'?
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^
| yn
p1059.cpp:3728:66: error: expression list treated as compound expression in initializer [-fpermissive]
3728 | constexpr explicit slide_view(V base, range_difference_t<V> n);
| ^
p1059.cpp:3731:5: error: expected initializer before 'for'
3731 | for (auto i : v | views::slide(2)) {
| ^~~
p1059.cpp:3737:18: error: expected '=' before '-' token
3737 | concept slide-caches-nothing = random_access_range<V> && sized_range<V>;
| ^
p1059.cpp:3740:5: error: expected unqualified-id before '!' token
3740 | !slide-caches-nothing<V> && bidirectional_range<V> && common_range<V>;
| ^
p1059.cpp:3742:18: error: expected '=' before '-' token
3742 | concept slide-caches-first =
| ^
p1059.cpp:3755:21: error: 'simple' was not declared in this scope
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3755:39: error: 'slide' was not declared in this scope
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3755:45: error: 'caches' was not declared in this scope
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3755:52: error: 'nothing' was not declared in this scope
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~~
p1059.cpp:3755:60: error: expected primary-expression before 'const'
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3755:60: error: expected ')' before 'const'
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^~~~~
| )
p1059.cpp:3755:70: error: expected ')' before ';' token
3755 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^
| )
p1059.cpp:3756:47: error: 'slide' was not declared in this scope
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~
p1059.cpp:3756:53: error: 'caches' was not declared in this scope
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~~
p1059.cpp:3756:60: error: 'nothing' was not declared in this scope
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~~~
p1059.cpp:3756:38: error: expression must be enclosed in parentheses
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~~~~
p1059.cpp:3756:38: error: expected ';' at end of member declaration
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~~~~
| ;
p1059.cpp:3756:47: error: 'slide' does not name a type
3756 | constexpr auto begin() const requires slide-caches-nothing<const V>;
| ^~~~~
p1059.cpp:3758:21: error: 'simple' was not declared in this scope
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3758:39: error: 'slide' was not declared in this scope
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3758:45: error: 'caches' was not declared in this scope
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3758:52: error: 'nothing' was not declared in this scope
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~~
p1059.cpp:3758:60: error: expected primary-expression before 'const'
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3758:60: error: expected ')' before 'const'
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^~~~~
| )
p1059.cpp:3758:70: error: expected ')' before ';' token
3758 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^
| )
p1059.cpp:3759:45: error: 'slide' was not declared in this scope
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~
p1059.cpp:3759:51: error: 'caches' was not declared in this scope
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~~
p1059.cpp:3759:58: error: 'nothing' was not declared in this scope
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~~~
p1059.cpp:3759:36: error: expression must be enclosed in parentheses
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~~~~
p1059.cpp:3759:36: error: expected ';' at end of member declaration
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~~~~
| ;
p1059.cpp:3759:45: error: 'slide' does not name a type
3759 | constexpr auto end() const requires slide-caches-nothing<const V>;
| ^~~~~
p1059.cpp:3764:5: error: expected unqualified-id before 'requires'
3764 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~~~
p1059.cpp:3766:17: error: expected constructor, destructor, or type conversion before '(' token
3766 | ranges::next(ranges::begin(base_), n_ - 1, ranges::end(base_)), n_)
| ^
p1059.cpp:3773:17: error: 'simple' was not declared in this scope
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3773:29: error: 'V' was not declared in this scope
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^
p1059.cpp:3773:24: error: template argument 1 is invalid
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~~
p1059.cpp:3773:35: error: 'slide' was not declared in this scope
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3773:41: error: 'caches' was not declared in this scope
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~
p1059.cpp:3773:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^
p1059.cpp:3773:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3773:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3773:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3773:62: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3773:48: error: 'nothing' was not declared in this scope
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~~~
p1059.cpp:3773:56: error: expected primary-expression before 'const'
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ^~~~~
p1059.cpp:3773:56: error: expected ')' before 'const'
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^~~~~
| )
p1059.cpp:3773:66: error: expected ')' before ';' token
3773 | requires (!(simple-view<V> && slide-caches-nothing<const V>));
| ~ ^
| )
p1059.cpp:3772:20: error: constraints on a non-templated function
3772 | constexpr auto end()
| ^~~
p1059.cpp:3775:5: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3775:19: error: wrong number of template arguments (1, should be at least 2)
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3775:34: error: expected ')' before '(' token
3775 | iterator<false>(ranges::begin(base_) + range_difference_t<V>(size()), n_) — Otherwise, if V models slide-caches-last,
| ~ ^
| )
p1059.cpp:3781:56: error: 'V' was not declared in this scope
3781 | constexpr auto size() requires sized_range<V>;
| ^
p1059.cpp:3781:44: error: template argument 1 is invalid
3781 | constexpr auto size() requires sized_range<V>;
| ^~~~~~~~~~~~~~
p1059.cpp:3781:28: error: constraints on a non-templated function
3781 | constexpr auto size() requires sized_range<V>;
| ^~~~
p1059.cpp:3782:68: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
3782 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3782:68: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1059.cpp:3782:69: error: template argument 1 is invalid
3782 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3782:61: error: missing template arguments before '<' token
3782 | constexpr auto size() const requires sized_range<const V>;
| ^
p1059.cpp:3782:61: error: expected initializer before '<' token
p1059.cpp:3784:40: error: 'base_' was not declared in this scope; did you mean 'base'?
3784 | auto sz = ranges::distance(base_) - n_ + 1;
| ^~~~~
| base
p1059.cpp:3784:49: error: 'n_' was not declared in this scope
3784 | auto sz = ranges::distance(base_) - n_ + 1;
| ^~
p1059.cpp:3785:13: error: expected unqualified-id before 'if'
3785 | if (sz < 0) sz = 0;
| ^~
p1059.cpp:3786:13: error: expected unqualified-id before 'return'
3786 | return to-unsigned-like(sz);
| ^~~~~~
p1059.cpp:3791:34: error: invalid class name in declaration of 'class std::ranges::slide_view<V>::iterator'
3791 | class slide_view<V>::iterator {
| ^~~~~~~~
p1059.cpp:3834:5: error: expected unqualified-id before 'requires'
3834 | requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3836:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3836:35: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:39: error: template argument 1 is invalid
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^
p1059.cpp:3836:69: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:73: error: template argument 1 is invalid
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^
p1059.cpp:3836:89: error: 'slide' was not declared in this scope
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~
p1059.cpp:3836:95: error: 'caches' was not declared in this scope
3836 | onstexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~~
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:102: error: 'first' was not declared in this scope
3836 | r iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~
p1059.cpp:3836:108: error: 'Base' was not declared in this scope; did you mean 'base'?
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~
| base
p1059.cpp:3836:113: error: expected primary-expression before ')' token
3836 | iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^
p1059.cpp:3836:5: error: 'decl-specifier' in declaration of deduction guide
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~~~~~
p1059.cpp:3836:15: error: deduction guide for 'std::iterator<_Category, _Tp, _Distance, _Pointer, _Reference' must have trailing return type
3836 | constexpr iterator(iterator_t<Base> current, range_difference_t<Base> n) requires (!slide-caches-first<Base>);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3839:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3839:35: error: 'Base' was not declared in this scope; did you mean 'base'?
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^~~~
| base
p1059.cpp:3839:39: error: template argument 1 is invalid
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^
p1059.cpp:3839:61: error: 'Base' was not declared in this scope; did you mean 'base'?
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^~~~
| base
p1059.cpp:3839:65: error: template argument 1 is invalid
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^
p1059.cpp:3839:96: error: 'Base' was not declared in this scope; did you mean 'base'?
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^~~~
| base
p1059.cpp:3839:100: error: template argument 1 is invalid
3839 | constexpr iterator(iterator_t<Base> current, iterator_t<Base> last_ele, range_difference_t<Base> n)
| ^
p1059.cpp:3840:14: error: 'slide' was not declared in this scope
3840 | requires slide-caches-first<Base>;
| ^~~~~
p1059.cpp:3840:20: error: 'caches' was not declared in this scope
3840 | requires slide-caches-first<Base>;
| ^~~~~~
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:27: error: 'first' was not declared in this scope
3840 | requires slide-caches-first<Base>;
| ^~~~~
p1059.cpp:3840:33: error: 'Base' was not declared in this scope; did you mean 'base'?
3840 | requires slide-caches-first<Base>;
| ^~~~
| base
p1059.cpp:3840:5: error: expression must be enclosed in parentheses
3840 | requires slide-caches-first<Base>;
| ^~~~~~~~
p1059.cpp:3840:14: error: expected initializer before 'slide'
3840 | requires slide-caches-first<Base>;
| ^~~~~
p1059.cpp:3842:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3842:24: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3842:34: error: 'Const' was not declared in this scope; did you mean 'const'?
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~
| const
p1059.cpp:3842:39: error: wrong number of template arguments (1, should be at least 2)
3842 | constexpr iterator(iterator<!Const> i)
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3843:49: error: 'V' was not declared in this scope
3843 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^
p1059.cpp:3843:50: error: template argument 1 is invalid
3843 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^
p1059.cpp:3843:64: error: 'Base' was not declared in this scope; did you mean 'base'?
3843 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^~~~
| base
p1059.cpp:3843:64: error: template argument 1 is invalid
p1059.cpp:3843:23: error: template argument 1 is invalid
3843 | requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3843:23: error: template argument 2 is invalid
p1059.cpp:3842:5: error: 'decl-specifier' in declaration of deduction guide
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~~~~~
p1059.cpp:3842:15: error: deduction guide for 'std::iterator<_Category, _Tp, _Distance, _Pointer, _Reference' must have trailing return type
3842 | constexpr iterator(iterator<!Const> i)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3847:32: error: non-member function 'constexpr auto std::ranges::operator*()' cannot have cv-qualifier
3847 | constexpr auto operator*() const;
| ^~~~~
p1059.cpp:3847:20: error: 'constexpr auto std::ranges::operator*()' must have an argument of class or enumerated type
3847 | constexpr auto operator*() const;
| ^~~~~~~~
p1059.cpp:3849:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3849 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3849:15: error: deduced class type 'iterator' in function return type
3849 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3853:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3853 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3853:15: error: deduced class type 'iterator' in function return type
3853 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3855:17: error: invalid use of 'this' at top level
3855 | auto tmp = *this;
| ^~~~
p1059.cpp:3856:5: error: expected unqualified-id before '++' token
3856 | ++*this;
| ^~
p1059.cpp:3857:5: error: expected unqualified-id before 'return'
3857 | return tmp;
| ^~~~~~
p1059.cpp:3858:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3858 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3858:67: error: 'Base' was not declared in this scope; did you mean 'base'?
3858 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~
| base
p1059.cpp:3858:47: error: template argument 1 is invalid
3858 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3858:15: error: deduced class type 'iterator' in function return type
3858 | constexpr iterator& operator--() requires bidirectional_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3862:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3862 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3862:69: error: 'Base' was not declared in this scope; did you mean 'base'?
3862 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~
| base
p1059.cpp:3862:49: error: template argument 1 is invalid
3862 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3862:15: error: deduced class type 'iterator' in function return type
3862 | constexpr iterator operator--(int) requires bidirectional_range<Base >;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3864:17: error: invalid use of 'this' at top level
3864 | auto tmp = *this;
| ^~~~
p1059.cpp:3865:5: error: expected unqualified-id before '--' token
3865 | --*this;
| ^~
p1059.cpp:3866:5: error: expected unqualified-id before 'return'
3866 | return tmp;
| ^~~~~~
p1059.cpp:3867:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3867 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3867:15: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
3867 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3867:36: error: 'difference_type' was not declared in this scope
3867 | constexpr iterator& operator+=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3869:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3869 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3869:15: error: template placeholder type 'iterator<...auto...>' must be followed by a simple declarator-id
3869 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3869:36: error: 'difference_type' was not declared in this scope
3869 | constexpr iterator& operator-=(difference_type x) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3871:20: error: declaration of 'operator[]' as non-function
3871 | constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3871:31: error: 'difference_type' was not declared in this scope
3871 | constexpr auto operator[](difference_type n) const requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3874:5: error: 'friend' used outside of class
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3874:37: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3874:54: error: expected ')' before ',' token
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3874:27: error: 'constexpr bool std::ranges::operator<(...)' must have an argument of class or enumerated type
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3874:56: error: expected unqualified-id before 'const'
3874 | friend constexpr bool operator<(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3876:5: error: 'friend' used outside of class
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3876:37: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3876:54: error: expected ')' before ',' token
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:3876:27: error: 'constexpr bool std::ranges::operator>(...)' must have an argument of class or enumerated type
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:3876:56: error: expected unqualified-id before 'const'
3876 | friend constexpr bool operator>(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:3879:5: error: expected unqualified-id before 'return'
3879 | return y < x;
| ^~~~~~
p1059.cpp:3880:5: error: 'friend' used outside of class
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3880:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3880:55: error: expected ')' before ',' token
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3880:27: error: 'constexpr bool std::ranges::operator<=(...)' must have an argument of class or enumerated type
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3880:57: error: expected unqualified-id before 'const'
3880 | friend constexpr bool operator<=(const iterator& x, const iterator& y) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3882:5: error: expected unqualified-id before 'return'
3882 | return !(y < x);
| ^~~~~~
p1059.cpp:3883:5: error: 'friend' used outside of class
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~
| ------
p1059.cpp:3883:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3883:55: error: expected ')' before ',' token
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ~ ^
| )
p1059.cpp:3883:27: error: 'constexpr bool std::ranges::operator>=(...)' must have an argument of class or enumerated type
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~~~~
p1059.cpp:3883:57: error: expected unqualified-id before 'const'
3883 | friend constexpr bool operator>=(const iterator& x, const iterator& y)
| ^~~~~
p1059.cpp:3886:5: error: expected unqualified-id before 'return'
3886 | return !(x < y);
| ^~~~~~
p1059.cpp:3887:5: error: 'friend' used outside of class
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~
| ------
p1059.cpp:3887:39: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3887:56: error: expected ')' before ',' token
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ~ ^
| )
p1059.cpp:3887:27: error: 'constexpr auto std::ranges::operator<=>(...)' must have an argument of class or enumerated type
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~~~~
p1059.cpp:3887:58: error: expected unqualified-id before 'const'
3887 | friend constexpr auto operator<=>(const iterator& x, const iterator& y) requires random_access_range<Base> &&
| ^~~~~
p1059.cpp:3890:5: error: 'friend' used outside of class
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3890:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3890:41: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3890:58: error: expected ')' before ',' token
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3890:22: error: deduced class type 'iterator' in function return type
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3890:76: error: expected initializer before 'n'
3890 | friend constexpr iterator operator+(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^
p1059.cpp:3891:5: error: 'friend' used outside of class
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3891:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3891:31: error: declaration of 'operator+' as non-function
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~
p1059.cpp:3891:41: error: 'difference_type' was not declared in this scope
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3891:60: error: expected primary-expression before 'const'
3891 | friend constexpr iterator operator+(difference_type n, const iterator& i) requires random_access_range<Base>;
| ^~~~~
p1059.cpp:3893:10: error: conflicting declaration 'auto std::ranges::r'
3893 | auto r = i;
| ^
p1059.cpp:3708:10: note: previous declaration as 'int std::ranges::r'
3708 | auto r = i;
| ^
p1059.cpp:3894:5: error: 'r' does not name a type
3894 | r += n;
| ^
p1059.cpp:3895:5: error: expected unqualified-id before 'return'
3895 | return r;
| ^~~~~~
p1059.cpp:3896:5: error: 'friend' used outside of class
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~
| ------
p1059.cpp:3896:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3896:41: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3896:58: error: expected ')' before ',' token
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ~ ^
| )
p1059.cpp:3896:22: error: deduced class type 'iterator' in function return type
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3896:76: error: expected initializer before 'n'
3896 | friend constexpr iterator operator-(const iterator& i, difference_type n) requires random_access_range<Base>;
| ^
p1059.cpp:3898:10: error: conflicting declaration 'auto std::ranges::r'
3898 | auto r = i;
| ^
p1059.cpp:3708:10: note: previous declaration as 'int std::ranges::r'
3708 | auto r = i;
| ^
p1059.cpp:3899:5: error: 'r' does not name a type
3899 | r -= n;
| ^
p1059.cpp:3900:5: error: expected unqualified-id before 'return'
3900 | return r;
| ^~~~~~
p1059.cpp:3901:5: error: 'friend' used outside of class
3901 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~
| ------
p1059.cpp:3901:22: error: 'difference_type' does not name a type
3901 | friend constexpr difference_type operator-(const iterator& x, const iterator& y) requires sized_sentinel_for<iterator_t<Base>, iterator_t<Base>>;
| ^~~~~~~~~~~~~~~
p1059.cpp:3907:26: error: declaration of 'class std::ranges::slide_view<V>::sentinel' in namespace 'std::ranges::std::ranges' which does not enclose 'class std::ranges::slide_view<V>'
3907 | class slide_view<V>::sentinel {
| ^~~~~~~~
p1059.cpp:3924:44: error: 'V' was not declared in this scope
3924 | constexpr explicit sentinel(sentinel_t<V> end);
| ^
p1059.cpp:3924:45: error: template argument 1 is invalid
3924 | constexpr explicit sentinel(sentinel_t<V> end);
| ^
p1059.cpp:3924:5: error: 'decl-specifier' in declaration of deduction guide
3924 | constexpr explicit sentinel(sentinel_t<V> end);
| ^~~~~~~~~
p1059.cpp:3924:24: error: deduction guide for 'std::ranges::sentinel<<anonymous> >' must have trailing return type
3924 | constexpr explicit sentinel(sentinel_t<V> end);
| ^~~~~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:3926:5: error: 'friend' used outside of class
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~~
| ------
p1059.cpp:3926:44: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3926:58: error: wrong number of template arguments (1, should be at least 2)
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3926:64: error: template placeholder type 'const sentinel<...auto...>' must be followed by a simple declarator-id
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:3926:27: error: 'constexpr bool std::ranges::operator==(...)' must have an argument of class or enumerated type
3926 | friend constexpr bool operator==(const iterator<false>& x, const sentinel& y);
| ^~~~~~~~
p1059.cpp:3927:5: error: 'friend' used outside of class
3927 | friend constexpr range_difference_t<V>
| ^~~~~~
| ------
p1059.cpp:3927:41: error: 'V' was not declared in this scope
3927 | friend constexpr range_difference_t<V>
| ^
p1059.cpp:3927:42: error: template argument 1 is invalid
3927 | friend constexpr range_difference_t<V>
| ^
p1059.cpp:3928:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3928 | operator-(const iterator<false>& x, const sentinel& y)
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3928:35: error: wrong number of template arguments (1, should be at least 2)
3928 | operator-(const iterator<false>& x, const sentinel& y)
| ^
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3928:41: error: template placeholder type 'const sentinel<...auto...>' must be followed by a simple declarator-id
3928 | operator-(const iterator<false>& x, const sentinel& y)
| ^~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:3929:44: error: 'V' was not declared in this scope
3929 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^
p1059.cpp:3929:45: error: template argument 1 is invalid
3929 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^
p1059.cpp:3929:59: error: 'V' was not declared in this scope
3929 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^
p1059.cpp:3929:59: error: template argument 1 is invalid
p1059.cpp:3929:14: error: template argument 1 is invalid
3929 | requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1059.cpp:3929:14: error: template argument 2 is invalid
p1059.cpp:3928:5: error: constraints on a non-templated function
3928 | operator-(const iterator<false>& x, const sentinel& y)
| ^~~~~~~~
p1059.cpp:3928:5: error: 'constexpr int std::ranges::operator-(...)' must have an argument of class or enumerated type
p1059.cpp:3931:5: error: 'friend' used outside of class
3931 | friend constexpr range_difference_t<V>
| ^~~~~~
| ------
p1059.cpp:3931:41: error: 'V' was not declared in this scope
3931 | friend constexpr range_difference_t<V>
| ^
p1059.cpp:3931:42: error: template argument 1 is invalid
3931 | friend constexpr range_difference_t<V>
| ^
p1059.cpp:3932:15: error: template placeholder type 'const sentinel<...auto...>' must be followed by a simple declarator-id
3932 | operator-(const sentinel& y, const iterator<false>& x)
| ^~~~~
p1059.cpp:643:23: note: 'template<bool <anonymous> > struct std::ranges::sentinel' declared here
643 | template<bool> struct sentinel ;
| ^~~~~~~~
p1059.cpp:3932:32: error: expected ')' before ',' token
3932 | operator-(const sentinel& y, const iterator<false>& x)
| ~ ^
| )
p1059.cpp:3932:5: error: 'constexpr int std::ranges::operator-(...)' must have an argument of class or enumerated type
3932 | operator-(const sentinel& y, const iterator<false>& x)
| ^~~~~~~~
p1059.cpp:3932:34: error: expected unqualified-id before 'const'
3932 | operator-(const sentinel& y, const iterator<false>& x)
| ^~~~~
p1059.cpp:3938:5: error: 'adjacent' does not name a type
3938 | adjacent elements for which the predicate returns false.
| ^~~~~~~~
p1059.cpp:3941:1: error: expected unqualified-id before 'for'
3941 | for (auto r : v | views::chunk_by(ranges::less_equal {})) {
| ^~~
p1059.cpp:3941:56: error: expected unqualified-id before ')' token
3941 | for (auto r : v | views::chunk_by(ranges::less_equal {})) {
| ^
p1059.cpp:3967:9: error: non-static data member 'find' declared 'constexpr'
3967 | constexpr iterator_t<V> find-next (iterator_t<V>);
| ^~~~~~~~~
p1059.cpp:3967:33: error: expected ';' at end of member declaration
3967 | constexpr iterator_t<V> find-next (iterator_t<V>);
| ^~~~
| ;
p1059.cpp:3967:37: error: expected unqualified-id before '-' token
3967 | constexpr iterator_t<V> find-next (iterator_t<V>);
| ^
p1059.cpp:3968:9: error: non-static data member 'find' declared 'constexpr'
3968 | constexpr iterator_t<V> find-prev (iterator_t<V>)
| ^~~~~~~~~
p1059.cpp:3968:33: error: expected ';' at end of member declaration
3968 | constexpr iterator_t<V> find-prev (iterator_t<V>)
| ^~~~
| ;
p1059.cpp:3968:33: error: redeclaration of 'std::ranges::iterator_t<_Range> std::ranges::std::ranges::chunk_by_view<V, Pred>::find'
p1059.cpp:3967:33: note: previous declaration 'std::ranges::iterator_t<_Range> std::ranges::std::ranges::chunk_by_view<V, Pred>::find'
3967 | constexpr iterator_t<V> find-next (iterator_t<V>);
| ^~~~
p1059.cpp:3968:37: error: expected unqualified-id before '-' token
3968 | constexpr iterator_t<V> find-prev (iterator_t<V>)
| ^
p1059.cpp: In member function 'constexpr V std::ranges::std::ranges::chunk_by_view<V, Pred>::base() &&':
p1059.cpp:3962:121: error: 'move' is not a member of 'std::ranges::std::ranges::std'
3962 | t & requires copy_constructible<V> { return base_; } constexpr V base() && { return std::move(base_); }
| ^~~~
p1059.cpp:3962:121: note: suggested alternatives:
/usr/local/include/c++/12.1.0/bits/stl_algobase.h:644:5: note: 'std::move'
644 | move(_II __first, _II __last, _OI __result)
| ^~~~
/usr/local/include/c++/12.1.0/bits/ranges_algobase.h:344:30: note: 'std::ranges::move'
344 | inline constexpr __move_fn move{};
| ^~~~
p1059.cpp: At global scope:
p1059.cpp:3972:47: error: 'views' was not declared in this scope; did you mean 'view'?
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:3972:68: error: wrong number of template arguments (1, should be 2)
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3955:11: note: provided for 'template<class V, class Pred> requires (forward_range<V>) && (indirect_binary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())), decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::std::ranges::chunk_by_view'
3955 | class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
| ^~~~~~~~~~~~~
p1059.cpp:3972:47: error: 'views' was not declared in this scope; did you mean 'view'?
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:3972:68: error: wrong number of template arguments (1, should be 2)
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3955:11: note: provided for 'template<class V, class Pred> requires (forward_range<V>) && (indirect_binary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())), decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::std::ranges::chunk_by_view'
3955 | class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
| ^~~~~~~~~~~~~
p1059.cpp:3972:47: error: 'views' was not declared in this scope; did you mean 'view'?
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:3972:68: error: wrong number of template arguments (1, should be 2)
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3955:11: note: provided for 'template<class V, class Pred> requires (forward_range<V>) && (indirect_binary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())), decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::std::ranges::chunk_by_view'
3955 | class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
| ^~~~~~~~~~~~~
p1059.cpp:3972:47: error: 'views' was not declared in this scope; did you mean 'view'?
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~
| view
p1059.cpp:3972:68: error: wrong number of template arguments (1, should be 2)
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3955:11: note: provided for 'template<class V, class Pred> requires (forward_range<V>) && (indirect_binary_predicate<Pred, decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())), decltype(std::ranges::__cust_access::__begin((declval<_Container&>)()))>) && ((view<V>) && (is_object_v<Pred>)) class std::ranges::std::ranges::chunk_by_view'
3955 | class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
| ^~~~~~~~~~~~~
p1059.cpp:3972:33: error: invalid template-id
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~~~~~~~~~
p1059.cpp:3972:47: error: 'views' has not been declared
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^~~~~
p1059.cpp:3972:61: error: expected primary-expression before '>' token
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
p1059.cpp:3972:61: error: trailing return type 'chunk_by_view<...auto...>' of deduction guide is not a specialization of 'std::ranges::std::ranges::chunk_by_view<V, Pred>'
p1059.cpp:3972:62: error: expected ';' before ',' token
3972 | chunk_by_view(R&&, Pred) -> chunk_by_view<views::all_t<R>, Pred>;
| ^
| ;
p1059.cpp:3974:24: error: ISO C++ forbids declaration of 'chunk_by_view' with no type [-fpermissive]
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^~~~~~~~~~~~~
p1059.cpp:3974:15: error: 'explicit' outside class declaration
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^~~~~~~~
p1059.cpp:3974:38: error: 'V' was not declared in this scope
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^
p1059.cpp:3974:46: error: 'Pred' was not declared in this scope
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^~~~
p1059.cpp:3974:55: error: expression list treated as compound expression in initializer [-fpermissive]
3974 | constexpr explicit chunk_by_view(V base, Pred pred);
| ^
p1059.cpp:3977:5: error: expected unqualified-id before 'return'
3977 | return *pred_;
| ^~~~~~
p1059.cpp:3978:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
3978 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3978:15: error: deduced class type 'iterator' in function return type
3978 | constexpr iterator begin();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:3984:5: error: expected unqualified-id before 'if'
3984 | if constexpr (common_range<V>) {
| ^~
p1059.cpp:3986:7: error: expected unqualified-id before 'else'
3986 | } else {
| ^~~~
p1059.cpp:3989:26: error: 'V' was not declared in this scope
3989 | constexpr iterator_t<V> find-next(iterator_t<V> current);
| ^
p1059.cpp:3989:27: error: template argument 1 is invalid
3989 | constexpr iterator_t<V> find-next(iterator_t<V> current);
| ^
p1059.cpp:3989:33: error: expected initializer before '-' token
3989 | constexpr iterator_t<V> find-next(iterator_t<V> current);
| ^
p1059.cpp:3992:17: error: expected constructor, destructor, or type conversion before '(' token
3992 | ranges::next(ranges::adjacent_find(current, ranges::end(base_), not_fn(ref(*pred_))), 1, ranges::end(base_))
| ^
p1059.cpp:4004:49: error: 'chunk_by_view' is not a class template
4004 | requires view<V> && is_object_v<Pred> class chunk_by_view<V, Pred>::iterator {
| ^~~~~~~~~~~~~
p1059.cpp:4004:49: error: 'chunk_by_view' is not a class, namespace, or enumeration
p1059.cpp:4004:82: error: expected unqualified-id before '{' token
4004 | requires view<V> && is_object_v<Pred> class chunk_by_view<V, Pred>::iterator {
| ^
p1059.cpp:4028:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
4028 | constexpr iterator(chunk_by_view& parent, iterator_t<V> current, iterator_t<V> next);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4028:37: error: expected ')' before '&' token
4028 | constexpr iterator(chunk_by_view& parent, iterator_t<V> current, iterator_t<V> next);
| ~ ^
| )
p1059.cpp:4030:15: error: 'value_type' does not name a type
4030 | constexpr value_type operator*() const;
| ^~~~~~~~~~
p1059.cpp:4032:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
4032 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4032:15: error: deduced class type 'iterator' in function return type
4032 | constexpr iterator& operator++();
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4035:5: error: 'current_' does not name a type
4035 | current_ = next_;
| ^~~~~~~~
p1059.cpp:4036:5: error: 'next_' does not name a type
4036 | next_ = parent_->find-next(current_);
| ^~~~~
p1059.cpp:4037:5: error: expected unqualified-id before 'return'
4037 | return *this;
| ^~~~~~
p1059.cpp:4038:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
4038 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4038:15: error: deduced class type 'iterator' in function return type
4038 | constexpr iterator operator++(int);
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4040:17: error: invalid use of 'this' at top level
4040 | auto tmp = *this;
| ^~~~
p1059.cpp:4041:5: error: expected unqualified-id before '++' token
4041 | ++*this;
| ^~
p1059.cpp:4042:5: error: expected unqualified-id before 'return'
4042 | return tmp;
| ^~~~~~
p1059.cpp:4043:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4043:67: error: 'V' was not declared in this scope
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:67: error: 'V' was not declared in this scope
p1059.cpp:4043:47: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:4043:67: error: 'V' was not declared in this scope
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^
p1059.cpp:4043:38: error: expression must be enclosed in parentheses
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~
p1059.cpp:4043:47: error: expected initializer before 'bidirectional_range'
4043 | constexpr iterator& operator--() requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:4045:5: error: 'next_' does not name a type
4045 | next_ = current_;
| ^~~~~
p1059.cpp:4046:5: error: 'current_' does not name a type
4046 | current_ = parent_->find-prev(next_);
| ^~~~~~~~
p1059.cpp:4047:5: error: expected unqualified-id before 'return'
4047 | return *this;
| ^~~~~~
p1059.cpp:4048:15: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4048:69: error: 'V' was not declared in this scope
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:69: error: 'V' was not declared in this scope
p1059.cpp:4048:49: error: 'bidirectional_range' was not declared in this scope; did you mean 'std::ranges::bidirectional_range'?
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
| std::ranges::bidirectional_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:670:13: note: 'std::ranges::bidirectional_range' declared here
670 | concept bidirectional_range
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:4048:69: error: 'V' was not declared in this scope
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^
p1059.cpp:4048:40: error: expression must be enclosed in parentheses
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~
p1059.cpp:4048:49: error: expected initializer before 'bidirectional_range'
4048 | constexpr iterator operator--(int) requires bidirectional_range<V>;
| ^~~~~~~~~~~~~~~~~~~
p1059.cpp:4050:17: error: invalid use of 'this' at top level
4050 | auto tmp = *this;
| ^~~~
p1059.cpp:4051:5: error: expected unqualified-id before '--' token
4051 | --*this;
| ^~
p1059.cpp:4052:5: error: expected unqualified-id before 'return'
4052 | return tmp;
| ^~~~~~
p1059.cpp:4053:5: error: 'friend' used outside of class
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~
| ------
p1059.cpp:4053:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4053:55: error: expected ')' before ',' token
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ~ ^
| )
p1059.cpp:4053:27: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~~~~
p1059.cpp:4053:57: error: expected unqualified-id before 'const'
4053 | friend constexpr bool operator==(const iterator& x, const iterator& y);
| ^~~~~
p1059.cpp:4055:5: error: 'friend' used outside of class
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~
| ------
p1059.cpp:4055:38: error: template placeholder type 'const iterator<...auto...>' must be followed by a simple declarator-id
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
p1059.cpp:4055:55: error: expected ')' before ',' token
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ~ ^
| )
p1059.cpp:4055:27: error: 'constexpr bool operator==(...)' must have an argument of class or enumerated type
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^~~~~~~~
p1059.cpp:4055:75: error: expected initializer before ')' token
4055 | friend constexpr bool operator==(const iterator& x, default_sentinel_t);
| ^
検討事項(agenda)
コンパイルエラーを取るか、コンパイルエラーの理由を解説する。
参考資料(reference)
関連する自己参照以外は、こちらの先頭に移転。
C言語(C++)に対する誤解、曲解、無理解、爽快。
#include "N4910.h"
C++N4910資料の改善点
dockerにclang
docker gnu(gcc/g++) and llvm(clang/clang++)
コンパイル用shell script C版(clangとgcc)とC++版(clang++とg++)
C++N4910:2022 tag follower 300人超えました。ありがとうございます。
astyle 使ってみた
DoCAP(ドゥーキャップ)って何ですか?
小川メソッド 覚え(書きかけ)
<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>
文書履歴(document history)
ver. 0.01 初稿 20220811