Fixed a bug in the semantics of less_pointees() {again}

[SVN r21133]
This commit is contained in:
Fernando Cacciola 2003-12-04 01:53:29 +00:00
parent ec36cd8c54
commit 3305cf1592
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ If both have invalid pointees, returns true.</p>
inline
bool less_pointees ( OptionalPointee const&amp; x, OptionalPointee const&amp; y )
{
return (!x) != (!y) ? false : ( !x ? false : (*x) == (*y) ) ;
return !y ? false : ( !x ? true : (*x) < (*y) ) ;
}
template&lt;class OptionalPointee&gt;
struct less_pointees_t : std::binary_function&lt;bool,OptionalPointee,OptionalPointee&gt;

View File

@ -52,7 +52,7 @@ template<class OptionalPointee>
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<class OptionalPointee>