lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
lucid::SizedTypedIterable Concept Reference

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

#include <concept.h>

Concept definition

template<class T, class U>
concept lucid::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 concept.h:119

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