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

Method operator<

Examples/NoModules/Chapter 13/Ex13_01/Box.h:18–19  ·  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 { return volume() < aBox.volume(); }
20
21private:
22 double m_length {1.0};

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected