Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: webrtc/base/optional.h

Issue 1891483006: We no longer use compilers that can't =default move construction and assignment (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/optional.h
diff --git a/webrtc/base/optional.h b/webrtc/base/optional.h
index b8071e635876b1b42b4bb7d6b6c10b417d25ad7e..f25086569cbad3cb413488c7bdced19e6cf12816 100644
--- a/webrtc/base/optional.h
+++ b/webrtc/base/optional.h
@@ -69,19 +69,12 @@ class Optional final {
explicit Optional(T&& val) : value_(std::move(val)), has_value_(true) {}
// Copy and move constructors.
- // TODO(kwiberg): =default the move constructor when MSVC supports it.
Optional(const Optional&) = default;
- Optional(Optional&& m)
- : value_(std::move(m.value_)), has_value_(m.has_value_) {}
+ Optional(Optional&&) = default;
// Assignment.
- // TODO(kwiberg): =default the move assignment op when MSVC supports it.
Optional& operator=(const Optional&) = default;
- Optional& operator=(Optional&& m) {
- value_ = std::move(m.value_);
- has_value_ = m.has_value_;
- return *this;
- }
+ Optional& operator=(Optional&&) = default;
friend void swap(Optional& m1, Optional& m2) {
using std::swap;
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698