We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the basic example from the readme, I would expect the following code to compile:
const auto injector = di::make_injector( di::bind<int>.to(42), di::bind<double>.to(87.0) );
I get a compile error
no instance of function template "boost::di::v1_0_2::make_injector" matches the argument list 71 argument types are: (dependency, dependency)
I know this is a long shot. Let me know if I need to provide additional information.
The text was updated successfully, but these errors were encountered:
Thanks, @nicholasc.
I think MSVC still doesn't support DI variable template usage. Hence, you have to put () after bind.
()
di::bind<int>().to(42) di::bind<double>().to(87.0)
Working example here -> https://godbolt.org/g/vBp3hD
Hopefully, that will help.
Sorry, something went wrong.
Well that was simple... Thanks @krzysztof-jusiak.
Should this be documented in the readme or somewhere else?
Same environment as OP, the code still compiles, but it still shows up as errors. Any ideas?
No branches or pull requests
Expected Behavior
Using the basic example from the readme, I would expect the following code to compile:
Actual Behavior
I get a compile error
Steps to Reproduce the Problem
Specifications
I know this is a long shot. Let me know if I need to provide additional information.
The text was updated successfully, but these errors were encountered: