
shunsuke wrote:
Sohail Somani wrote:
Hi,
Say I have a function "int add(int, int)" and want to use it in a call to std::transform with zip_iterators. Is there a way to do it without writing an intermediate function object?
If not, would it be sensible to write a generic one using the function_types library? I can't imagine this would be too hard but just wanted to know if there is anything I can leverage before writing it myself.
I guess what you're looking for is...
http://tinyurl.com/26t9dd =http://lists.boost.org/Archives/boost/2007/01/115135.php
http://tinyurl.com/y9ax7t =http://boost.cvs.sourceforge.net/boost/boost/boost/iterator/zip_iterator.hpp?view=log&pathrev=zip_iterator_fusion
It seems not so easy because of the Forwarding Problem.
Forwarding doesn't seem a problem to me since you already have the argument
tuple. The return type inference is painful to get right, though. On the
surface it seems as easy as
template