| 43 | }; |
| 44 | |
| 45 | struct 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 | |