| 18 | }; |
| 19 | |
| 20 | class App { |
| 21 | public: |
| 22 | explicit App(std::unique_ptr<const Drawable> drawable) : drawable{std::move(drawable)} {} |
| 23 | void draw(std::ostream& out) const { drawable->draw(out); } |
| 24 | |
| 25 | private: |
| 26 | std::unique_ptr<const Drawable> drawable; |
| 27 | }; |
| 28 | |
| 29 | struct Square : Drawable { |
| 30 | void draw(std::ostream& out) const override { out << "Square"; } |
nothing calls this directly
no outgoing calls
no test coverage detected