[Issue 12628] New: emplace does not work for rvalues
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 23 12:43:47 PDT 2014
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: nobody at puremagic.com
Reporter: andrei at erdani.com
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.
--
More information about the Digitalmars-d-bugs
mailing list