bug or feature? shared objects and tuples

Jack Applegame japplegame at gmail.com
Mon Aug 26 15:58:35 PDT 2013


It is impossible to pack a structure with shared object into 
tuple.

```
import std.concurrency;
import std.typecons;

class Foo {}

struct A {
	shared Foo foo;
}

void main() {
	auto a = tuple(new shared Foo); // ОК
  	auto b = tuple(A());            // Error: static assert "unable 
to format shared objects"
}
```


More information about the Digitalmars-d-learn mailing list