Boost logo

Boost :

Subject: Re: [boost] Tagged pointer library?
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2017-01-11 05:13:07


> On 10 Jan 2017, at 19:28, Phil Endecott <spam_from_boost_dev_at_[hidden]> wrote:
>
> One issue with tagged pointers is that you need to get it right
> on every architecture that you care about. An advantage of Boost
> offering it, rather than everyone implementing their own version,
> would be that the architecture-specific research would only need
> to be done once.

Yes, exactly my thoughts. :) Once a platform-independent implementation exists, it could serve to optimise countless other boost and user libraries. This is a potential class with high adoption value.

Perhaps boost.align could be used on non-conforming platforms to ensure correct alignment of the pointer, so that the always trick works. If tagged_ptr is a smart pointer, it can use aligned_alloc and aligned_free behind the scenes.


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