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

Class Mercedes

12.12-constexprAllocation1/main.cpp:12–14  ·  view source on GitHub ↗

#B Various concrete cars with individual speed

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected