|
Boost : |
Subject: Re: [boost] interest in a stateful pointer library?
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2017-10-09 11:50:40
On Mon, Oct 9, 2017 at 5:32 AM, Hans Dembinski wrote:
> Please have a look at the updated README on Github. tagged_ptr uses
> Boost.Align to get pointers with a special bit pattern which allows to
> perfectly predict these bits and therefore use them to hold state. I thought
> that this trick was platform-independent, since Boost.Align seems platform-
> independent,
Note that the specific functions that you are using from Boost.Align
(boost::alignment::aligned_alloc and boost::alignment::aligned_free)
are portable and well-defined on every C++ implementation that has
either a function for those, or every C++11 and above implementation
which provides std::align (since boost::alignment::align will use a
conforming std::align if one exists).
On C++ implementations which have neither, then it falls back to the
custom (platform-dependent) implementation in boost::alignment::align.
Glen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk