Boost logo

Boost :

Subject: Re: [boost] determine first arg of callable
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-05-15 13:39:17


2013/5/15 Peter Dimov <lists_at_[hidden]>

> Oliver Kowalke wrote:
>
> void g( Q< std::string > &) {...}
>> X x( g);
>> x.run(); // call g() with an instance of Q< std::string > as arg
>>
>> struct W
>> {
>> void h( Q< int > &) {...}
>> };
>> W w;
>> X x( bind( & W::h, w, _1) );
>> x.run(); // call W::h() with an instance of Q< int > as arg
>>
>
> Interesting. Can't you get away with just passing the type to X, or even
> the Q<> value itself?
>
> X x( fn, Q<int>() );
>

I tried to hide the information of Q< int > for the user - in the
considered context it would confuse the user.

Anyway - I've another idea, maybe it will solve my problem.
Thx!


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