di icon indicating copy to clipboard operation
di copied to clipboard

No instance of overloaded function

Open Keeo opened this issue 6 years ago • 3 comments

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<app>();
}

Specifications

  • Version: latest
  • Platform: Windows 10, Windows sdk version 10.0.17763.0, VS2017

Keeo avatar Mar 24 '19 20:03 Keeo

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

Keeo avatar Mar 25 '19 18:03 Keeo

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

garyng avatar Mar 26 '19 01:03 garyng

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

kanstantsin-chernik avatar Oct 14 '19 15:10 kanstantsin-chernik