You can add a const overload that forwards to the de facto const implementation:
class C
{
void m(bool is_const)() // de-facto const when is_const is true
{
static if(!is_const) {/* ... mutate ... */};
}
void m(bool is_const)() const if(is_const)
{
return (cast() this).m!true();
}
}
You then have to be extra careful not to mutate when is_const
is set.