cptr::tagged_ptr::set

Replaces both. p must be null or point into the cage, aligned to 2^(TagBits + Cage::shift), and tag must fit in TagBits bits (both checked by assertions in debug builds).

Synopsis

Declared in <cptr/pack.hpp>

void
set(
    T* p,
    uint32_t tag) noexcept;