RE: [Boost-Users] operator == in shared_ptr
30 Apr
2002
30 Apr
'02
11:17 a.m.
From: sashan [mailto:sashang@ihug.co.nz] [snip] Is there a better way that doesn't involve 1) having to write a wrapper class around a basic type (or any type) and 2) doesn't involve changing the shared_ptr::operator==.
As others have pointed out, the solution is to use a function object and
std::find_if. In this case, the comparison doesn't even need a separate
predicate - the (exceptionally cool) Boost.Bind library can be used instead:
vector
8246
Age (days ago)
8246
Last active (days ago)
0 comments
1 participants
participants (1)
-
bjorn.karlsson@readsoft.com