Stewart Gordon:
OK, so we have std.typecons.Rebindable. But I've found it a
PITA when it comes to generic programming. Among other things,
if you try to pass it around, you can end up with a mess like
const(Rebindable!(const(....))). This wouldn't happen with
built-in tail const support.
This is only partially related to your post. It's for a general
solution.
Is it possible to invent a language construct that allows:
const(Rebindable!(const(....)))
To be defined as the same as:
Rebindable!(const(....))
Something like an onConst()/onImmutable templated methods for
structs/classes?
Bye,
bearophile