| 12 | /*<<Static polymorphism - templates>>*/ |
| 13 | template <typename TDrawable = class Drawable> |
| 14 | class 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 | |
| 23 | struct Square { |
| 24 | void draw(std::ostream& out) const { out << "Square"; } |
nothing calls this directly
no outgoing calls
no test coverage detected