D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10907 - It is impossible to pack a structure with shared object into a tuple.
Summary: It is impossible to pack a structure with shared object into a tuple.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 16:13 UTC by Jack Applegame
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jack Applegame 2013-08-26 16:13:18 UTC
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"
}