diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-10 17:20:49 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (patch) | |
tree | 7749fc877652bb2cf7bbd2b7c1fed5e3abe397fc /src/DI/object_wrapper.tpp | |
parent | b828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff) |
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/DI/object_wrapper.tpp')
-rw-r--r-- | src/DI/object_wrapper.tpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DI/object_wrapper.tpp b/src/DI/object_wrapper.tpp index 5334247..1811db8 100644 --- a/src/DI/object_wrapper.tpp +++ b/src/DI/object_wrapper.tpp @@ -3,7 +3,8 @@ #include "object_wrapper.hpp" template <class Interface, class ObjectImpl> -auto ObjectWrapper<Interface, ObjectImpl>::get() const noexcept -> std::shared_ptr<Interface> +auto ObjectWrapper<Interface, ObjectImpl>::get() const noexcept + -> std::unique_ptr<Interface> { return ObjectImpl::resolve(_container); } |