#pragma once #include "DI/object_type.hpp" #include "interfaces/wrapper.hpp" #include #include #include #include class Container; template class BindingBuilder { public: explicit BindingBuilder(Container *container); template >> void to(); void to_factory(Interface func); private: Container *_container; }; template struct is_func : public std::false_type // NOLINT(readability-identifier-naming) { }; template struct is_func> : public std::true_type { }; class Container { public: Container() = default; template BindingBuilder bind(); template >> std::shared_ptr get() const; /* template && std::is_invocable_v>> Interface get() const; */ template ::value>> Interface get() const; std::unordered_map, ObjectTypeHasher> bindings; }; #include "container.tpp"