Index: include/string
===================================================================
--- include/string	(revision 194081)
+++ include/string	(working copy)
@@ -2181,7 +2181,7 @@
                                                      size_type __n_copy,  size_type __n_del,     size_type __n_add)
 {
     size_type __ms = max_size();
-    if (__delta_cap > __ms - __old_cap - 1)
+    if (__delta_cap > __ms - __old_cap)
         this->__throw_length_error();
     pointer __old_p = __get_pointer();
     size_type __cap = __old_cap < __ms / 2 - __alignment ?
Index: test/strings/basic.string/string.capacity/max_size.pass.cpp
===================================================================
--- test/strings/basic.string/string.capacity/max_size.pass.cpp	(revision 194081)
+++ test/strings/basic.string/string.capacity/max_size.pass.cpp	(working copy)
@@ -18,15 +18,45 @@
 
 template <class S>
 void
+test1(const S& s)
+{
+    S s2(s);
+    const size_t sz = s2.max_size() - 1;
+    try { s2.resize(sz, 'x'); }
+    catch ( const std::bad_alloc & ) { return ; }
+    assert ( s2.size() ==  sz );
+}
+
+template <class S>
+void
+test2(const S& s)
+{
+    S s2(s);
+    const size_t sz = s2.max_size();
+    try { s2.resize(sz, 'x'); }
+    catch ( const std::bad_alloc & ) { return ; }
+    assert ( s.size() ==  sz );
+}
+
+template <class S>
+void
+test3(const S& s)
+{
+    S s2(s);
+    const size_t sz = s2.max_size() + 1;
+    try { s2.resize(sz, 'x'); }
+    catch ( const std::length_error & ) { return ; }
+    assert ( s2.size() ==  sz );
+}
+
+template <class S>
+void
 test(const S& s)
 {
     assert(s.max_size() >= s.size());
-    {
-    S s2;
-    try { s2.resize(s2.max_size() - 1, 'x'); }
-    catch ( const std::bad_alloc & ) { return ; }
-    assert ( false );
-    }
+    test1(s);
+    test2(s);
+    test3(s);
 }
 
 int main()
