aboutsummaryrefslogtreecommitdiff
path: root/src/DI/auto_wirable.tpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DI/auto_wirable.tpp')
-rw-r--r--src/DI/auto_wirable.tpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/DI/auto_wirable.tpp b/src/DI/auto_wirable.tpp
new file mode 100644
index 0000000..6c0d111
--- /dev/null
+++ b/src/DI/auto_wirable.tpp
@@ -0,0 +1,10 @@
+#pragma once
+
+#include "auto_wirable.hpp"
+
+template <class Interface, class ObjectImpl, class... Dependencies>
+std::shared_ptr<Interface>
+AutoWirable<Interface, ObjectImpl, Dependencies...>::resolve(const Container &container)
+{
+ return std::make_shared<ObjectImpl>(container.get<Dependencies>()...);
+}