How to efficiently bind either an lvalue or rvalue to the same reference?
I'd create separate function, which accept reference and call it, like this:
void func( MyObject const & original ) {
if (apply_alteration)
func_internal(alter_obj(original));
else
func_internal(original);
}
void func_internal( MyObject const & possibly_altered) {
// ...
}