boost-ext / di

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

How to integrate Boost::DI with RTTR #395

Open soroshsabz opened 5 years ago

soroshsabz commented 5 years ago

ITNOA

How to integrate Boost::DI with RTTR ? I want to create an object with rttr that I have the name, but this object has many dependencies, and I want Boost::DI resolve these dependecies for me.

How can I achieve this?

Best Regards

krzysztof-jusiak commented 5 years ago

To integrate di with dynamic reflection the easiest way would be to use https://github.com/boost-experimental/di/blob/cpp14/extension/test/injector.cpp which is a runtime version of the injector.