
6 Mar
2009
6 Mar
'09
11:26 a.m.
On Fri, 06 Mar 2009 01:35:14 +0100, Marco <mrcekets@gmail.com> wrote:
Using my implementation you can get what you're interested in with the following code:
struct doubler { template< typename T> T operator() (const T& x) { return x + x; } };
boost::overload< std::string (std::string), float (float), unsigned (unsigned) > mf; mf.set(doubler); mf("ab"); mf((UINT_MAX/2)+1); mf((UINT_MAX/2)+1.0);
Sorry mf.set(doubler) is wrong, clearly. I mean: doubler dbl; mf.set(dbl); - Marco Cecchetti -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/