diff options
author | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2023-11-11 11:09:18 +0300 |
---|---|---|
committer | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2023-11-11 11:26:42 +0300 |
commit | 06107736c280cdd2762a89b2961bebebef86d336 (patch) | |
tree | 9590206e8913e7aa55c467d6e8913eb5a95f7083 | |
parent | 08d9e6eecf8a8afc3a0a5c45c7b7dce429472ae3 (diff) | |
download | ydb-06107736c280cdd2762a89b2961bebebef86d336.tar.gz |
Address issues of rXXXXXX
fixed issues
-rw-r--r-- | yt/yt/core/misc/error-inl.h | 21 | ||||
-rw-r--r-- | yt/yt/core/misc/error.h | 15 |
2 files changed, 19 insertions, 17 deletions
diff --git a/yt/yt/core/misc/error-inl.h b/yt/yt/core/misc/error-inl.h index 0750527aff..2039e94514 100644 --- a/yt/yt/core/misc/error-inl.h +++ b/yt/yt/core/misc/error-inl.h @@ -84,15 +84,15 @@ TError TError::Wrap(TArgs&&... args) && } template <CErrorNestable TValue> -TError&& TError::operator << (TValue&& operand) && +TError&& TError::operator << (TValue&& rhs) && { - return std::move(*this <<= std::forward<TValue>(operand)); + return std::move(*this <<= std::forward<TValue>(rhs)); } template <CErrorNestable TValue> -TError TError::operator << (TValue&& operand) const & +TError TError::operator << (TValue&& rhs) const & { - return TError(*this) << std::forward<TValue>(operand); + return TError(*this) << std::forward<TValue>(rhs); } //////////////////////////////////////////////////////////////////////////////// @@ -304,17 +304,18 @@ namespace NDetail { template <class TArg> requires std::constructible_from<TError, TArg> -TError TErrorAdaptor::operator << (TArg&& rightOperand) const +TError TErrorAdaptor::operator << (TArg&& rhs) const { - return TError(std::forward<TArg>(rightOperand)); + return TError(std::forward<TArg>(rhs)); } template <class TArg> - requires std::constructible_from<TError, TArg> && - std::derived_from<std::remove_cvref_t<TArg>, TError> -TArg&& TErrorAdaptor::operator << (TArg&& rightOperand) const + requires + std::constructible_from<TError, TArg> && + std::derived_from<std::remove_cvref_t<TArg>, TError> +TArg&& TErrorAdaptor::operator << (TArg&& rhs) const { - return std::forward<TArg>(rightOperand); + return std::forward<TArg>(rhs); } template <class TLikeError, class... TArgs> diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h index 11e02ba748..0716ceb461 100644 --- a/yt/yt/core/misc/error.h +++ b/yt/yt/core/misc/error.h @@ -321,20 +321,21 @@ struct TErrorAdaptor { template <class TArg> requires std::constructible_from<TError, TArg> - TError operator << (TArg&& rightOperand) const; + TError operator << (TArg&& rhs) const; template <class TArg> - requires std::constructible_from<TError, TArg> && - std::derived_from<std::remove_cvref_t<TArg>, TError> - TArg&& operator << (TArg&& rightOperand) const; + requires + std::constructible_from<TError, TArg> && + std::derived_from<std::remove_cvref_t<TArg>, TError> + TArg&& operator << (TArg&& rhs) const; }; // Make these to correctly forward TError to Wrap call. -template <class TLikeError, class... TArgs> +template <class TErrorLike, class... TArgs> requires - std::is_base_of_v<TError, std::remove_cvref_t<TLikeError>> && + std::is_base_of_v<TError, std::remove_cvref_t<TErrorLike>> && std::constructible_from<TError, TArgs...> -void ThrowErrorExceptionIfFailed(TLikeError&& error, TArgs&&... args); +void ThrowErrorExceptionIfFailed(TErrorLike&& error, TArgs&&... args); } // namespace NDetail |