Go to the documentation of this file.
9 #ifndef EAGINE_MEMORY_NULL_PTR_HPP
10 #define EAGINE_MEMORY_NULL_PTR_HPP
12 #include "../types.hpp"
15 namespace eagine::memory {
30 template <
typename T,
typename N>
32 return reinterpret_cast<T*
>(std::uintptr_t(
std_size(n) *
sizeof(T)));
37 #endif // EAGINE_MEMORY_NULL_PTR_HPP
Class for doing pointer arithmetic on null pointers.
Definition: null_ptr.hpp:21
constexpr typed_nullptr_t< T > typed_nullptr
Template constant for doing pointer arithmetic on null pointers.
Definition: null_ptr.hpp:26
static auto operator+(const fixed_size_string< N1 > &s1, const fixed_size_string< N2 > &s2) noexcept
Concatenation operator for fixed_size_string.
Definition: fixed_size_str.hpp:135
static constexpr auto std_size(T v) noexcept
Converts argument to std size type.
Definition: types.hpp:52