this() immutable

Simen Kjaeraas simen.kjaras at gmail.com
Thu Jun 13 05:29:40 PDT 2013


On Thu, 13 Jun 2013 14:17:22 +0200, Stephan Schiffels  
<stephan_schiffels at mac.com> wrote:

> For example, is there a way of instantiating an object normally (i.e.  
> mutable), and then later "freeze" it to immutable via a simple cast or  
> so?

In std.exception there is assumeUnique. It's basically just a cast, but
might be good enough for you.

-- 
Simen


More information about the Digitalmars-d-learn mailing list