Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion source/ranges.tex
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
// \ref{view.interface}, class template \tcode{view_interface}
template<class D>
requires is_class_v<D> && @\libconcept{same_as}@<D, remove_cv_t<D>>
class view_interface;
class view_interface; // partially freestanding

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the paper shows "freestanding" as already present, but it isn't.

Ah the // freestanding comment was removed by LWG4189. So this edit is the correct way to resolve the merge conflict.


// \ref{range.subrange}, sub-ranges
enum class @\libglobal{subrange_kind}@ : bool { @\libmember{unsized}{subrange_kind}@, @\libmember{sized}{subrange_kind}@ };
Expand Down Expand Up @@ -1868,6 +1868,11 @@
constexpr decltype(auto) operator[](range_difference_t<R> n) const {
return ranges::begin(@\exposid{derived}@())[n];
}

template<@\libconcept{random_access_range}@ R = D> requires @\libconcept{sized_range}@<R> // freestanding-deleted
constexpr decltype(auto) at(range_difference_t<R> n);
template<@\libconcept{random_access_range}@ R = const D> requires @\libconcept{sized_range}@<R> // freestanding-deleted
constexpr decltype(auto) at(range_difference_t<R> n) const;
};
}
\end{codeblock}
Expand Down Expand Up @@ -1914,6 +1919,25 @@
Equivalent to: \tcode{return *ranges::prev(ranges::end(\exposid{derived}()));}
\end{itemdescr}

\indexlibrarymember{at}{view_interface}%
\begin{itemdecl}
template<@\libconcept{random_access_range}@ R = D> requires @\libconcept{sized_range}@<R>
constexpr decltype(auto) at(range_difference_t<R> n);
template<@\libconcept{random_access_range}@ R = const D> requires @\libconcept{sized_range}@<R>
constexpr decltype(auto) at(range_difference_t<R> n) const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{(*this)[n]}.

\pnum
\throws
\tcode{out_of_range} if \tcode{n < 0} is \tcode{true} or
\tcode{n >= ranges::distance(\exposid{derived}())} is \tcode{true}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct additions of "is true" which was missing from the incoming paper.

\end{itemdescr}

\rSec2[range.subrange]{Sub-ranges}

\rSec3[range.subrange.general]{General}
Expand Down
1 change: 1 addition & 0 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@
#define @\defnlibxname{cpp_lib_unwrap_ref}@ 201811L // freestanding, also in \libheader{type_traits}
#define @\defnlibxname{cpp_lib_valarray}@ 202511L // also in \libheader{valarray}
#define @\defnlibxname{cpp_lib_variant}@ 202306L // also in \libheader{variant}
#define @\defnlibxname{cpp_lib_view_interface}@ 202606L // also in \libheader{ranges}
#define @\defnlibxname{cpp_lib_void_t}@ 201411L // freestanding, also in \libheader{type_traits}
\end{codeblock}

Expand Down
Loading