diff --git a/src/core/include/mp-units/ext/type_traits.h b/src/core/include/mp-units/ext/type_traits.h index a31b7214..25b47e95 100644 --- a/src/core/include/mp-units/ext/type_traits.h +++ b/src/core/include/mp-units/ext/type_traits.h @@ -136,7 +136,7 @@ concept one_of = (false || ... || std::same_as); template [[nodiscard]] consteval bool contains() { - return (false || ... || is_same_v); + return (false || ... || is_same_v); } template typename T, typename... Ts> @@ -160,7 +160,7 @@ template auto V> template [[nodiscard]] consteval auto get() { - if constexpr (is_same_v) + if constexpr (is_same_v) return V1; else return get(); diff --git a/src/core/include/mp-units/framework/quantity_point.h b/src/core/include/mp-units/framework/quantity_point.h index 818eea6c..24eb9957 100644 --- a/src/core/include/mp-units/framework/quantity_point.h +++ b/src/core/include/mp-units/framework/quantity_point.h @@ -386,7 +386,7 @@ explicit( template // TODO simplify when gcc catches up - requires ReferenceOf + requires ReferenceOf [[nodiscard]] constexpr QuantityPoint auto operator+(const quantity_point& qp, const quantity& q) requires requires { qp.quantity_ref_from(PO1) + q; } @@ -399,7 +399,7 @@ template template // TODO simplify when gcc catches up - requires ReferenceOf + requires ReferenceOf [[nodiscard]] constexpr QuantityPoint auto operator+(const quantity& q, const quantity_point& qp) requires requires { q + qp.quantity_ref_from(PO2); } @@ -423,7 +423,7 @@ template template // TODO simplify when gcc catches up - requires ReferenceOf + requires ReferenceOf [[nodiscard]] constexpr QuantityPoint auto operator-(const quantity_point& qp, const quantity& q) requires requires { qp.quantity_ref_from(PO1) - q; } diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index 1d16b67e..80ae5d79 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -483,7 +483,7 @@ struct kind_of_ : quantity_spec, Q{}> { MP_UNITS_EXPORT template requires(detail::get_kind_tree_root(Q) == Q) -inline constexpr kind_of_ kind_of; +inline constexpr kind_of_ kind_of; namespace detail { @@ -493,7 +493,7 @@ struct is_dimensionless : std::true_type {}; template [[nodiscard]] consteval QuantitySpec auto clone_kind_of(Q q) { - if constexpr ((... && QuantityKindSpec)) + if constexpr ((... && QuantityKindSpec)) return kind_of; else return q; diff --git a/src/core/include/mp-units/framework/reference.h b/src/core/include/mp-units/framework/reference.h index 6bd334e2..746abb44 100644 --- a/src/core/include/mp-units/framework/reference.h +++ b/src/core/include/mp-units/framework/reference.h @@ -38,7 +38,7 @@ namespace mp_units { namespace detail { template -using reference_t = reference; +using reference_t = reference; } @@ -258,13 +258,13 @@ MP_UNITS_EXPORT_END namespace detail { template -[[nodiscard]] consteval decltype(To) clone_reference_with(From) +[[nodiscard]] consteval MP_UNITS_REMOVE_CONST(decltype(To)) clone_reference_with(From) { return {}; } template -[[nodiscard]] consteval reference clone_reference_with(reference) +[[nodiscard]] consteval reference clone_reference_with(reference) { return {}; } diff --git a/src/core/include/mp-units/framework/system_reference.h b/src/core/include/mp-units/framework/system_reference.h index 0bfcabae..bfc4b81a 100644 --- a/src/core/include/mp-units/framework/system_reference.h +++ b/src/core/include/mp-units/framework/system_reference.h @@ -68,9 +68,9 @@ struct system_reference { template requires(convertible(coherent_unit, U{})) #if MP_UNITS_COMP_MSVC - [[nodiscard]] constexpr decltype(reference{}) operator[](U) const + [[nodiscard]] constexpr decltype(reference{}) operator[](U) const #else - [[nodiscard]] constexpr reference operator[](U) const + [[nodiscard]] constexpr reference operator[](U) const #endif { return {}; diff --git a/src/systems/include/mp-units/systems/iec80000/binary_prefixes.h b/src/systems/include/mp-units/systems/iec80000/binary_prefixes.h index 921ab90b..1f2e9660 100644 --- a/src/systems/include/mp-units/systems/iec80000/binary_prefixes.h +++ b/src/systems/include/mp-units/systems/iec80000/binary_prefixes.h @@ -42,14 +42,14 @@ template struct yobi_ : prefixed_unit<"Yi", mag_power<2, 80>, MP_UNITS_EXPORT_BEGIN -template inline constexpr kibi_ kibi; -template inline constexpr mebi_ mebi; -template inline constexpr gibi_ gibi; -template inline constexpr tebi_ tebi; -template inline constexpr pebi_ pebi; -template inline constexpr exbi_ exbi; -template inline constexpr zebi_ zebi; -template inline constexpr yobi_ yobi; +template inline constexpr kibi_ kibi; +template inline constexpr mebi_ mebi; +template inline constexpr gibi_ gibi; +template inline constexpr tebi_ tebi; +template inline constexpr pebi_ pebi; +template inline constexpr exbi_ exbi; +template inline constexpr zebi_ zebi; +template inline constexpr yobi_ yobi; // clang-format on MP_UNITS_EXPORT_END diff --git a/src/systems/include/mp-units/systems/si/prefixes.h b/src/systems/include/mp-units/systems/si/prefixes.h index fa7bbf1f..0aac147b 100644 --- a/src/systems/include/mp-units/systems/si/prefixes.h +++ b/src/systems/include/mp-units/systems/si/prefixes.h @@ -58,30 +58,30 @@ template struct quetta_ : prefixed_unit<"Q", mag_power<10, 30> MP_UNITS_EXPORT_BEGIN -template inline constexpr quecto_ quecto; -template inline constexpr ronto_ ronto; -template inline constexpr yocto_ yocto; -template inline constexpr zepto_ zepto; -template inline constexpr atto_ atto; -template inline constexpr femto_ femto; -template inline constexpr pico_ pico; -template inline constexpr nano_ nano; -template inline constexpr micro_ micro; -template inline constexpr milli_ milli; -template inline constexpr centi_ centi; -template inline constexpr deci_ deci; -template inline constexpr deca_ deca; -template inline constexpr hecto_ hecto; -template inline constexpr kilo_ kilo; -template inline constexpr mega_ mega; -template inline constexpr giga_ giga; -template inline constexpr tera_ tera; -template inline constexpr peta_ peta; -template inline constexpr exa_ exa; -template inline constexpr zetta_ zetta; -template inline constexpr yotta_ yotta; -template inline constexpr ronna_ ronna; -template inline constexpr quetta_ quetta; +template inline constexpr quecto_ quecto; +template inline constexpr ronto_ ronto; +template inline constexpr yocto_ yocto; +template inline constexpr zepto_ zepto; +template inline constexpr atto_ atto; +template inline constexpr femto_ femto; +template inline constexpr pico_ pico; +template inline constexpr nano_ nano; +template inline constexpr micro_ micro; +template inline constexpr milli_ milli; +template inline constexpr centi_ centi; +template inline constexpr deci_ deci; +template inline constexpr deca_ deca; +template inline constexpr hecto_ hecto; +template inline constexpr kilo_ kilo; +template inline constexpr mega_ mega; +template inline constexpr giga_ giga; +template inline constexpr tera_ tera; +template inline constexpr peta_ peta; +template inline constexpr exa_ exa; +template inline constexpr zetta_ zetta; +template inline constexpr yotta_ yotta; +template inline constexpr ronna_ ronna; +template inline constexpr quetta_ quetta; // clang-format on MP_UNITS_EXPORT_END diff --git a/test/static/test_tools.h b/test/static/test_tools.h index bb98deb8..5fefba7b 100644 --- a/test/static/test_tools.h +++ b/test/static/test_tools.h @@ -27,7 +27,7 @@ #include template -inline constexpr bool is_of_type = std::is_same_v; +inline constexpr bool is_of_type = std::is_same_v; // NOLINTBEGIN(cppcoreguidelines-macro-usage) #ifdef MP_UNITS_API_NO_CRTP