Bug 15772 – emplace works with abstract classes but it shouldn't
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-06T10:43:00Z
Last change time
2016-03-14T13:34:14Z
Assigned to
nobody
Creator
b2.temp
Comments
Comment #0 by b2.temp — 2016-03-06T10:43:12Z
abstract class Foo {}
void main(string[] args)
{
import std.c.stdlib;
auto mem = malloc(typeid(Foo).initializer.length);
import std.conv;
auto c = emplace!Foo(cast(Foo*)mem);
}
Comment #1 by github-bugzilla — 2016-03-14T13:34:14Z