Bug 10907 – It is impossible to pack a structure with shared object into a tuple.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-26T16:13:18Z
Last change time
2020-03-21T03:56:32Z
Assigned to
No Owner
Creator
Jack Applegame
Comments
Comment #0 by japplegame — 2013-08-26T16:13:18Z
Example:
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"
}