Add sv_find_test

This commit is contained in:
Peter Dimov
2021-10-06 04:58:36 +03:00
parent f9fa1772f2
commit 09044f58d6
3 changed files with 132 additions and 1 deletions

View File

@@ -351,7 +351,7 @@ public:
p = traits_type::find( p, last - p, s[0] );
if( p == 0 ) break;
if( last - p < n ) break;
if( static_cast<size_type>( last - p ) < n ) break;
if( traits_type::compare( p, s, n ) == 0 ) return p - data();