| 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.
|
|
|