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

Class App

example/polymorphism/templates.cpp:14–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12/*<<Static polymorphism - templates>>*/
13template <typename TDrawable = class Drawable>
14class App {
15 public:
16 explicit App(const TDrawable drawable) : drawable(drawable) {}
17 void draw(std::ostream& out) const { drawable.draw(out); }
18
19 private:
20 const TDrawable drawable;
21};
22
23struct Square {
24 void draw(std::ostream& out) const { out << "Square"; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected