From 73b86e6dff528ab79bce0ff33ec4d2144048ee0b Mon Sep 17 00:00:00 2001 From: Nathaniel Filardo Date: Mon, 15 Mar 2021 18:40:34 +0000 Subject: [PATCH] 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. --- src/ds/ptrwrap.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/ds/ptrwrap.h 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