29 Sep
2005
29 Sep
'05
10:01 p.m.
Anakreon wrote:
It may be more useful to generalise this further, depending on how often it's used. (Also, it's considered better taste to not add members that don't need to be members) Optionally:
// Would be safer with a overloadable transaction id type bool operator==(Event const& e, int id) { // as above, but e. , not e-> }
and then use: find_if(..., *_1 == tId);
It doesn't look like good practice to declare the equality operator compare an Event object with an int.
Indeed. Hence the comment about having a specific transaction type. Only do this if it makes logical sense, of course.