MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
marvin::ArrayLike Concept Reference

Constrains T to a type that defines a const_iterator as a child, has an implementation of operator[](size_t) and has a .size() member. More...

#include <marvin_Concepts.h>

Concept definition

template<class T>
concept marvin::ArrayLike = requires(T a, size_t i) {
typename T::value_type;
typename T::iterator;
requires std::contiguous_iterator<typename T::iterator>;
requires !std::same_as<std::string, T>;
{ a.size() } -> std::same_as<size_t>;
{ a[i] } -> std::same_as<typename T::value_type&>;
{ a.data() } -> std::same_as<typename T::value_type*>;
}
Constrains T to a type that defines a const_iterator as a child, has an implementation of operator[](...
Definition marvin_Concepts.h:55

Detailed Description

Constrains T to a type that defines a const_iterator as a child, has an implementation of operator[](size_t) and has a .size() member.