On 1/10/18 12:59 PM, Dgame wrote:
On Wednesday, 10 January 2018 at 14:41:21 UTC, Steven Schveighoffer wrote:
On 1/10/18 3:08 AM, Dgame wrote:
On Wednesday, 10 January 2018 at 01:56:02 UTC, Steven Schveighoffer wrote:
But current auto ref is what we have, so I would recommend using it.

I would recommend to ignore auto ref for rvalue references. It generates 2^N functions where N is the amount of auto ref parameters. That the most awful template bloat I've ever seen.

It only generates 2^N functions if you call it 2^N different ways. Most of the time you call it the same way.


If that would be true we wouldn't need auto ref at all.

The author of the function may not be the one calling it, so he doesn't know the way you like to call it.

All I'm saying is to think about that your 2^N prediction requires 2^N lines of code, all calling it different ways. It's not likely to happen.

-Steve

Reply via email to