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:

http://www.comp-phys.org/software/function_objects/

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 better.

Matthias

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to