A solution to this would be to disallow mutable value types. Then, all methods would _have_ to return a new instance.
The compiler implementation could use mutability behind the scenes for efficiency, while the language exclusively allowed immutable values.
void A::replace(const A& source, const A& dest);
vs
A A::replace(const A& source, const A& dest) const;
That said, I think you can get this same benefit without such a verbose name. Perhaps something like "withReplacement"?