Moritz Bunkus
d7b335f0a8
Properly compare elements
If you have "virtual operator <" in a base class and a derived class and each takes a reference of its own class as an arugment then the function in the derived class hides the one in the base class and does not override is as the signatures do not match: class base { public: bool virtual operator <(const base &cmp); }; class derived: public base { public: bool virtual operator <(const derived &cmp); }; If two instances of base are compared then base::operator< is called: base *p1, *p2; if (*p1 < *p2) // calls base::operator< git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@61 a6f86f6d-0131-4f8e-9e7b-e335508773d5
Description
No description provided
Languages
C++
94%
C
5.2%
Makefile
0.6%
M4
0.2%