B
baliga
(std::cout << _1 << _2)("hello", 10);
This does not work. If 2 parameters are string, it works. If any one or
both parameters are integers, it does not work.
But If I change it to
boost::function<void(int, int)> f = std::cout << _1 << _2;
f(10, 10);
it works.
Question is why the first one does not work when one of the parameter
is integer.
Thanx,
-- baliga
http://baliga.blogdns.com/blog
This does not work. If 2 parameters are string, it works. If any one or
both parameters are integers, it does not work.
But If I change it to
boost::function<void(int, int)> f = std::cout << _1 << _2;
f(10, 10);
it works.
Question is why the first one does not work when one of the parameter
is integer.
Thanx,
-- baliga
http://baliga.blogdns.com/blog