Go to the documentation of this file.
9 #ifndef EAGINE_MEMORY_ALIGNED_BLOCK_HPP
10 #define EAGINE_MEMORY_ALIGNED_BLOCK_HPP
13 #include <type_traits>
15 namespace eagine::memory {
21 template <std::
size_t Size>
26 return as_bytes(cover_one(_storage));
47 std::aligned_storage_t<Size> _storage{};
52 #endif // EAGINE_MEMORY_ALIGNED_BLOCK_HPP
auto get() const noexcept -> const_block
Returns a view of the internal storage as a const block.
Definition: aligned_block.hpp:30
static constexpr auto as_bytes(basic_span< T, P, S > spn) noexcept -> basic_block< std::is_const_v< T >>
Converts a span into a basic_block.
Definition: block.hpp:39
basic_block< true > const_block
Alias for const byte memory span.
Definition: block.hpp:32
basic_block< false > block
Alias for non-const byte memory span.
Definition: block.hpp:27
Non-owning view of a contiguous range of memory with ValueType elements.
Definition: flatten_fwd.hpp:16
auto get() noexcept -> block
Returns a view of the internal storage as a block.
Definition: aligned_block.hpp:25
Class containing store of the specified size convertible to block.
Definition: aligned_block.hpp:22