diff --git a/src/ds/ptrwrap.h b/src/ds/ptrwrap.h new file mode 100644 index 0000000..a65d034 --- /dev/null +++ b/src/ds/ptrwrap.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +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 + using Pointer = T*; + + template + using AtomicPointer = std::atomic; +} // namespace snmalloc