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


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, kalb at, bjorn.karlsson at, gregod at, wekempf at