Boost logo

Boost Users :

Subject: [Boost-users] boost::transform_iterator and C++0x decltype
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2011-02-23 02:45:15


Hello,
 
Currently (boost 1.46) boost::transform_iterator requires that the unary
functor 'f' passed to it use the 'result_of' protocol to declare its
return type (that is, it must either have a nested 'result_type' typedef,
or in the case of polymorphic functions, a nested 'result' metafunction
that computes the return type given the parameter type).
 
Would it be a good idea to modify the requirements so that if
the boost library detects C++0x support, it uses 'decltype' to
determine the return type of the functor, so that the functor
does not have to use the 'result_of' protocol?
 
I would be happy to contribute a patch implementing this.
 
Regards,
Nate.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net