Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-05-08 14:00:12

On Thursday, May 8, 2003, at 10:12 AM, Kresimir Fresl wrote:

> Matthias Troyer wrote:
>> That's a good point. I have prepared a version separate from
>> functional.hpp and posted it on our web server:
> Shouldn't the default type of the result of `logical_and'
> and `logical_or' be `bool' and not `Arg1'?

Yes, that's a good point as std::logical_and as std::logical_or also
have bool as return type
> I think that even for user defined types overloaded
> operators && and || will usually return boolean values.

except for container types such as std::valarray, where an operator&&
or operator|| might return a std::valarray<bool>.

However in order to keep consistency with the standard when only one
template argument is given, I agree that a default value of bool is


Boost list run by bdawes at, gregod at, cpdaniel at, john at