Go to the documentation of this file.
9 #ifndef EAGINE_TYPES_HPP
10 #define EAGINE_TYPES_HPP
18 #include <type_traits>
24 using byte =
unsigned char;
44 template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
46 return limit_cast<std_align_t>(v);
51 template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
53 return limit_cast<std_size_t>(v);
58 template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
60 return limit_cast<span_size_t>(v);
79 template <
typename T,
typename S>
86 #endif // EAGINE_TYPES_HPP
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
static constexpr auto span_size(T v) noexcept
Converts argument to span size type.
Definition: types.hpp:59
Common code is placed in this namespace.
Definition: eagine.hpp:21
static constexpr auto std_align(T v) noexcept
Converts argument to std alignment type.
Definition: types.hpp:45
Primary template for conditionally valid values.
Definition: decl.hpp:49
std::size_t std_size_t
Size type used by std.
Definition: types.hpp:32
static constexpr auto std_size(T v) noexcept
Converts argument to std size type.
Definition: types.hpp:52
std::size_t std_align_t
Alignment type used by std.
Definition: types.hpp:28
static constexpr auto span_align_of(type_identity< T >={}) noexcept
Returns the byte alignment of type T as span_size_t.
Definition: types.hpp:66
static constexpr auto span_size_of(type_identity< T >={}) noexcept
Returns the byte size of type T as span_size_t.
Definition: types.hpp:73
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19