updated ioc to support existing instances

This commit is contained in:
Dominik Tomičević 2015-10-04 10:04:42 +02:00
parent 571d6ea541
commit 39ff11a883

View File

@ -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)
{