30 #ifndef BIT_MEMORY_UTILITIES_MEMORY_BLOCK_HPP 31 #define BIT_MEMORY_UTILITIES_MEMORY_BLOCK_HPP 33 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 35 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 43 struct memory_block_arg{};
47 #ifndef BIT_DOXYGEN_BUILD 48 inline void nullblock( detail::memory_block_arg& ){}
54 using nullblock_t = decltype(*nullblock);
78 constexpr
memory_block(
void* data, std::size_t size ) noexcept;
112 constexpr
void* data()
const noexcept;
119 constexpr
void* start_address()
const noexcept;
126 constexpr
void* end_address()
const noexcept;
136 constexpr std::size_t size()
const noexcept;
142 bool contains(
const void* ptr )
const noexcept;
145 constexpr
explicit operator bool()
const noexcept;
177 constexpr
bool operator == ( nullblock_t,
const memory_block& rhs ) noexcept;
178 constexpr
bool operator == (
const memory_block& lhs, nullblock_t ) noexcept;
181 constexpr
bool operator != ( nullblock_t,
const memory_block& rhs ) noexcept;
182 constexpr
bool operator != (
const memory_block& lhs, nullblock_t ) noexcept;
198 constexpr
bool is_null( nullblock_t ) noexcept;
203 #include "detail/memory_block.inl"
Wrapper around a block of memory, containing both the size and the address of the memory block...