Move rtc_api_unittests into rtc_unittests.
This avoids adding an additional test target. Plus, everything in
rtc_api_unittests is (and likely will be) simple utility classes akin to
what's already being tested in rtc_unittests.
BUG=None
TBR=kjellander@webrtc.org
Review-Url: https://codereview.webrtc.org/2709573003
Cr-Commit-Position: refs/heads/master@{#16819}
diff --git a/webrtc/api/rtcerror.h b/webrtc/api/rtcerror.h
index 2271445..1c130c0 100644
--- a/webrtc/api/rtcerror.h
+++ b/webrtc/api/rtcerror.h
@@ -233,8 +233,17 @@
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.