MCPcopy Create free account
hub / github.com/boost-ext/di / app

Class app

example/bindings.cpp:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45struct app {
46 BOOST_DI_INJECT(app, service copy, std::shared_ptr<interface1> sp, std::unique_ptr<interface2> ap, int i,
47 (named = some_name) const std::string& s, float& f, const double& d)
48 : str(s), f(f), d(d) {
49 assert(dynamic_cast<implementation2*>(ap.get()));
50 assert(dynamic_cast<implementation1_2*>(sp.get())); // overridden
51 assert(copy.sp.get() == sp.get());
52 assert(i == 42);
53 assert(str == "my_text");
54 assert(f == 0.f);
55 assert(d == 0.f);
56 }
57
58 app& operator=(const app&) = delete;
59

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected