Fix clang 3.4-3.5 CE.
GitOrigin-RevId: 7273cdff1b885f5dd8889468b0391b906757c2d2
This commit is contained in:
parent
a7548d234c
commit
03bb533c07
@ -16,6 +16,7 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#define TRY_STATUS(status) \
|
#define TRY_STATUS(status) \
|
||||||
@ -327,7 +328,7 @@ class Result {
|
|||||||
public:
|
public:
|
||||||
Result() : status_(Status::Error()) {
|
Result() : status_(Status::Error()) {
|
||||||
}
|
}
|
||||||
template <class S>
|
template <class S, std::enable_if_t<!std::is_same<std::decay_t<S>, Result>::value, int> = 0>
|
||||||
Result(S &&x) : status_(), value_(std::forward<S>(x)) {
|
Result(S &&x) : status_(), value_(std::forward<S>(x)) {
|
||||||
}
|
}
|
||||||
Result(Status &&status) : status_(std::move(status)) {
|
Result(Status &&status) : status_(std::move(status)) {
|
||||||
|
Reference in New Issue
Block a user