On Sun, 12 Aug 2012 09:39:13 +0200, Ivan Trombley <[email protected]> wrote:

I'm stumped. Can anyone tell me why this won't compule using DMD (v2.060)? It compiles and runs just fine using GDC:

The problems all have to do with one thing - shared class Data does
not mean every instance of the class is shared, only that all member
functions are.

Hence,

     auto data = receiveOnly!(Data);

should be

auto data = receiveOnly!(shared Data);

and

     auto data = new Data(count);

should be

auto data = cast(shared)new Data(count);

--
Simen

Reply via email to