From 3305cf15929ab2a7a29360f4cbf511d8a7cc76a2 Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Thu, 4 Dec 2003 01:53:29 +0000 Subject: [PATCH] Fixed a bug in the semantics of less_pointees() {again} [SVN r21133] --- OptionalPointee.html | 2 +- include/boost/utility/compare_pointees.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OptionalPointee.html b/OptionalPointee.html index 8b96a45..925a9ae 100644 --- a/OptionalPointee.html +++ b/OptionalPointee.html @@ -125,7 +125,7 @@ If both have invalid pointees, returns true.

inline bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { - return (!x) != (!y) ? false : ( !x ? false : (*x) == (*y) ) ; + return !y ? false : ( !x ? true : (*x) < (*y) ) ; } template<class OptionalPointee> struct less_pointees_t : std::binary_function<bool,OptionalPointee,OptionalPointee> diff --git a/include/boost/utility/compare_pointees.hpp b/include/boost/utility/compare_pointees.hpp index e02aaf8..e580ae2 100644 --- a/include/boost/utility/compare_pointees.hpp +++ b/include/boost/utility/compare_pointees.hpp @@ -52,7 +52,7 @@ template inline bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { - return !y ? false : ( !x ? false : (*x) < (*y) ) ; + return !y ? false : ( !x ? true : (*x) < (*y) ) ; } template