15 May
2013
15 May
'13
5:39 p.m.
2013/5/15 Peter Dimov
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!