The namespace for basic function, not specific to TuringSim.
More...
|
| | Debug |
| | The namespace for debug printers.
|
| |
|
| template<typename T > |
| int | compare (const T &lhs, const T &rhs) |
| | To compare things. More...
|
| |
| template<typename CharT , typename Traits > |
| std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, const MessageException &e) |
| | Print a MessageException. More...
|
| |
| template<typename... Src, typename... Destination, typename Func > |
| constexpr void | tuple_transform (std::tuple< Destination... > &destination, Func f, std::tuple< Src... > const &source) |
| | Apply f to each element of source and store the result into destination. More...
|
| |
|
template<class... Ts> |
| | Visitor (Ts...) -> Visitor< Ts... > |
| | The deduction guide for Visitor, useless since C++20.
|
| |
The namespace for basic function, not specific to TuringSim.
◆ compare()
template<typename T >
| int TuringSim::Utils::compare |
( |
const T & |
lhs, |
|
|
const T & |
rhs |
|
) |
| |
To compare things.
- Template Parameters
-
| T | the type of elements to compare. |
- Parameters
-
| [in] | lhs | the lhs element. |
| [in] | rhs | the rhs element. |
- Returns
- A negative value if lhs < rhs, 0 if lhs = rhs and a positive result if lhs > rhs.
Definition at line 47 of file compare.h.
◆ operator<<()
template<typename CharT , typename Traits >
| std::basic_ostream<CharT, Traits>& TuringSim::Utils::operator<< |
( |
std::basic_ostream< CharT, Traits > & |
os, |
|
|
const MessageException & |
e |
|
) |
| |
Print a MessageException.
- Template Parameters
-
| CharT | char type. |
| Traits | std::basic_ostream trait. |
- Parameters
-
| [in,out] | os | the stream. |
| [in] | e | the exception to print. |
- Returns
- the updated stream.
Definition at line 1 of file messageException.h.
◆ tuple_transform()
template<typename... Src, typename... Destination, typename Func >
| constexpr void TuringSim::Utils::tuple_transform |
( |
std::tuple< Destination... > & |
destination, |
|
|
Func |
f, |
|
|
std::tuple< Src... > const & |
source |
|
) |
| |
|
constexpr |
Apply f to each element of source and store the result into destination.
- Template Parameters
-
| Src | the template parameter pack in the source tuple. |
| Destination | the template parameter pack in the destination tuple. |
| Func | the type of the function to apply. It may be a generic function. |
- Parameters
-
| [out] | destination | the tuple receiving the result. |
| [in] | f | the function to apply. |
| [in] | source | the source tuple. |
Definition at line 28 of file tuple_transform.h.