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.
I get the following compiler error with SunCC 5.9:
Error, badbinaryop: The operation
"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?