On Sunday, 3 August 2014 at 20:10:39 UTC, Martijn Pot wrote:
What is the benefit of 'auto ref' over 'in' as you are changing a nor b?

Because

  less_than (T)(T a, T b)

(or in, or const T) will copy a and b on their way into the function. Usually this is ok but certain data structures I use are not intended to be copied, or they are just very large or have very elaborate constructors that take up time and resources, or something.

I don't know if inlining would solve this or not but as far as I know there is no way to rely on inlining currently.

Reply via email to