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.
This commit is contained in:
committed by
Matthew Parkinson
parent
cbab7a3455
commit
73b86e6dff
18
src/ds/ptrwrap.h
Normal file
18
src/ds/ptrwrap.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user