
11 Jul
2006
11 Jul
'06
5:47 a.m.
Daryle Walker wrote:
[snipped] If you are modeling data that has a standardized order, then it's OK to define (all) the ordering operators. If the order is something that you made up, and doesn't naturally flow with the model, then leave it out as a separate function (object). Don't shove in an ordering scheme via operators, especially if there more than one way to do it[1].
The unspecified strict weak ordering defined by the operator< overload is independent from shared_ptr's template parameter. You say that there are more than one way to do it. Can you come up with another way? Keep in mind, your ordering must be well defined even for shared_ptr<void> objects. --Emil