4#ifndef _Stroika_Foundation_Traversal_DiscreteRange_h_
5#define _Stroika_Foundation_Traversal_DiscreteRange_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
41namespace Stroika::Foundation::Traversal {
74 template <
typename T,
typename TRAITS = RangeTraits::Default<T>>
77 static_assert (TRAITS::kLowerBoundOpenness == Openness::eClosed);
78 static_assert (TRAITS::kUpperBoundOpenness == Openness::eClosed);
91 using SignedDifferenceType =
typename inherited::SignedDifferenceType;
96 using UnsignedDifferenceType =
typename inherited::UnsignedDifferenceType;
99 struct MyIteratorRep_;
189 template <
typename T,
typename TRAITS>
199#include "DiscreteRange.inl"
A DiscreteRange is a Range where the underlying endpoints are integral (discrete, not continuous); th...
constexpr Range< T, TRAITS > Intersection(const Range< T, TRAITS > &rhs) const
nonvirtual Iterator< T > begin() const
nonvirtual Iterable< T > Elements() const
constexpr Range< T, TRAITS > UnionBounds(const Range< T, TRAITS > &rhs) const
constexpr UnsignedDifferenceType GetNumberOfContainedPoints() const
static constexpr DiscreteRange FullRange()
constexpr DiscreteRange()=default
constexpr DiscreteRange Offset(SignedDifferenceType o) const
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
An Iterator<T> is a copyable object which allows traversing the contents of some container....
T value_type
Range::value_type is the type of the contained elements of the range (say range of integers,...