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

Jakob Ovrum via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 14 22:55:32 PDT 2014


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.


More information about the Digitalmars-d mailing list