4 ms·
Because `this auto&&` was not introduced to allow for recursive lambads. That's just a happy (though not very interesting) side effect. It was introduced so tha
by einpoklum 4y ago
Because `this auto&&` was not introduced to allow for recursive lambads. That's just a happy (though not very interesting) side effect. It was introduced so that you don't have to write duplicated code such as:
class Awesome {
// ...
foo& my_method() { /* ... */ }
const foo& my_method() const { /* ... */ }
};
and the extra duplication for lvalues and rvalues.