Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-05-02 11:35:59


From: "Doug Gregor" <gregod_at_[hidden]>

> The C++ standard mem_fun and const_mem_fun avoid this issue of passing
> constness by using two separate classes, but I don't believe that
> boost::function should dodge the issue again.

There is no const_mem_fun in the Standard.

mem_fun(pmf) may return mem_fun_t or const_mem_fun_t depending on whether
pmf is a const or a non-const member function, but both
mem_fun_t::operator() and const_mem_fun_t::operator() are const; neither
mem_fun_t nor const_mem_fun_t contains an object, so they don't need to pass
constness.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk