cptr::user_cage::try_allocate

As allocate(), but returns nullptr on failure. A request for zero bytes asks the allocator for one, so every allocation is distinct.

Synopsis

Declared in <cptr/user_cage.hpp>

static
void*
try_allocate(
    std::size_t bytes,
    std::size_t align = alignof(
                                                   std::max_align_t)) noexcept;