1#ifndef HALCHECK_LIB_ITERATOR_SUBRANGE_HPP
2#define HALCHECK_LIB_ITERATOR_SUBRANGE_HPP
6#include <halcheck/lib/iterator/interface.hpp>
7#include <halcheck/lib/iterator/range.hpp>
8#include <halcheck/lib/iterator/type_traits.hpp>
9#include <halcheck/lib/type_traits.hpp>
13namespace halcheck {
namespace lib {
36 constexpr subrange(I first, I last) : _begin(
std::move(first)), _end(
std::move(last)) {}
42 constexpr I
begin()
const {
return _begin; }
48 constexpr I
end()
const {
return _end; }
63template<typename I, HALCHECK_REQUIRE(lib::is_iterator<I>())>
constexpr subrange(I first, I last)
Constructs a subrange from a pair of iterators.
Definition subrange.hpp:36
constexpr I begin() const
Gets an iterator pointing at the first element in the subrange.
Definition subrange.hpp:42
constexpr subrange()=default
Constructs an empty subrange.
constexpr I end() const
Gets an iterator pointing past the last element in the subrange.
Definition subrange.hpp:48
Describes a range formed from a pair of iterators.
Definition subrange.hpp:21
An implementation of std::ranges::view_interface.
Definition interface.hpp:238
lib::subrange< I > make_subrange(I first, I last)
Constructs a subrange from a pair of iterators.
Definition subrange.hpp:64
Determines whether a type satisfies the LegacyIterator concept.
Definition type_traits.hpp:34