From 40d02748924aa7c48b04cf948204d8dacdfbbc74 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 30 Apr 2022 16:28:13 +0200 Subject: refactor: replace DI files with the yacppdic library --- src/DI/factory.tpp | 65 ------------------------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 src/DI/factory.tpp (limited to 'src/DI/factory.tpp') diff --git a/src/DI/factory.tpp b/src/DI/factory.tpp deleted file mode 100644 index 38b9c00..0000000 --- a/src/DI/factory.tpp +++ /dev/null @@ -1,65 +0,0 @@ -#pragma once - -#include "factory.hpp" - -template -Factory::Factory(const Factory &factory) : _functor(factory._functor) -{ -} - -template -Factory::Factory(Factory &&factory) noexcept - : _functor(std::move(factory._functor)) -{ -} - -template -auto Factory::operator=(Factory &&factory) noexcept - -> Factory & -{ - _functor = std::move(factory._functor); - return *this; -} - -template -auto Factory::operator=(std::nullptr_t) noexcept - -> Factory & -{ - _functor = nullptr; - return *this; -} - -template -Factory::~Factory() = default; - -template -Factory::operator bool() const noexcept -{ - return static_cast(_functor); -} - -template -auto Factory::operator()(Args... args) const -> Return -{ - return _functor(std::forward(args)...); -} - -template -auto Factory::target_type() const noexcept -> const std::type_info & -{ - return _functor.target_type(); -} - -template -template -auto Factory::target() noexcept -> Tp * -{ - return static_cast(_functor.template target()); -} - -template -template -auto Factory::target() const noexcept -> const Tp * -{ - return _functor.template target(); -} -- cgit v1.2.3-18-g5258