Add interfaceProxy function to allow for better vibe:core compatibility.
This commit is contained in:
parent
5249c1c4c6
commit
822dcccf34
|
@ -8,6 +8,8 @@ import std.traits : BaseTypeTuple;
|
||||||
O asInterface(I, O)(O obj) if (is(I == interface) && is(O : I)) { return obj; }
|
O asInterface(I, O)(O obj) if (is(I == interface) && is(O : I)) { return obj; }
|
||||||
InterfaceProxyClass!(I, O) asInterface(I, O)(O obj) if (is(I == interface) && !is(O : I)) { return new InterfaceProxyClass!(I, O)(obj); }
|
InterfaceProxyClass!(I, O) asInterface(I, O)(O obj) if (is(I == interface) && !is(O : I)) { return new InterfaceProxyClass!(I, O)(obj); }
|
||||||
|
|
||||||
|
InterfaceProxy!I interfaceProxy(I, O)(O o) { return InterfaceProxy!I(o); }
|
||||||
|
|
||||||
private class InterfaceProxyClass(I, O) : I
|
private class InterfaceProxyClass(I, O) : I
|
||||||
{
|
{
|
||||||
import std.meta : AliasSeq;
|
import std.meta : AliasSeq;
|
||||||
|
|
Loading…
Reference in a new issue