E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches
eve::translation_of< T > Struct Template Reference

Notifies EVE that a type is translatable and its translation target. More...

#include <eve/traits/translation.hpp>

Detailed Description

template<typename T>
struct eve::translation_of< T >

By default, most EVE functions only work on fundamental types. Translation allows the user to specify that a custom type should be treated as one of the fundamental types when used in EVE.

Template Parameters
TThe type to be translated

Example:

// Custom type that should be treated as an int
struct MyInt { int value; };
// Specialize translation_of to map MyInt to int in EVE
template<>
struct eve::translation_of<MyInt> { using type = int; };
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition value.hpp:34
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition translation.hpp:107
Notifies EVE that a type is translatable and its translation target.
Definition translation.hpp:42
Note
A translatable type's translation target can be a translatable type itself. In this case, EVE will recursively resolve the translation until it reaches a fundamental type.