Created
December 8, 2016 16:47
-
-
Save CaseyCarter/fd903fed88e72a82a4f7935cfedf6694 to your computer and use it in GitHub Desktop.
output from git grep -nC 12 RANGES_ASSERT (with include/range/v3/detail/config.hpp elided)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include/range/v3/iterator_range.hpp-98- public: | |
| include/range/v3/iterator_range.hpp-99- using iterator = I; | |
| include/range/v3/iterator_range.hpp-100- using sentinel = S; | |
| include/range/v3/iterator_range.hpp-101- #ifndef RANGES_DOXYGEN_INVOKED | |
| include/range/v3/iterator_range.hpp-102- using const_iterator = I; // Mostly to avoid spurious errors in Boost.Range | |
| include/range/v3/iterator_range.hpp-103- #endif | |
| include/range/v3/iterator_range.hpp-104- | |
| include/range/v3/iterator_range.hpp-105- sized_iterator_range() = default; | |
| include/range/v3/iterator_range.hpp-106- RANGES_NDEBUG_CONSTEXPR sized_iterator_range(I begin, S end, iterator_size_t<I> size) | |
| include/range/v3/iterator_range.hpp-107- : rng_{detail::move(begin), detail::move(end)}, size_(size) | |
| include/range/v3/iterator_range.hpp-108- { | |
| include/range/v3/iterator_range.hpp-109- #ifndef NDEBUG | |
| include/range/v3/iterator_range.hpp:110: RANGES_ASSERT(!ForwardIterator<I>() || | |
| include/range/v3/iterator_range.hpp-111- static_cast<iterator_size_t<I>>(ranges::distance(rng_)) == size_); | |
| include/range/v3/iterator_range.hpp-112- #endif | |
| include/range/v3/iterator_range.hpp-113- } | |
| include/range/v3/iterator_range.hpp-114- template<typename X, typename Y, | |
| include/range/v3/iterator_range.hpp-115- CONCEPT_REQUIRES_(Constructible<I, X &&>() && Constructible<S, Y &&>())> | |
| include/range/v3/iterator_range.hpp-116- RANGES_NDEBUG_CONSTEXPR sized_iterator_range(std::pair<X, Y> rng, iterator_size_t<I> size) | |
| include/range/v3/iterator_range.hpp-117- : sized_iterator_range{detail::move(rng).first, detail::move(rng).second, size} | |
| include/range/v3/iterator_range.hpp-118- {} | |
| include/range/v3/iterator_range.hpp-119- template<typename X, typename Y, | |
| include/range/v3/iterator_range.hpp-120- CONCEPT_REQUIRES_(Constructible<I, X &&>() && Constructible<S, Y &&>())> | |
| include/range/v3/iterator_range.hpp-121- RANGES_NDEBUG_CONSTEXPR sized_iterator_range(iterator_range<X, Y> rng, iterator_size_t<I> size) | |
| include/range/v3/iterator_range.hpp-122- : sized_iterator_range{detail::move(rng).first(), detail::move(rng).second, size} | |
| -- | |
| include/range/v3/utility/counted_iterator.hpp-98- cur.n_ -= n; | |
| include/range/v3/utility/counted_iterator.hpp-99- ranges::advance(cur.it_, n); | |
| include/range/v3/utility/counted_iterator.hpp-100- } | |
| include/range/v3/utility/counted_iterator.hpp-101- // Overload uncounted and recounted for packing and unpacking | |
| include/range/v3/utility/counted_iterator.hpp-102- // counted iterators | |
| include/range/v3/utility/counted_iterator.hpp-103- friend I uncounted(counted_iterator<I, D> i) | |
| include/range/v3/utility/counted_iterator.hpp-104- { | |
| include/range/v3/utility/counted_iterator.hpp-105- return i.base(); | |
| include/range/v3/utility/counted_iterator.hpp-106- } | |
| include/range/v3/utility/counted_iterator.hpp-107- friend counted_iterator<I, D> | |
| include/range/v3/utility/counted_iterator.hpp-108- recounted(counted_iterator<I, D> const &j, I i, iterator_difference_t<I> n) | |
| include/range/v3/utility/counted_iterator.hpp-109- { | |
| include/range/v3/utility/counted_iterator.hpp:110: RANGES_ASSERT(!ForwardIterator<I>() || ranges::next(j.base(), n) == i); | |
| include/range/v3/utility/counted_iterator.hpp-111- return {i, j.count() - n}; | |
| include/range/v3/utility/counted_iterator.hpp-112- } | |
| include/range/v3/utility/counted_iterator.hpp-113- template<typename II = I, | |
| include/range/v3/utility/counted_iterator.hpp-114- CONCEPT_REQUIRES_(Readable<II>())> | |
| include/range/v3/utility/counted_iterator.hpp-115- iterator_rvalue_reference_t<II> move() const | |
| include/range/v3/utility/counted_iterator.hpp-116- noexcept(noexcept(iter_move(std::declval<II const &>()))) | |
| include/range/v3/utility/counted_iterator.hpp-117- { | |
| include/range/v3/utility/counted_iterator.hpp-118- return iter_move(it_); | |
| include/range/v3/utility/counted_iterator.hpp-119- } | |
| include/range/v3/utility/counted_iterator.hpp-120- CONCEPT_REQUIRES(Readable<I>()) | |
| include/range/v3/utility/counted_iterator.hpp-121- iterator_reference_t<I> get() const | |
| include/range/v3/utility/counted_iterator.hpp-122- { | |
| -- | |
| include/range/v3/utility/polymorphic_cast.hpp-4-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| include/range/v3/utility/polymorphic_cast.hpp-5- | |
| include/range/v3/utility/polymorphic_cast.hpp-6-#ifndef RANGES_V3_UTILITY_POLYMORPHIC_CAST_HPP | |
| include/range/v3/utility/polymorphic_cast.hpp-7-#define RANGES_V3_UTILITY_POLYMORPHIC_CAST_HPP | |
| include/range/v3/utility/polymorphic_cast.hpp-8- | |
| include/range/v3/utility/polymorphic_cast.hpp-9-namespace ranges | |
| include/range/v3/utility/polymorphic_cast.hpp-10-{ | |
| include/range/v3/utility/polymorphic_cast.hpp-11- inline namespace v3 | |
| include/range/v3/utility/polymorphic_cast.hpp-12- { | |
| include/range/v3/utility/polymorphic_cast.hpp-13- template<typename Target, typename Source> | |
| include/range/v3/utility/polymorphic_cast.hpp-14- inline Target polymorphic_downcast(Source* x) | |
| include/range/v3/utility/polymorphic_cast.hpp-15- { | |
| include/range/v3/utility/polymorphic_cast.hpp:16: RANGES_ASSERT(dynamic_cast<Target>(x) == x); | |
| include/range/v3/utility/polymorphic_cast.hpp-17- return static_cast<Target>(x); | |
| include/range/v3/utility/polymorphic_cast.hpp-18- } | |
| include/range/v3/utility/polymorphic_cast.hpp-19- } | |
| include/range/v3/utility/polymorphic_cast.hpp-20-} | |
| include/range/v3/utility/polymorphic_cast.hpp-21- | |
| include/range/v3/utility/polymorphic_cast.hpp-22-#endif // RANGES_V3_UTILITY_POLYMORPHIC_CAST_HPP | |
| -- | |
| include/range/v3/utility/random.hpp-207- | |
| include/range/v3/utility/random.hpp-208- // Hash of the ID of a type. May or may not vary, depending on | |
| include/range/v3/utility/random.hpp-209- // implementation. | |
| include/range/v3/utility/random.hpp-210- *it++ = s2; | |
| include/range/v3/utility/random.hpp-211- | |
| include/range/v3/utility/random.hpp-212- // Platform-specific entropy | |
| include/range/v3/utility/random.hpp-213- *it++ = randutils::crushto32(RANGES_CPU_ENTROPY); | |
| include/range/v3/utility/random.hpp-214- | |
| include/range/v3/utility/random.hpp-215- // Hopefully high-quality entropy from random_device. | |
| include/range/v3/utility/random.hpp-216- std::random_device rd{}; | |
| include/range/v3/utility/random.hpp-217- ranges::generate(it, seeds.end(), ranges::ref(rd)); | |
| include/range/v3/utility/random.hpp-218- | |
| include/range/v3/utility/random.hpp:219: RANGES_ASSERT(it <= seeds.end()); | |
| include/range/v3/utility/random.hpp-220- | |
| include/range/v3/utility/random.hpp-221- return seeds; | |
| include/range/v3/utility/random.hpp-222- } | |
| include/range/v3/utility/random.hpp-223- | |
| include/range/v3/utility/random.hpp-224- template<typename I, CONCEPT_REQUIRES_(UnsignedIntegral<I>())> | |
| include/range/v3/utility/random.hpp-225- constexpr I fast_exp(I x, I power, I result = I{1}) | |
| include/range/v3/utility/random.hpp-226- { | |
| include/range/v3/utility/random.hpp-227- return power == I{0} ? result | |
| include/range/v3/utility/random.hpp-228- : randutils::fast_exp(x * x, power >> 1, result * (power & I{1} ? x : 1)); | |
| include/range/v3/utility/random.hpp-229- } | |
| include/range/v3/utility/random.hpp-230- | |
| include/range/v3/utility/random.hpp-231- ////////////////////////////////////////////////////////////////////////////// | |
| -- | |
| include/range/v3/view/adjacent_remove_if.hpp-68- range_iterator_t<Rng> begin(adjacent_remove_if_view &) const | |
| include/range/v3/view/adjacent_remove_if.hpp-69- { | |
| include/range/v3/view/adjacent_remove_if.hpp-70- auto &beg = rng_->begin_; | |
| include/range/v3/view/adjacent_remove_if.hpp-71- if(!beg) | |
| include/range/v3/view/adjacent_remove_if.hpp-72- { | |
| include/range/v3/view/adjacent_remove_if.hpp-73- beg = ranges::begin(rng_->mutable_base()); | |
| include/range/v3/view/adjacent_remove_if.hpp-74- this->satisfy(*beg); | |
| include/range/v3/view/adjacent_remove_if.hpp-75- } | |
| include/range/v3/view/adjacent_remove_if.hpp-76- return *beg; | |
| include/range/v3/view/adjacent_remove_if.hpp-77- } | |
| include/range/v3/view/adjacent_remove_if.hpp-78- void next(range_iterator_t<Rng> &it) const | |
| include/range/v3/view/adjacent_remove_if.hpp-79- { | |
| include/range/v3/view/adjacent_remove_if.hpp:80: RANGES_ASSERT(it != ranges::end(rng_->mutable_base())); | |
| include/range/v3/view/adjacent_remove_if.hpp-81- this->satisfy(++it); | |
| include/range/v3/view/adjacent_remove_if.hpp-82- } | |
| include/range/v3/view/adjacent_remove_if.hpp-83- void prev() = delete; | |
| include/range/v3/view/adjacent_remove_if.hpp-84- void distance_to() = delete; | |
| include/range/v3/view/adjacent_remove_if.hpp-85- }; | |
| include/range/v3/view/adjacent_remove_if.hpp-86- adaptor begin_adaptor() | |
| include/range/v3/view/adjacent_remove_if.hpp-87- { | |
| include/range/v3/view/adjacent_remove_if.hpp-88- return {*this}; | |
| include/range/v3/view/adjacent_remove_if.hpp-89- } | |
| include/range/v3/view/adjacent_remove_if.hpp-90- adaptor end_adaptor() | |
| include/range/v3/view/adjacent_remove_if.hpp-91- { | |
| include/range/v3/view/adjacent_remove_if.hpp-92- return {*this}; | |
| -- | |
| include/range/v3/view/all.hpp-43- | |
| include/range/v3/view/all.hpp-44- template<typename T> | |
| include/range/v3/view/all.hpp-45- static sized_iterator_range<range_iterator_t<T>, range_sentinel_t<T>> | |
| include/range/v3/view/all.hpp-46- from_container(T & t, concepts::SizedRange*, concepts::Sentinel*) | |
| include/range/v3/view/all.hpp-47- { | |
| include/range/v3/view/all.hpp-48- return {begin(t), end(t), size(t)}; | |
| include/range/v3/view/all.hpp-49- } | |
| include/range/v3/view/all.hpp-50- | |
| include/range/v3/view/all.hpp-51- template<typename T> | |
| include/range/v3/view/all.hpp-52- static iterator_range<range_iterator_t<T>, range_sentinel_t<T>> | |
| include/range/v3/view/all.hpp-53- from_container(T & t, concepts::SizedRange*, concepts::SizedSentinel*) | |
| include/range/v3/view/all.hpp-54- { | |
| include/range/v3/view/all.hpp:55: RANGES_ASSERT(size(t) == size(begin(t), end(t))); | |
| include/range/v3/view/all.hpp-56- return {begin(t), end(t)}; | |
| include/range/v3/view/all.hpp-57- } | |
| include/range/v3/view/all.hpp-58- | |
| include/range/v3/view/all.hpp-59- /// If it's a view already, pass it though. | |
| include/range/v3/view/all.hpp-60- template<typename T> | |
| include/range/v3/view/all.hpp-61- static T from_range(T && t, concepts::View*) | |
| include/range/v3/view/all.hpp-62- { | |
| include/range/v3/view/all.hpp-63- return std::forward<T>(t); | |
| include/range/v3/view/all.hpp-64- } | |
| include/range/v3/view/all.hpp-65- | |
| include/range/v3/view/all.hpp-66- /// If it is container-like, turn it into a view, being careful | |
| include/range/v3/view/all.hpp-67- /// to preserve the Sized-ness of the range. | |
| -- | |
| include/range/v3/view/concat.hpp-131- void operator()(indexed_element<I, N> it) const | |
| include/range/v3/view/concat.hpp-132- { | |
| include/range/v3/view/concat.hpp-133- ++it.get(); | |
| include/range/v3/view/concat.hpp-134- pos->satisfy(meta::size_t<N>{}); | |
| include/range/v3/view/concat.hpp-135- } | |
| include/range/v3/view/concat.hpp-136- }; | |
| include/range/v3/view/concat.hpp-137- struct prev_fun | |
| include/range/v3/view/concat.hpp-138- { | |
| include/range/v3/view/concat.hpp-139- cursor *pos; | |
| include/range/v3/view/concat.hpp-140- template<typename I> | |
| include/range/v3/view/concat.hpp-141- void operator()(indexed_element<I, 0> it) const | |
| include/range/v3/view/concat.hpp-142- { | |
| include/range/v3/view/concat.hpp:143: RANGES_ASSERT(it.get() != begin(std::get<0>(pos->rng_->rngs_))); | |
| include/range/v3/view/concat.hpp-144- --it.get(); | |
| include/range/v3/view/concat.hpp-145- } | |
| include/range/v3/view/concat.hpp-146- template<typename I, std::size_t N> | |
| include/range/v3/view/concat.hpp-147- void operator()(indexed_element<I, N> it) const | |
| include/range/v3/view/concat.hpp-148- { | |
| include/range/v3/view/concat.hpp-149- if(it.get() == begin(std::get<N>(pos->rng_->rngs_))) | |
| include/range/v3/view/concat.hpp-150- { | |
| include/range/v3/view/concat.hpp-151- auto &&rng = std::get<N - 1>(pos->rng_->rngs_); | |
| include/range/v3/view/concat.hpp-152- ranges::emplace<N - 1>(pos->its_, | |
| include/range/v3/view/concat.hpp-153- ranges::next(ranges::begin(rng), ranges::end(rng))); | |
| include/range/v3/view/concat.hpp-154- pos->its_.visit_i(*this); | |
| include/range/v3/view/concat.hpp-155- } | |
| -- | |
| include/range/v3/view/join.hpp-123- { | |
| include/range/v3/view/join.hpp-124- rng.inner_ = view::all(*outer_it_); | |
| include/range/v3/view/join.hpp-125- inner_it_ = ranges::begin(rng.inner_); | |
| include/range/v3/view/join.hpp-126- satisfy(); | |
| include/range/v3/view/join.hpp-127- } | |
| include/range/v3/view/join.hpp-128- } | |
| include/range/v3/view/join.hpp-129- bool equal(default_sentinel) const | |
| include/range/v3/view/join.hpp-130- { | |
| include/range/v3/view/join.hpp-131- return outer_it_ == ranges::end(rng_->outer_); | |
| include/range/v3/view/join.hpp-132- } | |
| include/range/v3/view/join.hpp-133- void next() | |
| include/range/v3/view/join.hpp-134- { | |
| include/range/v3/view/join.hpp:135: RANGES_ASSERT(inner_it_ != ranges::end(rng_->inner_)); | |
| include/range/v3/view/join.hpp-136- ++inner_it_; | |
| include/range/v3/view/join.hpp-137- satisfy(); | |
| include/range/v3/view/join.hpp-138- } | |
| include/range/v3/view/join.hpp-139- auto get() const | |
| include/range/v3/view/join.hpp-140- RANGES_DECLTYPE_AUTO_RETURN_NOEXCEPT | |
| include/range/v3/view/join.hpp-141- ( | |
| include/range/v3/view/join.hpp-142- *inner_it_ | |
| include/range/v3/view/join.hpp-143- ) | |
| include/range/v3/view/join.hpp-144- auto move() const | |
| include/range/v3/view/join.hpp-145- RANGES_DECLTYPE_AUTO_RETURN_NOEXCEPT | |
| include/range/v3/view/join.hpp-146- ( | |
| include/range/v3/view/join.hpp-147- iter_move(inner_it_) | |
| -- | |
| include/range/v3/view/join.hpp-245- } | |
| include/range/v3/view/join.hpp-246- } | |
| include/range/v3/view/join.hpp-247- bool equal(default_sentinel) const | |
| include/range/v3/view/join.hpp-248- { | |
| include/range/v3/view/join.hpp-249- return outer_it_ == ranges::end(rng_->outer_); | |
| include/range/v3/view/join.hpp-250- } | |
| include/range/v3/view/join.hpp-251- void next() | |
| include/range/v3/view/join.hpp-252- { | |
| include/range/v3/view/join.hpp-253- // visit(cur_, [](auto& it){ ++it; }); | |
| include/range/v3/view/join.hpp-254- if (cur_.index() == 0) | |
| include/range/v3/view/join.hpp-255- { | |
| include/range/v3/view/join.hpp-256- auto& it = ranges::get<0>(cur_); | |
| include/range/v3/view/join.hpp:257: RANGES_ASSERT(it != ranges::end(rng_->val_)); | |
| include/range/v3/view/join.hpp-258- ++it; | |
| include/range/v3/view/join.hpp-259- } | |
| include/range/v3/view/join.hpp-260- else | |
| include/range/v3/view/join.hpp-261- { | |
| include/range/v3/view/join.hpp-262- auto& it = ranges::get<1>(cur_); | |
| include/range/v3/view/join.hpp:263: RANGES_ASSERT(it != ranges::end(rng_->inner_)); | |
| include/range/v3/view/join.hpp-264- ++it; | |
| include/range/v3/view/join.hpp-265- } | |
| include/range/v3/view/join.hpp-266- satisfy(); | |
| include/range/v3/view/join.hpp-267- } | |
| include/range/v3/view/join.hpp-268- reference get() const | |
| include/range/v3/view/join.hpp-269- { | |
| include/range/v3/view/join.hpp-270- // return visit(cur_, [](auto& it) -> reference { return *it; }); | |
| include/range/v3/view/join.hpp-271- if (cur_.index() == 0) | |
| include/range/v3/view/join.hpp-272- { | |
| include/range/v3/view/join.hpp-273- return *ranges::get<0>(cur_); | |
| include/range/v3/view/join.hpp-274- } | |
| include/range/v3/view/join.hpp-275- else | |
| -- | |
| include/range/v3/view/sample.hpp-112- void advance() | |
| include/range/v3/view/sample.hpp-113- { | |
| include/range/v3/view/sample.hpp-114- RANGES_EXPECT(range()); | |
| include/range/v3/view/sample.hpp-115- if (range()->size() > 0) | |
| include/range/v3/view/sample.hpp-116- { | |
| include/range/v3/view/sample.hpp-117- using Dist = std::uniform_int_distribution<D>; | |
| include/range/v3/view/sample.hpp-118- using Param_t = typename Dist::param_type; | |
| include/range/v3/view/sample.hpp-119- Dist dist{}; | |
| include/range/v3/view/sample.hpp-120- URNG& engine = range()->engine().get(); | |
| include/range/v3/view/sample.hpp-121- | |
| include/range/v3/view/sample.hpp-122- for (; ; ++current(), size().decrement()) | |
| include/range/v3/view/sample.hpp-123- { | |
| include/range/v3/view/sample.hpp:124: RANGES_ASSERT(current() != ranges::end(range()->range())); | |
| include/range/v3/view/sample.hpp-125- auto n = pop_size(); | |
| include/range/v3/view/sample.hpp-126- RANGES_EXPECT(n > 0); | |
| include/range/v3/view/sample.hpp-127- const Param_t interval{ 0, n - 1 }; | |
| include/range/v3/view/sample.hpp-128- if (dist(engine, interval) < range()->size()) | |
| include/range/v3/view/sample.hpp-129- break; | |
| include/range/v3/view/sample.hpp-130- } | |
| include/range/v3/view/sample.hpp-131- } | |
| include/range/v3/view/sample.hpp-132- } | |
| include/range/v3/view/sample.hpp-133- public: | |
| include/range/v3/view/sample.hpp-134- using value_type = range_value_t<Rng>; | |
| include/range/v3/view/sample.hpp-135- using difference_type = D; | |
| include/range/v3/view/sample.hpp-136- | |
| -- | |
| include/range/v3/view/sample.hpp-148- return *current(); | |
| include/range/v3/view/sample.hpp-149- } | |
| include/range/v3/view/sample.hpp-150- bool equal(default_sentinel) const | |
| include/range/v3/view/sample.hpp-151- { | |
| include/range/v3/view/sample.hpp-152- RANGES_EXPECT(range()); | |
| include/range/v3/view/sample.hpp-153- return range()->size() <= 0; | |
| include/range/v3/view/sample.hpp-154- } | |
| include/range/v3/view/sample.hpp-155- void next() | |
| include/range/v3/view/sample.hpp-156- { | |
| include/range/v3/view/sample.hpp-157- RANGES_EXPECT(range()); | |
| include/range/v3/view/sample.hpp-158- RANGES_EXPECT(range()->size() > 0); | |
| include/range/v3/view/sample.hpp-159- --range()->size(); | |
| include/range/v3/view/sample.hpp:160: RANGES_ASSERT(current() != ranges::end(range()->range())); | |
| include/range/v3/view/sample.hpp-161- ++current(); | |
| include/range/v3/view/sample.hpp-162- size().decrement(); | |
| include/range/v3/view/sample.hpp-163- advance(); | |
| include/range/v3/view/sample.hpp-164- } | |
| include/range/v3/view/sample.hpp-165- }; | |
| include/range/v3/view/sample.hpp-166- | |
| include/range/v3/view/sample.hpp-167- cursor begin_cursor() const | |
| include/range/v3/view/sample.hpp-168- { | |
| include/range/v3/view/sample.hpp-169- return cursor{*this}; | |
| include/range/v3/view/sample.hpp-170- } | |
| include/range/v3/view/sample.hpp-171- | |
| include/range/v3/view/sample.hpp-172- public: | |
| -- | |
| include/range/v3/view/slice.hpp-262- // TODO Support Forward, non-Sized ranges by returning a range that | |
| include/range/v3/view/slice.hpp-263- // doesn't know it's size? | |
| include/range/v3/view/slice.hpp-264- template<typename Rng, | |
| include/range/v3/view/slice.hpp-265- CONCEPT_REQUIRES_(InputRange<Rng>() && SizedRange<Rng>())> | |
| include/range/v3/view/slice.hpp-266- auto operator()(Rng && rng, range_difference_t<Rng> from, | |
| include/range/v3/view/slice.hpp-267- detail::from_end_<range_difference_t<Rng>> to) const -> | |
| include/range/v3/view/slice.hpp-268- decltype(slice_fn::invoke_(std::forward<Rng>(rng), from, | |
| include/range/v3/view/slice.hpp-269- distance(rng) + to.dist_ - from, range_concept<Rng>{})) | |
| include/range/v3/view/slice.hpp-270- { | |
| include/range/v3/view/slice.hpp-271- static_assert(!is_infinite<Rng>(), | |
| include/range/v3/view/slice.hpp-272- "Can't index from the end of an infinite range!"); | |
| include/range/v3/view/slice.hpp-273- RANGES_EXPECT(0 <= from); | |
| include/range/v3/view/slice.hpp:274: RANGES_ASSERT(from <= distance(rng) + to.dist_); | |
| include/range/v3/view/slice.hpp-275- return slice_fn::invoke_(std::forward<Rng>(rng), from, | |
| include/range/v3/view/slice.hpp-276- distance(rng) + to.dist_ - from, range_concept<Rng>{}); | |
| include/range/v3/view/slice.hpp-277- } | |
| include/range/v3/view/slice.hpp-278- // slice(rng, end-4, end-2) | |
| include/range/v3/view/slice.hpp-279- template<typename Rng, | |
| include/range/v3/view/slice.hpp-280- CONCEPT_REQUIRES_((InputRange<Rng>() && SizedRange<Rng>()) || | |
| include/range/v3/view/slice.hpp-281- ForwardRange<Rng>())> | |
| include/range/v3/view/slice.hpp-282- auto operator()(Rng && rng, detail::from_end_<range_difference_t<Rng>> from, | |
| include/range/v3/view/slice.hpp-283- detail::from_end_<range_difference_t<Rng>> to) const -> | |
| include/range/v3/view/slice.hpp-284- decltype(slice_fn::invoke_(std::forward<Rng>(rng), from.dist_, | |
| include/range/v3/view/slice.hpp-285- to.dist_ - from.dist_, range_concept<Rng>{}, | |
| include/range/v3/view/slice.hpp-286- bounded_range_concept<Rng>{}())) | |
| -- | |
| include/range/v3/view/stride.hpp-99- {} | |
| include/range/v3/view/stride.hpp-100- adaptor(stride_view const &rng, end_tag) | |
| include/range/v3/view/stride.hpp-101- : offset_t(-1), rng_(&rng) | |
| include/range/v3/view/stride.hpp-102- { | |
| include/range/v3/view/stride.hpp-103- // Opportunistic eager cleaning when we can do so in O(1) | |
| include/range/v3/view/stride.hpp-104- if(BidirectionalRange<Rng>() && SizedRange<Rng>()) | |
| include/range/v3/view/stride.hpp-105- offset() = calc_offset(); | |
| include/range/v3/view/stride.hpp-106- } | |
| include/range/v3/view/stride.hpp-107- void next(iterator &it) | |
| include/range/v3/view/stride.hpp-108- { | |
| include/range/v3/view/stride.hpp-109- difference_type_ off = offset(); | |
| include/range/v3/view/stride.hpp-110- RANGES_EXPECT(0 == off); | |
| include/range/v3/view/stride.hpp:111: RANGES_ASSERT(it != ranges::end(rng_->mutable_base())); | |
| include/range/v3/view/stride.hpp-112- offset() = ranges::advance(it, rng_->stride_ + off, | |
| include/range/v3/view/stride.hpp-113- ranges::end(rng_->mutable_base())); | |
| include/range/v3/view/stride.hpp-114- } | |
| include/range/v3/view/stride.hpp-115- CONCEPT_REQUIRES(BidirectionalRange<Rng>()) | |
| include/range/v3/view/stride.hpp-116- void prev(iterator &it) | |
| include/range/v3/view/stride.hpp-117- { | |
| include/range/v3/view/stride.hpp-118- difference_type_ off = clean(); | |
| include/range/v3/view/stride.hpp-119- offset() = off = ranges::advance(it, -rng_->stride_ + off, | |
| include/range/v3/view/stride.hpp-120- ranges::begin(rng_->mutable_base())); | |
| include/range/v3/view/stride.hpp-121- RANGES_EXPECT(0 == off); | |
| include/range/v3/view/stride.hpp-122- } | |
| include/range/v3/view/stride.hpp-123- CONCEPT_REQUIRES(SizedSentinel<iterator, iterator>()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment