On Mon, 20 Apr 2015 10:14:25 +0000, Chris wrote: > string a = "bla"; > string b = "blub"; > > auto res = doSomething(a, b); > > If I didn't use "auto ref" or "ref", string would get copied, wouldn't > it?
no, it wont -- not unless you'll append something to it. slicing arrays (and string is array too) will never copy anything.
signature.asc
Description: PGP signature