Author: faridz
Date: Tue Jul 24 06:05:31 2007
New Revision: 559037

URL: http://svn.apache.org/viewvc?view=rev&rev=559037
Log:
2007-07-24 Farid Zaripov <[EMAIL PROTECTED]>

        STDCXX-466
        * string.cc (find_first_of): Don't throw std::length_error() if n > 
max_size().
        (find_first_of): Ditto.
        (find_last_of): Ditto.
        (find_first_not_of): Ditto.
        (find_last_not_of): Ditto.

Modified:
    incubator/stdcxx/trunk/include/string.cc

Modified: incubator/stdcxx/trunk/include/string.cc
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/string.cc?view=diff&rev=559037&r1=559036&r2=559037
==============================================================================
--- incubator/stdcxx/trunk/include/string.cc (original)
+++ incubator/stdcxx/trunk/include/string.cc Tue Jul 24 06:05:31 2007
@@ -776,12 +776,6 @@
 {
     _RWSTD_ASSERT(__s != 0);
 
-    _RWSTD_REQUIRES (__n <= max_size (),
-                     (_RWSTD_ERROR_LENGTH_ERROR,
-                      _RWSTD_FUNC ("basic_string::find_first_of(const_pointer, 
"
-                                   "size_type, size_type) const"),
-                      __n, max_size ()));
-
     for (size_type __xpos = __pos; __xpos < size() ; __xpos++)
     {
       for (size_type __i = 0; __i < __n ; __i++)
@@ -800,12 +794,6 @@
 {
     _RWSTD_ASSERT(__s != 0);
 
-    _RWSTD_REQUIRES (__n <= max_size (),
-                     (_RWSTD_ERROR_LENGTH_ERROR, 
-                      _RWSTD_FUNC ("basic_string::find_last_of(const_pointer, "
-                                   "size_type, size_type) const"),
-                      __n, max_size ()));
-
     if (size())
     {
       size_type __slen = size() -1;
@@ -828,12 +816,6 @@
 {
     _RWSTD_ASSERT(__s != 0);
 
-    _RWSTD_REQUIRES (__n <= max_size (),
-                     (_RWSTD_ERROR_LENGTH_ERROR, 
-                      _RWSTD_FUNC ("basic_string::find_first_not_of("
-                                  "const_pointer, size_type, size_type) 
const"),
-                      __n, max_size ()));
-
     for (size_type __xpos = __pos; __xpos < size() ; __xpos++)
     {
       bool __found = false;
@@ -860,12 +842,6 @@
 {
     _RWSTD_ASSERT(__s != 0);
 
-    _RWSTD_REQUIRES (__n <= max_size (),
-                     (_RWSTD_ERROR_LENGTH_ERROR, 
-                      _RWSTD_FUNC ("basic_string::find_last_not_of("
-                                  "const_pointer, size_type, size_type) 
const"),
-                      __n, max_size ()));
-    
     if (size())
     {
       size_type __slen = size() -1;


Reply via email to