MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / Mercedes

Class Mercedes

12.14-constexprAllocation2/main.cpp:14–16  ·  view source on GitHub ↗

#B Various concrete cars with individual speed

Source from the content-addressed store, hash-verified

12
13// #B Various concrete cars with individual speed
14struct Mercedes : Car {
15 constexpr int speed() const override { return 5; }
16};
17struct Toyota : Car {
18 constexpr int speed() const override { return 6; }
19};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected