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

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

#include <concepts.h>

Concept definition

template<typename T, typename U>
concept SizedTypedIterable = requires(T t, U u) {
{ t.begin() } -> std::convertible_to<typename T::iterator>;
{ t.end() } -> std::convertible_to<typename T::iterator>;
{ t.size() } -> std::convertible_to<std::size_t>;
} && std::convertible_to<typename T::value_type, U>
Check if the type T is an iterable type with elements of type U and a size() method.
Definition concepts.h:102

Detailed Description

Check if the type T is an iterable type with elements of type U and a size() method.

template <TypedSizedIterable<int> T>
void foo(T t); // T can be any iterable type with elements of type int and a size() method
Template Parameters
Ttype to check
Utype of the elements

Definition at line 102 of file concepts.h.