Boost logo

Boost Users :

Subject: Re: [Boost-users] [phoenix] adding const to member_variable bind
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-05 17:12:35


AMDG

Steven Watanabe wrote:
> Joel de Guzman wrote:
>> Thanks, Steven. Please feel free to apply the patch.
>
> I've started adding this to bind_member_variable_tests.cpp
> and I'm running into more problems than I expected. I'll get back to
> you.

I'm stuck here:

struct x {
    int m;
};

// instantiates member_variable::result<x>,
// but calls member_variable::operator()(const x&).
bind(&x::m, x())();

// instantiates member_variable::result<x> because
// top level references are stripped.
bind(&x::m, ref(x));

There is no way for result to distinguish between these cases,
even though they are different.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net