di
di copied to clipboard
Runtime injector does not allow lazy binding to std::function factory methods
Expected Behavior
Runtime injector does not allow binding to lambda callbacks
Actual Behavior
Steps to Reproduce the Problem
If you wrap the following code in a runtime_injector you will get a compiler error:
auto ctInjector= boost::di::make_injector(
boost::di::bind<IInterface>()
.to([](const auto& injector)
{
return injector.template create<Implementation>();
})
);
runtimeInjector.install(ctInjector);
Specifications
- Version:
- Platform:
- Subsystem:
Lots of things that work with normal injector does not work with runtime injector. I've got this problem too with it.
That's true, runtime injector was just an experiment as an extension. but it seems to be popular, hence, let me improve the quality of it, sorry for the delay.
Is there any plan to work on runtime injector? There haven't been any update.