From 822dcccf34667fec6b1598cf1227e9b634edb14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 26 Jan 2017 23:53:18 +0100 Subject: [PATCH] Add interfaceProxy function to allow for better vibe:core compatibility. --- source/vibe/internal/interfaceproxy.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/vibe/internal/interfaceproxy.d b/source/vibe/internal/interfaceproxy.d index 110ea8e..7ba4334 100644 --- a/source/vibe/internal/interfaceproxy.d +++ b/source/vibe/internal/interfaceproxy.d @@ -8,6 +8,8 @@ import std.traits : BaseTypeTuple; 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); } +InterfaceProxy!I interfaceProxy(I, O)(O o) { return InterfaceProxy!I(o); } + private class InterfaceProxyClass(I, O) : I { import std.meta : AliasSeq;