| Index: Source/wtf/text/WTFString.h
|
| diff --git a/Source/wtf/text/WTFString.h b/Source/wtf/text/WTFString.h
|
| index c7650b50e9096329045deedd181dc733ef0e363d..13078127885b7c8233cbb1e20515fdbd60125df8 100644
|
| --- a/Source/wtf/text/WTFString.h
|
| +++ b/Source/wtf/text/WTFString.h
|
| @@ -122,6 +122,15 @@
|
| // Construct a string referencing an existing StringImpl.
|
| String(StringImpl* impl) : m_impl(impl) { }
|
| String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
|
| +
|
| +#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
|
| + // We have to declare the copy constructor and copy assignment operator as well, otherwise
|
| + // they'll be implicitly deleted by adding the move constructor and move assignment operator.
|
| + String(const String& other) : m_impl(other.m_impl) { }
|
| + String(String&& other) : m_impl(other.m_impl.release()) { }
|
| + String& operator=(const String& other) { m_impl = other.m_impl; return *this; }
|
| + String& operator=(String&& other) { m_impl = other.m_impl.release(); return *this; }
|
| +#endif
|
|
|
| // Inline the destructor.
|
| ALWAYS_INLINE ~String() { }
|
|
|