Boost logo

Boost :

Subject: Re: [boost] [proto] Phoenix3 port to proto complete
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-07-28 03:26:59


Joel de Guzman wrote:

> You might want to re-post this with [bind] in the heading to solicit
> a reply from Peter Dimov; (maybe CC him too). It's best to fully
> understand the rationale behind the test.

The test tests whether the constness of the object returned by bind is
properly propagated to the bound function object. In the simplest case,
bind( f ) should return something like:

struct bound_f
{
    F f_;

    void operator()() { return f_(); }
    void operator()() const { return f_(); }
};

In the first op(), called for non-const bound_f objects, the f_ member is
non-const. In the second op(), called for const bound_f objects, the f_
member is const.


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