Boost logo

Boost :

Subject: Re: [boost] Tagged pointer library?
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2017-01-09 06:47:52


On Mon, Jan 9, 2017 at 10:54 AM, Hans Dembinski <hans.dembinski_at_[hidden]>
wrote:

> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk