@@ -37,13 +37,14 @@ class PAIMON_MUST_USE_TYPE PAIMON_EXPORT Result {
3737 status_.~Status ();
3838 }
3939
40+ // NOLINTBEGIN(google-explicit-constructor, runtime/explicit)
4041 // / Construct a successful result with a copy of the given value.
4142 // / @param data The value to store in result.
42- Result (const T& data) : status_(), data_(data) {} // NOLINT(runtime/explicit)
43+ Result (const T& data) : status_(), data_(data) {}
4344
4445 // / Construct a successful result by moving the given value.
4546 // / @param data The value to move into result.
46- Result (T&& data) : status_(), data_(std::move(data)) {} // NOLINT(runtime/explicit)
47+ Result (T&& data) : status_(), data_(std::move(data)) {}
4748
4849 // / Template constructor for converting compatible pointer types.
4950 // / Support T = std::unique_ptr<B> and U = std::unique_ptr<D> convert, where D is derived class
@@ -53,11 +54,12 @@ class PAIMON_MUST_USE_TYPE PAIMON_EXPORT Result {
5354 std::enable_if_t <
5455 is_pointer<U>::value && is_pointer<T>::value &&
5556 std::is_convertible_v<value_type_traits_t <U>, value_type_traits_t <T>>>* = nullptr >
56- Result (U&& data) : status_(), data_(std::move(data)) {} // NOLINT(runtime/explicit)
57+ Result (U&& data) : status_(), data_(std::move(data)) {}
5758
5859 // / Construct a failed result with the given status.
5960 // / @param status The status object describing the error.
60- Result (const Status& status) : status_(status) {} // NOLINT(runtime/explicit)
61+ Result (const Status& status) : status_(status) {}
62+ // NOLINTEND(google-explicit-constructor, runtime/explicit)
6163
6264 // / Copy constructor.
6365 // / @param other The result to copy from.
@@ -79,20 +81,22 @@ class PAIMON_MUST_USE_TYPE PAIMON_EXPORT Result {
7981 MakeStatus (other.status_ );
8082 }
8183
84+ // NOLINTBEGIN(google-explicit-constructor, runtime/explicit)
8285 // / Template move constructor for converting compatible `Result` types.
8386 // / @param other The result to move from.
8487 template <typename U,
8588 std::enable_if_t <
8689 is_pointer<U>::value && is_pointer<T>::value &&
8790 std::is_convertible_v<value_type_traits_t <U>, value_type_traits_t <T>>>* = nullptr >
88- Result (Result<U>&& other) noexcept { // NOLINT(runtime/explicit)
91+ Result (Result<U>&& other) noexcept {
8992 if (other.ok ()) {
9093 MakeValue (std::move (other).value ());
9194 }
9295 // If we moved the status, the other status may become ok but the other
9396 // value hasn't been constructed => crash on other destructor.
9497 MakeStatus (other.status ());
9598 }
99+ // NOLINTEND(google-explicit-constructor, runtime/explicit)
96100
97101 // / Copy assignment operator.
98102 // / @param other The result to copy from.
0 commit comments