Skip to content

Commit

Permalink
fix: gcc-12 compilation workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Dec 4, 2024
1 parent 4f75a48 commit 7eab29c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/core/include/mp-units/framework/representation_concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,16 @@ concept ScalableWith = requires(const T v, const S s) {
};

template<typename T>
concept Scalar = (!disable_scalar<T>) && requires(const T a, const T b) {
{ -a } -> std::common_with<T>;
{ a + b } -> std::common_with<T>;
{ a - b } -> std::common_with<T>;
} && ScalableWith<T, T> && WeaklyRegular<T>;
concept Scalar = (!disable_scalar<T>) &&
requires(const T a, const T b) {
{ -a } -> std::common_with<T>;
{ a + b } -> std::common_with<T>;
{ a - b } -> std::common_with<T>;
} && ScalableWith<T, T>
#if MP_UNITS_COMP_GCC != 12
&& WeaklyRegular<T>
#endif
;

namespace real_impl {

Expand Down

0 comments on commit 7eab29c

Please sign in to comment.