MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / operator<

Method operator<

Examples/NoModules/Chapter 13/Ex13_02/Box.h:18–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 double getHeight() const { return m_height; }
17
18 bool operator<(const Box& aBox) const // Less-than operator
19 {
20 return volume() < aBox.volume();
21 }
22
23 bool operator<(double value) const; // Compare Box volume < double value
24

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected