Open 0ctopus13prime opened 4 years ago
The reason that I need this to be working is that sub instances need to use injector, and there seems no way to expose the actual type of the injector.
For example, In our app we assemble, integrate object tree in the first phase, and sub instances use the injector to do their job afterward.
In pseudo code it looks like this
auto injector = di::make_injector(
.. bind this, that ...
);
// LoadSOPlugins : dlopen, dlsym etc.
for (auto p : LoadSOPlugins()) {
p.Prepare(injector);
}
Now, the problem is that third party plugin can't expect what exact type of the injector will be. But I found that if injector type can be fixed with runtime_injector, then this problem can be resolved.
Therefore, any kind of working around, suggestions are welcome!
Thank you very much
Expected Behavior
It's working when make an plain injector with an instance binding, but it becomes strangely not working as soon as the type is changed to
runtime_injector
I referred runtime_provider_example and made it run by my self without any compile errors.
Why
this work in the example, but not in mine?
Thank you in advance
Actual Behavior
My dev environment described at the bottom. Please see
Specifications
sectionGCC8 error
I didn't attach all GCC compile error logs which have quite long lines than Clang on purpose But few lines seem to be worth to consider
Clang7 error
Steps to Reproduce the Problem
Specifications