
3 Apr
2009
3 Apr
'09
9:40 p.m.
AMDG Hicham Mouline wrote:
typedef transform_iterator< UnaryFunction, ... > iteratorIntoFirst;
struct UnaryFunction: public std::unary_function< pair
, double> { double operator()( const pair & e ) const { return e.first; } } However on asserting the category is still random access, boost static assert fails: <snip>
Try returning a reference const double& instead of double.
struct UnaryFunction {
typedef const double& result_type;
const double& operator()( const pair