cptr::default_cage::try_allocate

As allocate(), but returns nullptr on failure.

Synopsis

Declared in <cptr/cage.hpp>

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

Description

The common case, a small block from this thread's cache, is kept small enough for compilers to inline; everything else is out of line.