template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp;
- bool bRet = container.extract_max( gp );
- if ( bRet )
+ typename Set::guarded_ptr gp( container.extract_max());
+ if ( gp )
dest = *gp;
- return bRet;
+ return !gp.empty();
}
};
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp;
- bool bRet = container.extract_min( gp );
- if ( bRet )
+ typename Set::guarded_ptr gp( container.extract_min());
+ if ( gp )
dest = *gp;
- return bRet;
+ return !gp.empty();
}
};