17 Mar
2009
17 Mar
'09
10:40 p.m.
AMDG Sandeep Gupta wrote:
template
std::pair buildPair(X x, Y y); int main() { typedef boost::function
)> FuncType1_t; FuncType1_t ft1; typedef boost::function
)> FuncType2_t; FuncType2_t ft2 = bind(ft1, bind(buildPair ,_1,_2)); } This fails. The problem however vanished if I replace the declaration "FuncType3 ft2..." with bind(ft1, bind(buildPair
,_1,_2))(3,5); So my question is what is correct type of bind(ft1, bind(buildPair
,_1,_2));
Since it is a function which takes two ints,
the correct type is
boost::function