delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
delpi::SizedIterable Concept Reference

Check if the type T is an iterable type with a size() method. More...

#include <concepts.h>

Concept definition

template<class T>
concept SizedIterable = requires(T t) {
{ t.begin() } -> std::convertible_to<typename T::iterator>;
{ t.end() } -> std::convertible_to<typename T::iterator>;
{ t.size() } -> std::convertible_to<std::size_t>;
}
Check if the type T is an iterable type with a size() method.
Definition concepts.h:71

Detailed Description

Check if the type T is an iterable type with a size() method.

template <SizedIterable T>
void foo(T t); // T can be any iterable type with a size() method
Template Parameters
Ttype to check

Definition at line 71 of file concepts.h.