What is the meaning of not specifying a template parameter?
Hi,
I found this code which I don't understand:
1 2 3 4 5 6
|
using namespace boost;
auto injector = di::make_injector(
di::bind<ILogger>().to<ConsoleLogger>(),
di::bind<>().named(some_name).to(4.5f),
di::bind<>().named(int_name).to(5)
);
| |
How come di::bind is used with no template parameter? What does that mean and what is the difference between di::bind<> and di::bind<ILogger>?
Regards,
Juan
I believe di::bind is a template struct and di::bind<ILogger>() creates an object of type di::bind<ILogger>.
Topic archived. No new replies allowed.