Allow PosixErrorOr<T> to be implicitly constructible from copyable T.

PiperOrigin-RevId: 226037787
Change-Id: I5fb5f55f68b67dd86bbff46349b46e3e8e6b9d1b
This commit is contained in:
Jamie Liu
2018-12-18 12:16:25 -08:00
committed by Shentubot
parent 3b3f026278
commit 0759f3afee
+3 -3
View File
@@ -74,9 +74,9 @@ class ABSL_MUST_USE_RESULT PosixError {
template <typename T>
class ABSL_MUST_USE_RESULT PosixErrorOr {
public:
PosixErrorOr(const PosixError& error); // NOLINT
explicit PosixErrorOr(const T& value);
PosixErrorOr(T&& value); // NOLINT
PosixErrorOr(const PosixError& error);
PosixErrorOr(const T& value);
PosixErrorOr(T&& value);
PosixErrorOr(PosixErrorOr&& other) = default;
PosixErrorOr& operator=(PosixErrorOr&& other) = default;