boost-ext / di

C++14 Dependency Injection Library
https://boost-ext.github.io/di
1.13k stars 136 forks source link

Is it possible to implement parent-child scope injectors? #547

Closed vrecluse closed 1 year ago

vrecluse commented 1 year ago

For example, If not found in child injector, find in parent injector instead; When child injector destruct, only destruct the objects in this child scope ; Multiple children can share a parent injector, shared objects in parent are shared across children; Arbitary levels of decendents, eg: parent - child - grandchildren scope and more...

kanstantsin-chernik commented 1 year ago

Hey, it is absolutely possible. Tale a look at extensible_injector. Here is the test to navigate you

vrecluse commented 1 year ago

Greate, Thanks.