You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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 ourT
through that factory. Although that assumes some boilerplate which can/should be avoided.Guice
lets us to automatically generate such factories in runtime, whiledistage
can do it during compile-time.Is there any way to implement such approach with
boost.di
?See:
The text was updated successfully, but these errors were encountered: