MCPcopy Create free account
hub / github.com/boost-ext/te / main

Function main

example/injection.cpp:44–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44int main() {
45 namespace di = boost::di;
46
47 // clang-format off
48 const auto injector = di::make_injector(
49 di::bind<Drawable>.to<Circle>(),
50 di::bind<std::ostream>.to(std::cout)
51 );
52 // clang-format on
53
54 injector.create<Example>().draw(); // prints Circle
55}
56#else
57int main() {}
58#endif

Callers

nothing calls this directly

Calls 1

drawMethod · 0.45

Tested by

no test coverage detected