boost-ext / di

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

No instance of overloaded function #392

Open Keeo opened 5 years ago

Keeo commented 5 years ago

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

di

It is probably same issue as mentioned here in the comment after the close.

Steps to Reproduce the Problem

  1. Create new console application
  2. Add di.hpp to the project.
  3. Add following code:
    
    #include "di.hpp"

struct app {};

int main() { boost::di::make_injector().create(); }



## Specifications

  - Version: latest
  - Platform: Windows 10, Windows sdk version 10.0.17763.0, VS2017
Keeo commented 5 years ago

@garyng were you able to sove the issue you mentioned here?

garyng commented 5 years ago

@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).

kanstantsin-chernik commented 4 years ago

@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?