25template <
class T>
struct Is
28 template <
typename U>
constexpr bool in(
U a)
35 return in(a) || in(
args...);
63template <
class T,
class R,
typename I, I (T::*Count)() const, R* (T::*Access)(I) const>
class ContainerProxy
107 return (_proxy->_object->*Access)(_index);
143 return x._proxy == y._proxy && x._index == y._index;
189template <
typename Range1,
typename Range2,
typename BinaryPredicate>
195 if (std::size(
range1) == 0) {
222template <
typename Range1,
typename Range2>
228 if (std::size(
range1) == 0) {
pointer operator->() const
reference operator*() const
friend bool operator==(const iterator &x, const iterator &y)
const pointer const_pointer
iterator & operator=(const iterator &)=default
ptrdiff_t difference_type
iterator & operator=(iterator &&)=default
friend bool operator!=(const iterator &x, const iterator &y)
std::bidirectional_iterator_tag iterator_category
iterator(iterator &&)=default
const reference const_reference
iterator(const iterator &)=default
typename ContainerProxy::value_type value_type
iterator(const ContainerProxy &proxy, I index)
This template implements a proxy for containers that contain a collection of items normally accessed ...
ContainerProxy(const T &object)
const_iterator cend() const
ContainerProxy(ContainerProxy &&)=default
ContainerProxy & operator=(ContainerProxy &&)=default
const_iterator cbegin() const
ContainerProxy(const ContainerProxy &)=default
ContainerProxy & operator=(const ContainerProxy &)=default
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
T operator*(const FloatingPointVector< T, size, DataContainer > &a, const FloatingPointVector< T, size, DataContainer > &b)
Dot product, returns a.dot(b).
constexpr Is< T > is(T d)
constexpr Range2::const_iterator is_rotated(const Range1 &range1, const Range2 &range2, BinaryPredicate p)
In combination with the in function, it returns true if a passed value is in the set of possible valu...
constexpr bool in(Arg a, Args... args)