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

Check if the type T supports the arithmetic operations +, -, *, /. More...

#include <concept.h>

Concept definition

template<class T>
concept lucid::Arithmetic = requires(T a, T b) {
{ a + b } -> std::convertible_to<T>;
{ a - b } -> std::convertible_to<T>;
{ a* b } -> std::convertible_to<T>;
{ a / b } -> std::convertible_to<T>;
}
Check if the type T supports the arithmetic operations +, -, *, /.
Definition concept.h:158

Detailed Description

Check if the type T supports the arithmetic operations +, -, *, /.

template <Arithmetic T>
void foo(T a, T b); // a and b can be added, subtracted, multiplied and divided with the corresponding operator
Template Parameters
Ttype to check