Hi Arvid,
On 9. Oct 2017, at 12:59, Arvid Norberg via Boost
wrote: Without having read the reddit thread, I would expect this library to only depend on *implementation defined* behavior. Namely the mapping of pointer to integer conversions [1].
A pointer can be explicitly converted to any integral type large enough to
hold it. The mapping function is implementation-defined.
[ Note: It is intended to be unsurprising to those who know the addressing
structure of the underlying machine. — end note]
That note seem to indicate that only in the case of exotic hardware would the assumptions about what aligned addresses look like be invalid.
yes, that was also the conclusion in the Reddit thread, thank you for clarifying this.
We cannot know whether the library might be used on exotic hardware, right? Then we would need a fallback solution which relies only on standard behavior for such a platform. The question is what kind of fallback solution one could offer. If the library does not guarantee that tagged_ptr always has the size of void*, then one could fall back to something like this
template