basic_string.h (basic_string<>:: basic_string(basic_string&&), [...]): Add.
[gcc.git] / libstdc++-v3 / include / ext / vstring.h
index bc3d829d8e159381633bf3dd07a5787a3cfa19d8..05307771e8f460cf2c78f9f75b4192312ef715de 100644 (file)
@@ -261,8 +261,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       operator=(__versa_string&& __str)
       {
        // NB: DR 1204.
-       // NB: DR 675.
-       this->clear();
        this->swap(__str);
        return *this;
       }
@@ -784,6 +782,23 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        return *this;
       }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      /**
+       *  @brief  Set value to contents of another string.
+       *  @param  __str  Source string to use.
+       *  @return  Reference to this string.
+       *
+       *  This function sets this string to the exact contents of @a __str.
+       *  @a __str is a valid, but unspecified string.
+       */
+      __versa_string&
+      assign(__versa_string&& __str)
+      {
+       this->swap(__str);
+       return *this;
+      }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
       /**
        *  @brief  Set value to a substring of a string.
        *  @param __str  The string to use.