|
Boost Users : |
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2007-12-27 04:36:11
I have a problem with the following statement:
return std::accumulate(
qrun_.begin(), qrun_.end(), svt,
_1 < if_then_else_return(
_2 != (acct*)0,
bind(&acct::get_avt, _2),
(unsigned)-1));
Basically, I want to find the minimal value of get_avt() over all
non-null members of qrun_ which is declared as std::vector<acct*>.
I get the following compiler error with SunCC 5.9:
Error, badbinaryop: The operation
"unsigned<const boost::lambda::detail::return_type_deduction_failure<
boost::lambda::detail::return_type_2_ifthenelsereturn<1, 1, 1, 0,
unsigned, const unsigned>>" is illegal.
The get_avt method is declared as: unsigned get_avt() const
Removing the const qualifier doesn't help.
Replacing (unsigned)-1 with _1 generates the same error, but with "const
unsigned" replaced by "unsigned&".
Replacing (unsigned)-1 with bare 0 compiles without any error, but does
not compute what I want.
Any suggestions about what am I doing wrong?
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