On Mon, Jan 9, 2017 at 10:54 AM, Hans Dembinski
I recently learned about tagged pointers, https://en.m.wikipedia.org/ wiki/Tagged_pointer. [...] Looking into boost, I found that the lockfree library has a tagged pointer implementation in its "detail" namespace. The implementation is nice, because it falls back to a safe version with a separate tag field on systems which do not follow the required alignment conventions.
Wouldn't it make sense to make the tagged pointer accessible by users, i.e. place it in a separate library (or in the existing smart_ptr library)?
FWIW, Facebook Folly has two 64-bit-only pointers using this: https://github.com/facebook/folly/blob/master/folly/DiscriminatedPtr.h https://github.com/facebook/folly/blob/master/folly/PackedSyncPtr.h I'd welcome an official one in Boost as well. Wasn't aware of the Boost.Lockfree one. Thanks for the pointer :). --DD