Remix.run Logo
trws 4 hours ago

There’s a paper in flight to add a stdlib type to handle pointer tagging as well while preserving pointer provenance and so-forth. It’s currently best to use the intptr types, but the goal is to make it so that an implementation can provide specializations based on what bits of a pointer are insignificant, or even ignored, on a given target without user code having to be specialized. Not sure where it has landed since discussion in SG1 but seemed like a good idea.

tialaramex 3 hours ago | parent [-]

Given you aren't sure since SG1 this might be useless but... do you have a paper number? Or, more likely, know an author's name ?

trws 3 hours ago | parent | next [-]

It’s Hana Dusikova’s paper IIRC.

legobmw99 3 hours ago | parent | prev [-]

Seems like its p3125r0

tialaramex 2 hours ago | parent [-]

Thanks! https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p31...

(is the current version of that paper, the tracking ticket insisted there's a P3125R5 and that LEWG had seen it in 2025, but it isn't listed in a mailing so it might be a mirage)

You know it's a Hana paper because it wants this to be allowed at compile time (C++ constrexpr) but joking aside this seems like a nice approach for C++ which stays agnostic about future implementation details.