Boost logo

Boost Users :

Subject: Re: [Boost-users] pointer to member function of multi_index
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-03-18 18:02:07


On Wed, Mar 18, 2009 at 12:04 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> Sandeep Gupta wrote:
>>
>> On Tue, Mar 17, 2009 at 8:40 PM, Steven Watanabe <watanabesj_at_[hidden]>
>> wrote:
>>
>>>
>>> It's okay to create a function objects like those in phoenix
>>> http://www.boost.org/libs/spirit/phoenix/doc/html/phoenix/container.html
>>> as long as you don't bind a member pointer in the process.
>>>
>>
>>  Would trouble you for one more clarification regarding this issue.
>> How do we go about binding overloaded member functions without
>> specifying exact signature. From what I could gather to adapt
>> overloaded functions we need the full signature.
>>
>
> You have to use a forwarding function object like
> those I referred to above.
>
On first glance I missed how to go about using them. I am afraid this
approach fails as well.
The commands:
       vector<int> myvec;
       bind(push_back, myvec, arg1)(5);

give error:
PhoneixTricks.cpp:29: instantiated from here
/home/sandeep/Computing/boost_1_38_0/boost/spirit/home/phoenix/core/detail/function_eval.hpp:116:
error: no class template named ‘result’ in ‘struct
boost::phoenix::function<boost::phoenix::stl::push_back>’
/home/sandeep/Computing/boost_1_38_0/boost/spirit/home/phoenix/core/detail/function_eval.hpp:126:
error: no class template named ‘result’ in ‘struct
boost::phoenix::function<boost::phoenix::stl::push_back>’
PhoneixTricks.cpp: In function ‘int main()’:

A somewhat related problem appeared here
http://www.nabble.com/-Spirit2--Phoenix-2-binding-function-objects-td21853124.html.

Again thanks so much more so for being patient.

-Sandeep


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