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

Check if the type T is an iterable type with elements of type U. More...

#include <concepts.h>

Concept definition

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

Detailed Description

Check if the type T is an iterable type with elements of type U.

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

Definition at line 87 of file concepts.h.