diff --git a/tensorflow/core/platform/tstring.h b/tensorflow/core/platform/tstring.h index bdde9553c9f..64a7a2d8a6d 100644 --- a/tensorflow/core/platform/tstring.h +++ b/tensorflow/core/platform/tstring.h @@ -49,9 +49,9 @@ class tstring { std::string str_; public: - tstring() : str_() {} + tstring() = default; - tstring(const tstring& str) = default; + tstring(const tstring&) = default; tstring(const std::string& str) : str_(str) {} @@ -63,7 +63,9 @@ class tstring { std::is_same::value, T>> explicit tstring(const T& str) : str_(str.data(), str.size()) {} - ~tstring() {} + tstring(tstring&&) noexcept = default; + + ~tstring() = default; tstring& operator=(const tstring& str) = default; @@ -87,6 +89,8 @@ class tstring { return *this; } + tstring& operator=(tstring&&) noexcept = default; + bool operator<(const tstring& o) const { return str_ < o.str_; } bool operator>(const tstring& o) const { return str_ > o.str_; }