Andy Jefferson schrieb:
I'm afraid this calls out for good old attachCopy(), only with an
additional parameter:
-1
attachCopy() was removed for a good reason - simplification.
I wouldn't call it a simplification if folding a method into another
causes a logical blurp in the target method. In my opinion that's the
case when the same method sometimes has copy semantics and sometimes
doesn't, and when it's return values aren't needed at all in the
non-copying case. Even more so as the non-copying case is the most
widely used one, forcing people to wonder what they might need the
return value for, only to find out that they don't need it at all.
That's hard to understand from most users' point of view.