Files
snmalloc/src/ds/ptrwrap.h
Nathaniel Filardo 73b86e6dff NFC: Introduce skeletal ds/ptrwrap.h
This lets us go ahead and land several preparatory commits without waiting for
the real AuthPtr<> types to show up.
2021-03-16 09:29:19 +00:00

19 lines
481 B
C++

#pragma once
#include <atomic>
namespace snmalloc
{
/**
* To assist in providing a uniform interface regardless of pointer wrapper,
* we also export intrinsic pointer and atomic pointer aliases, as the postfix
* type constructor '*' does not work well as a template parameter and we
* don't have inline type-level functions.
*/
template<typename T>
using Pointer = T*;
template<typename T>
using AtomicPointer = std::atomic<T*>;
} // namespace snmalloc