Yeah, the second one is supposed to read `Apple&& Cat(Apple&& val) {
return val;
}` — but the return type's `&&` was omitted by accident.
I swear I was staring at these two examples for longer than I care to admit wondering if I was just blind or dumb or both.
It's modern C++ so, a little of both I think. 20 years of it and I still have people saying "I should work on my fundamentals" so it's totally fine to be a bit of both.
Sorry for that mistake! I fixed the last example. The post should make much more sense now.
You probably don't pay for a copy or move there as well.
->
You probably don't pay for a copy or move there either.