Predicate helper for DataVector/List classes.
More...
Public Types | |
|
typedef DVL::BaseContainer::value_type | inptr |
Public Member Functions | |
| Predwrapper (Predicate pred) | |
| bool | operator() (inptr x) |
Public Attributes | |
| Predicate | m_pred |
Predicate helper for DataVector/List classes.
When doing operations such as partition on a DataVector/List, we'd like to be able to give the operation the iterators of the underlying BaseContainer container, for the sake of efficiency. But we also have to make sure that the predicate sees the proper pointer types for derived DataVector/List classes. This can be done with the following functional wrapper. This wraps a predicate object, putting the arguments through DVLCast before calling the predicate.
There is also a specialization for the case where no casting is required.
1.6.1