*/
std::pair<bool, bool> update( value_type& val, bool bInsert = true )
{
- return update_at( m_pHead, val, []( value_type&, value_type* ) {}, bINsert );
+ return update_at( m_pHead, val, []( value_type&, value_type* ) {}, bInsert );
}
/// Unlinks the item \p val from the list
EXPECT_FALSE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
EXPECT_EQ( i.s.nFindCall, 0 );
- switch ( i.nKey % 3 ) {
+ switch ( i.nKey % 4 ) {
case 0:
EXPECT_TRUE( l.insert( i ));
break;
EXPECT_EQ( ret.second, true );
}
break;
+ case 3:
+ {
+ std::pair<bool, bool> ret = l.update( i, false );
+ EXPECT_EQ( ret.first, false );
+ EXPECT_EQ( ret.second, false );
+
+ ret = l.update( i );
+ EXPECT_EQ( ret.first, true );
+ EXPECT_EQ( ret.second, true );
+ }
+ break;
}
EXPECT_TRUE( l.contains( i.nKey ));