updated ioc to support existing instances
This commit is contained in:
parent
571d6ea541
commit
39ff11a883
@ -77,6 +77,12 @@ public:
|
||||
return item;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void singleton(std::shared_ptr<T>&& item)
|
||||
{
|
||||
items.emplace(key<T>(), Holdable::uptr(new Instance<T>(item)));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void factory(typename Creator<T>::func&& f)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user