Escaping the Tyranny of the GC: std.rcstring, first blood

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 15 00:22:50 PDT 2014


On 9/14/14, 10:55 PM, Jakob Ovrum wrote:
> On Monday, 15 September 2014 at 05:50:36 UTC, Andrei Alexandrescu wrote:
>> and have it be either refcounted or "classic" depending on the
>> definition of String. With a user-defined String, you need:
>>
>> String s = String("abc");
>
> The following works fine:
>
> RCString s = "abc";
>
> It will call RCString.this with "abc". The problem is passing string
> literals or slices to functions that receive RCString.

Yah, sorry for the confusion. -- Andrei


More information about the Digitalmars-d mailing list