Avoid instantiating emplace(O) for class instances.
Fixes a deprecation warning for ProxyStream.
This commit is contained in:
parent
65b921cc65
commit
b160f80af6
|
@ -163,7 +163,7 @@ struct InterfaceProxy(I) if (is(I == interface)) {
|
||||||
import std.conv : emplace;
|
import std.conv : emplace;
|
||||||
clear();
|
clear();
|
||||||
m_intf = ProxyImpl!O.get();
|
m_intf = ProxyImpl!O.get();
|
||||||
if (is(O == class))
|
static if (is(O == class))
|
||||||
(cast(O[])m_value[0 .. O.sizeof/m_value[0].sizeof])[0] = object;
|
(cast(O[])m_value[0 .. O.sizeof/m_value[0].sizeof])[0] = object;
|
||||||
else emplace!O(m_value[0 .. O.sizeof/m_value[0].sizeof]);
|
else emplace!O(m_value[0 .. O.sizeof/m_value[0].sizeof]);
|
||||||
swap((cast(O[])m_value[0 .. O.sizeof/m_value[0].sizeof])[0], object);
|
swap((cast(O[])m_value[0 .. O.sizeof/m_value[0].sizeof])[0], object);
|
||||||
|
|
Loading…
Reference in a new issue