6#ifndef SIMPLE_VECTOR_CONCEPTS_HPP
7#define SIMPLE_VECTOR_CONCEPTS_HPP
26 template <
class TFrom,
class TTo = TFrom>
38 template <
class TFrom,
class TTo = TFrom>
50 template <
class TFrom,
class TTo = TFrom>
62 template <
class TFrom,
class TTo = TFrom>
74 template <
class TFrom,
class TTo = TFrom>
86 template <
class TFrom,
class TTo = TFrom>
87 concept addable =
requires(TTo lhs, TFrom rhs)
89 { lhs + rhs } -> std::convertible_to<TTo>;
98 template <
class TFrom,
class TTo = TFrom>
99 concept subable =
requires(TTo lhs, TFrom rhs)
101 { lhs - rhs } -> std::convertible_to<TTo>;
110 template <
class TFrom,
class TTo = TFrom>
111 concept mulable =
requires(TTo lhs, TFrom rhs)
113 { lhs * rhs } -> std::convertible_to<TTo>;
122 template <
class TFrom,
class TTo = TFrom>
123 concept divable =
requires(TTo lhs, TFrom rhs)
125 { lhs / rhs } -> std::convertible_to<TTo>;
134 template <
class TFrom,
class TTo = TFrom>
135 concept modable =
requires(TTo lhs, TFrom rhs)
137 { lhs % rhs } -> std::convertible_to<TTo>;
149 template <
class TBinaryOp,
class TResult,
class TArg1,
class TArg2>
151 std::is_convertible_v<std::invoke_result_t<TBinaryOp&, TArg1, TArg1>, TResult> &&
152 std::is_convertible_v<std::invoke_result_t<TBinaryOp&, TArg1, TArg2>, TResult> &&
153 std::is_convertible_v<std::invoke_result_t<TBinaryOp&, TArg2, TArg1>, TResult> &&
154 std::is_convertible_v<std::invoke_result_t<TBinaryOp&, TArg2, TArg2>, TResult>;
225 concept vectorial = is_vectorial_v<std::remove_cvref_t<T>>;
Checks if the given type can be used in mutable plus operations.
Definition: Concepts.hpp:27
Checks if the given type can be used in immutable plus operations.
Definition: Concepts.hpp:87
Checks if binary operation has all four overloads (one for each parameter constellation) and if all o...
Definition: Concepts.hpp:150
Checks if the given type can be used in mutable division operations.
Definition: Concepts.hpp:63
Checks if the given type can be used in immutable division operations.
Definition: Concepts.hpp:123
Checks if the given type can be used in mutable modulo operations.
Definition: Concepts.hpp:75
Checks if the given type can be used in immutable module operations.
Definition: Concepts.hpp:135
Checks if the given type can be used in mutable multiplication operations.
Definition: Concepts.hpp:51
Checks if the given type can be used in immutable multiplication operations.
Definition: Concepts.hpp:111
Checks if the given type can be used in mutable minus operations.
Definition: Concepts.hpp:39
Checks if the given type can be used in immutable minus operations.
Definition: Concepts.hpp:99
Checks if the given type is regular and can be used in common arithmetically operations.
Definition: Concepts.hpp:162
Concept checking for vectorial types.
Definition: Concepts.hpp:225
constexpr bool is_vectorial_v
Shortcut checking for vectorial classes.
Definition: Concepts.hpp:211
typename vector_traits< std::remove_cvref_t< T > >::value_type vector_value_t
Convenience alias type to the value_type of Vectors.
Definition: Concepts.hpp:188
constexpr auto vector_dims_v
Convenience constant to the dimensions of Vectors.
Definition: Concepts.hpp:195
Definition: Algorithm.hpp:19
Checks whether T is a vector type.
Definition: Concepts.hpp:203
Uniform interface to Vector types.
Definition: Concepts.hpp:180