Ticket #489 (new todo)
Opened 2 years ago
investigate possibility of invoking for_each
| Reported by: | ichthyo | Owned by: | |
|---|---|---|---|
| Priority: | nice | Milestone: | 2beta |
| Component: | lumiera | Keywords: | lib |
| Cc: | Blocked By: | ||
| Blocking: | #478 |
Description
Using tr1::bind, it is possible to invoke a member function on each element, given the elements are pointers. Because the tr1-binders always take their argument by value, it isn't possible to do the same on a collection of elements. See UtilForeach_test::check_invoke_on_each()
But, internally this invoking of member functions relies on std::mem_fun, which is capable to work on a reference for the *this-Parameter. Investigate feasibility of creating a custom functor, which does this kind of invocation.
But note: it could well be that we don't need such a feature at all...
Note: See
TracTickets for help on using
tickets.
