Shared db pool

Alex Khmara alex.khmara at gmail.com
Mon Mar 18 15:55:09 PDT 2013


Hmm, it seems that std.typecons. Unique does exactly move semantics. It 
accepts pointer, so I get another indirection level, but for my purposes 
it's fine.

On Mon, 18 Mar 2013 22:05:51 +0100, Benjamin Thaut wrote:

> 
> The only problem you may run into, is that the destructor of PoolRef
> might gets called multiple times if you are not really carefull with
> temporary variables. Ideal would be a way to disallow copying of the
> struct and only allow moving it, last I checked this was not possible in
> D. Because when you do @disable this(this) it will also disallow moving
> the struct. Although you could try with the current version.




More information about the Digitalmars-d-learn mailing list