https://issues.dlang.org/show_bug.cgi?id=12628
Issue ID: 12628
Summary: emplace does not work for rvalues
Product: D
Version: unspecified
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: [email protected]
Reporter: [email protected]
Consider:
#!/Users/aalexandre/bin/rdcc
import std.conv, std.stdio;
struct A
{
A* next;
bool b;
@disable this(this);
}
struct B
{
A a;
}
void main()
{
A a;
emplace(&a, A(null, false));
B b;
emplace(&b, A());
}
Both calls fail to compile. These calls to emplace should work because they
don't need to postblit stuff around - they could just move from the rvalues
received.
--