Skip to content

Commit

Permalink
style: clang-format updated to 17.0.5 in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Nov 28, 2023
1 parent c98090f commit 683c49b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.3
rev: v17.0.5
hooks:
- id: clang-format
- repo: https://github.com/cheshirekow/cmake-format-precommit
Expand Down
18 changes: 9 additions & 9 deletions src/core/include/mp-units/quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class quantity {
}

template<typename Q>
friend constexpr decltype(auto) operator++(Q && q)
friend constexpr decltype(auto) operator++(Q&& q)
requires std::derived_from<std::remove_cvref_t<Q>, quantity> && requires(rep v) {
{
++v
Expand All @@ -288,7 +288,7 @@ class quantity {
}

template<typename Q>
friend constexpr decltype(auto) operator--(Q && q)
friend constexpr decltype(auto) operator--(Q&& q)
requires std::derived_from<std::remove_cvref_t<Q>, quantity> && requires(rep v) {
{
--v
Expand Down Expand Up @@ -316,7 +316,7 @@ class quantity {
a += b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator+=(Q && lhs, const quantity & rhs)
friend constexpr decltype(auto) operator+=(Q&& lhs, const quantity& rhs)
{
lhs.numerical_value_is_an_implementation_detail_ += rhs.numerical_value_is_an_implementation_detail_;
return std::forward<Q>(lhs);
Expand All @@ -328,7 +328,7 @@ class quantity {
a -= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator-=(Q && lhs, const quantity & rhs)
friend constexpr decltype(auto) operator-=(Q&& lhs, const quantity& rhs)
{
lhs.numerical_value_is_an_implementation_detail_ -= rhs.numerical_value_is_an_implementation_detail_;
return std::forward<Q>(lhs);
Expand All @@ -341,7 +341,7 @@ class quantity {
a %= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator%=(Q && lhs, const quantity & rhs)
friend constexpr decltype(auto) operator%=(Q&& lhs, const quantity& rhs)

{
gsl_ExpectsAudit(rhs != zero());
Expand All @@ -356,7 +356,7 @@ class quantity {
a *= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator*=(Q && lhs, const Value & v)
friend constexpr decltype(auto) operator*=(Q&& lhs, const Value& v)
{
lhs.numerical_value_is_an_implementation_detail_ *= v;
return std::forward<Q>(lhs);
Expand All @@ -369,7 +369,7 @@ class quantity {
a *= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator*=(Q1 && lhs, const Q2 & rhs)
friend constexpr decltype(auto) operator*=(Q1&& lhs, const Q2& rhs)
{
lhs.numerical_value_is_an_implementation_detail_ *= rhs.numerical_value_is_an_implementation_detail_;
return std::forward<Q1>(lhs);
Expand All @@ -382,7 +382,7 @@ class quantity {
a /= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator/=(Q && lhs, const Value & v)
friend constexpr decltype(auto) operator/=(Q&& lhs, const Value& v)
{
gsl_ExpectsAudit(v != quantity_values<Value>::zero());
lhs.numerical_value_is_an_implementation_detail_ /= v;
Expand All @@ -396,7 +396,7 @@ class quantity {
a /= b
} -> std::same_as<rep&>;
}
friend constexpr decltype(auto) operator/=(Q1 && lhs, const Q2 & rhs)
friend constexpr decltype(auto) operator/=(Q1&& lhs, const Q2& rhs)
{
gsl_ExpectsAudit(rhs != rhs.zero());
lhs.numerical_value_is_an_implementation_detail_ /= rhs.numerical_value_is_an_implementation_detail_;
Expand Down
8 changes: 4 additions & 4 deletions src/core/include/mp-units/quantity_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class quantity_point {

// member unary operators
template<typename QP>
friend constexpr decltype(auto) operator++(QP && qp)
friend constexpr decltype(auto) operator++(QP&& qp)
requires std::derived_from<std::remove_cvref_t<QP>, quantity_point> &&
requires { ++qp.quantity_from_origin_is_an_implementation_detail_; }
{
Expand All @@ -256,7 +256,7 @@ class quantity_point {
}

template<typename QP>
friend constexpr decltype(auto) operator--(QP && qp)
friend constexpr decltype(auto) operator--(QP&& qp)
requires std::derived_from<std::remove_cvref_t<QP>, quantity_point> &&
requires { --qp.quantity_from_origin_is_an_implementation_detail_; }
{
Expand All @@ -274,7 +274,7 @@ class quantity_point {
template<typename QP>
requires std::derived_from<std::remove_cvref_t<QP>, quantity_point> &&
requires(quantity_type q) { quantity_from_origin_is_an_implementation_detail_ += q; }
friend constexpr decltype(auto) operator+=(QP && qp, const quantity_type & q)
friend constexpr decltype(auto) operator+=(QP&& qp, const quantity_type& q)
{
qp.quantity_from_origin_is_an_implementation_detail_ += q;
return std::forward<QP>(qp);
Expand All @@ -283,7 +283,7 @@ class quantity_point {
template<typename QP>
requires std::derived_from<std::remove_cvref_t<QP>, quantity_point> &&
requires(quantity_type q) { quantity_from_origin_is_an_implementation_detail_ -= q; }
friend constexpr decltype(auto) operator-=(QP && qp, const quantity_type & q)
friend constexpr decltype(auto) operator-=(QP&& qp, const quantity_type& q)
{
qp.quantity_from_origin_is_an_implementation_detail_ -= q;
return std::forward<QP>(qp);
Expand Down

0 comments on commit 683c49b

Please sign in to comment.