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

Class App

example/polymorphism/variant.cpp:28–38  ·  view source on GitHub ↗

< >*/

Source from the content-addressed store, hash-verified

26
27/*<<Variant>>*/
28class 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
40int main() {
41 std::stringstream str{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected