Hacker News new | ask | show | jobs
by amelius 1979 days ago
That introduces different data-types, rather than using the existing ones (instantiated with different pointer-types).
1 comments

Indeed. I don't know if there's a plan for the standard type to move to offset-ptr, or if there's even a std::offset_ptr, but it would be great if there was.

For us, some of the 'different data type' pain was alleviated with transparent comparators. YMMV.

Edit: It seems C++11 has added some form of support for it... 'fancy pointers'

https://en.cppreference.com/w/cpp/named_req/Allocator#Fancy_...