di
di copied to clipboard
No instance of overloaded function
Hi,
i just added this library to new project and got following soft error(it runs but complains in ide) with following message:
Severity Code Description Project File Line Suppression State
Error (active) E0304 no instance of overloaded function "boost::di::v1_1_0::core::injector<TConfig, boost::di::v1_1_0::core::pool<boost::di::v1_1_0::aux::type_list<>>, TDeps...>::create [with TConfig=boost::di::v1_1_0::config, TDeps=<>]" matches the argument list ConsoleApplication2 __PATH__\ConsoleApplication2.cpp 12

It is probably same issue as mentioned here in the comment after the close.
Steps to Reproduce the Problem
- Create new console application
- Add
di.hppto the project. - Add following code:
#include "di.hpp"
struct app {};
int main()
{
boost::di::make_injector().create<app>();
}
Specifications
- Version: latest
- Platform: Windows 10, Windows sdk version 10.0.17763.0, VS2017
@garyng were you able to sove the issue you mentioned here?
@garyng were you able to sove the issue you mentioned here?
uhmmmm that was a long time ago... I just went away with another library (https://github.com/ybainier/Hypodermic).
@Keeo, I cannot reproduce the problem. Tried to follow your steps but have no warnings or errors.
Could you please give more details about your setup or share a project you have the problem with?