diff --git a/test/unit_test/static/unit_test.cpp b/test/unit_test/static/unit_test.cpp index 125db502..23ca50d6 100644 --- a/test/unit_test/static/unit_test.cpp +++ b/test/unit_test/static/unit_test.cpp @@ -40,6 +40,9 @@ struct hour : named_scaled_unit { struct dim_time : base_dimension<"time", second> {}; struct kelvin : named_unit {}; +#if COMP_MSVC || COMP_GCC >= 10 +static_assert([]() { return !requires { typename prefixed_unit; }; }.template operator()()); // negative unit ratio +#endif // struct kilokelvin : prefixed_unit {}; // should not compile (prefix not allowed for this reference unit) struct metre_per_second : unit {};