
5 Mar
2009
5 Mar
'09
11:44 p.m.
Hello, I'd like to have an object similar to boost::function, but with multiple function signatures. Eg. something like that multifunction<std::string(std::string), float(float), unsigned(unsigned)> mf; mf=_1 + _1; // I mean boost::lambda::_1 mf("ab"); // should be "abab" mf((UINT_MAX/2)+1); // should be 0 mf((UINT_MAX/2)+1.0); // should be UINT_MAX+1.0 Would it be possible/feasible to change boost::function to allow this (as opposed to implementing it separately from boost::function)? Was something like this even proposed before (I vaguely recall something, but couldn't google anything useful, so I may be wrong)? Regards Jiri Palecek