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

Class App

example/polymorphism/concepts.cpp:23–30  ·  view source on GitHub ↗

requires Drawable

Source from the content-addressed store, hash-verified

21/*<<Static polymorphism - concepts>>*/
22template <Drawable TDrawable = class Drawable> // requires Drawable<TDrawable>
23class App {
24 public:
25 explicit App(const TDrawable drawable) : drawable{drawable} {}
26 void draw(std::ostream& out) const { drawable.draw(out); }
27
28 private:
29 const TDrawable drawable;
30};
31
32struct Square {
33 void draw(std::ostream& out) const { out << "Square"; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected