I have a function "foo". This function takes an argument arg. foo promises not to modify arg in a visible way. In reality, foo will do all kinds of non-const operation on arg, but by the end of it all, foo will be back to normal: Code: foo(const T& arg) { arg+=2; //modify foo ...do stuff arg-=2; //foo is back to normal } An arg object is actually pretty big, so I'd like to avoid copying them unless arg is an actual const (and not just const qualified). Is there a solution to this?