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

Unified Diff: webrtc/api/rtcerror.h

Issue 2709573003: Move rtc_api_unittests into rtc_unittests. (Closed)
Patch Set: Fix Windows-specific issue. Created 3 years, 10 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 | « webrtc/api/BUILD.gn ('k') | webrtc/api/rtcerror_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcerror.h
diff --git a/webrtc/api/rtcerror.h b/webrtc/api/rtcerror.h
index 22714451b5f3239a58dfadc98e00b4d4f59f3b47..1c130c0d6e824915029389a38b97aa802bea2c77 100644
--- a/webrtc/api/rtcerror.h
+++ b/webrtc/api/rtcerror.h
@@ -233,8 +233,17 @@ class RTCErrorOr {
RTCErrorOr& operator=(const RTCErrorOr& other) = delete;
// Move constructor and move-assignment operator.
- RTCErrorOr(RTCErrorOr&& other) = default;
- RTCErrorOr& operator=(RTCErrorOr&& other) = default;
+ //
+ // Visual Studio doesn't support "= default" with move constructors or
+ // assignment operators (even though they compile, they segfault), so define
+ // them explicitly.
+ RTCErrorOr(RTCErrorOr&& other)
+ : error_(std::move(other.error_)), value_(std::move(other.value_)) {}
+ RTCErrorOr& operator=(RTCErrorOr&& other) {
+ error_ = std::move(other.error_);
+ value_ = std::move(other.value_);
+ return *this;
+ }
// Conversion constructor and assignment operator; T must be copy or move
// constructible from U.
« no previous file with comments | « webrtc/api/BUILD.gn ('k') | webrtc/api/rtcerror_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698