On Wednesday, 29 September 2021 at 10:51:26 UTC, FeepingCreature wrote:
On Wednesday, 29 September 2021 at 10:22:40 UTC, FeepingCreature wrote:
Or: Turducken 2.0 The Reckoning

https://code.dlang.org/packages/rebindable https://github.com/FeepingCreature/rebindable

Rebindable offers a proxy type, `rebindable.DeepUnqual` (`DeepUnqual!T`) that can "stand in" for `T` in layout, but does not share `T`'s constructor, destructor, copy constructor, invariants or constness.


I forgot to mention: It does this by recursively crawling the member types of `T`, replacing all primitives with non-const equivalents.

Is this terrible? Yes, it's very terrible. I also don't see how to avoid it.

Terrible but I love it

Reply via email to