On Wed, Aug 8, 2018, 4:25 AM Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
On 07.08.2018 21:19, waddlesplash wrote:
On Tue, Aug 7, 2018, 2:59 PM Ingo Weinhold <ingo_weinhold@xxxxxxwith
Moreover, I don't think using the operator < makes reading this code
particularly intuitive. I'd rather turn the operator into a method
a fitting name, like HasPrecedenceOver(), HasHigherPriorityThan(),
or ...
Well, one advantage of operator< is that if we ever start using some
templated list that does this sorting automatically, we won't need to
modify the code.
A sane implementation of such a container (respectively sorting
algorithm) may use the operator < as a default, but wouldn't hard-code
that as the only option. So the argument isn't a particularly good one.