< >*/
| 26 | |
| 27 | /*<<Variant>>*/ |
| 28 | class App { |
| 29 | public: |
| 30 | explicit App(const Drawable drawable) : drawable{drawable} {} |
| 31 | |
| 32 | void draw(std::ostream& out) const { |
| 33 | std::visit([&out](const auto& drawable) { drawable.draw(out); }, drawable); |
| 34 | } |
| 35 | |
| 36 | private: |
| 37 | const Drawable drawable; |
| 38 | }; |
| 39 | |
| 40 | int main() { |
| 41 | std::stringstream str{}; |
nothing calls this directly
no outgoing calls
no test coverage detected