I have always conflated these ideas, probably because static_cast does both. But it could be nice to be able to write, say, inches(50).force_as(feet): we wouldn't need to repeat the Rep, and the "force" makes the potential lossiness more obvious. This would free up q.as<T>(unit) to respect the safety checks.
I have always conflated these ideas, probably because
static_castdoes both. But it could be nice to be able to write, say,inches(50).force_as(feet): we wouldn't need to repeat theRep, and the "force" makes the potential lossiness more obvious. This would free upq.as<T>(unit)to respect the safety checks.