File tree Expand file tree Collapse file tree 7 files changed +10
-11
lines changed
src/core/include/mp-units Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ Checks: '
3030 -misc-include-cleaner,
3131 -modernize-use-trailing-return-type,
3232 -modernize-use-designated-initializers,
33+ -portability-avoid-pragma-once,
3334 -readability-identifier-length,
3435 -readability-isolate-declaration,
3536 -readability-magic-numbers,
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class inplace_vector {
7676 constexpr const_reverse_iterator crbegin () const noexcept { return const_reverse_iterator (cend ()); }
7777 constexpr const_reverse_iterator crend () const noexcept { return const_reverse_iterator (cbegin ()); }
7878
79- [[nodiscard]] constexpr bool empty () const noexcept { return size () == 0 ; };
79+ [[nodiscard]] constexpr bool empty () const noexcept { return size () == 0 ; }
8080 [[nodiscard]] constexpr size_type size () const noexcept { return size_; }
8181 [[nodiscard]] static constexpr size_type max_size () noexcept { return N; }
8282 [[nodiscard]] static constexpr size_type capacity () noexcept { return N; }
Original file line number Diff line number Diff line change 4343#ifdef MP_UNITS_IMPORT_STD
4444import std;
4545#else
46- #include < array>
4746#include < cstdint>
4847#include < iterator>
4948#include < string_view>
@@ -69,13 +68,13 @@ struct dimension_interface {
6968 template <Dimension Lhs, Dimension Rhs>
7069 [[nodiscard]] friend consteval Dimension auto operator *(Lhs, Rhs)
7170 {
72- return expr_multiply<derived_dimension, struct dimension_one >(Lhs{}, Rhs{});
71+ return expr_multiply<derived_dimension, dimension_one>(Lhs{}, Rhs{});
7372 }
7473
7574 template <Dimension Lhs, Dimension Rhs>
7675 [[nodiscard]] friend consteval Dimension auto operator /(Lhs, Rhs)
7776 {
78- return expr_divide<derived_dimension, struct dimension_one >(Lhs{}, Rhs{});
77+ return expr_divide<derived_dimension, dimension_one>(Lhs{}, Rhs{});
7978 }
8079
8180 template <Dimension Lhs, Dimension Rhs>
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ import std;
4646#include < concepts>
4747#include < cstdint>
4848#include < optional>
49- #include < tuple>
5049#include < type_traits>
5150#endif
5251#endif
@@ -181,15 +180,15 @@ struct quantity_spec_interface_base {
181180 [[nodiscard]] friend consteval QuantitySpec auto operator *(Lhs lhs, Rhs rhs)
182181 {
183182 return detail::clone_kind_of<Lhs{}, Rhs{}>(
184- detail::expr_multiply<derived_quantity_spec, struct dimensionless , type_list_of_quantity_spec_less>(
183+ detail::expr_multiply<derived_quantity_spec, dimensionless, type_list_of_quantity_spec_less>(
185184 detail::remove_kind (lhs), detail::remove_kind (rhs)));
186185 }
187186
188187 template <QuantitySpec Lhs, QuantitySpec Rhs>
189188 [[nodiscard]] friend consteval QuantitySpec auto operator /(Lhs lhs, Rhs rhs)
190189 {
191190 return detail::clone_kind_of<Lhs{}, Rhs{}>(
192- detail::expr_divide<derived_quantity_spec, struct dimensionless , type_list_of_quantity_spec_less>(
191+ detail::expr_divide<derived_quantity_spec, dimensionless, type_list_of_quantity_spec_less>(
193192 detail::remove_kind (lhs), detail::remove_kind (rhs)));
194193 }
195194
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ constexpr bool is_basic_literal_character_set_char(char ch)
6161{
6262 // https://en.cppreference.com/w/cpp/language/charset
6363 return ch == 0x00 || (0x07 <= ch && ch <= 0x0D ) || (0x20 <= ch && ch <= 0x7E );
64- };
64+ }
6565
6666template <typename InputIt>
6767constexpr bool is_basic_literal_character_set (InputIt begin, InputIt end) noexcept
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ template<typename T>
161161 return T::exponent;
162162 else
163163 return ratio{1 };
164- };
164+ }
165165
166166template <SymbolicArg T, ratio R>
167167[[nodiscard]] consteval auto power_or_T_impl ()
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ struct unit_interface {
184184 template <Unit Lhs, Unit Rhs>
185185 [[nodiscard]] friend MP_UNITS_CONSTEVAL Unit auto operator *(Lhs lhs, Rhs rhs)
186186 {
187- return expr_multiply<derived_unit, struct one >(lhs, rhs);
187+ return expr_multiply<derived_unit, one>(lhs, rhs);
188188 }
189189
190190 /* *
@@ -195,7 +195,7 @@ struct unit_interface {
195195 template <Unit Lhs, Unit Rhs>
196196 [[nodiscard]] friend MP_UNITS_CONSTEVAL Unit auto operator /(Lhs lhs, Rhs rhs)
197197 {
198- return expr_divide<derived_unit, struct one >(lhs, rhs);
198+ return expr_divide<derived_unit, one>(lhs, rhs);
199199 }
200200
201201 template <Unit Lhs, Unit Rhs>
You can’t perform that action at this time.
0 commit comments