Could you please give me a hint if boost.di supports partial construction also known as assisted injection?
Let's assume that we have class T, where some constructors parameters should be taken from the static DI context and some others are supposed to be provided dynamically. We might write a factory class, wire it with our DI framework and instantiate our T through that factory. Although that assumes some boilerplate which can/should be avoided. Guice lets us to automatically generate such factories in runtime, while distage can do it during compile-time.
Is there any way to implement such approach with boost.di?
See:
- https://izumi.7mind.io/distage/basics.html#auto-factories
- https://github.com/google/guice/wiki/AssistedInject
Could you please give me a hint if
boost.disupports partial construction also known as assisted injection?Let's assume that we have class
T, where some constructors parameters should be taken from the static DI context and some others are supposed to be provided dynamically. We might write a factory class, wire it with our DI framework and instantiate ourTthrough that factory. Although that assumes some boilerplate which can/should be avoided.Guicelets us to automatically generate such factories in runtime, whiledistagecan do it during compile-time.Is there any way to implement such approach with
boost.di?See: