From aff83b31dc56ac3d14f648bf893470a062706364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sat, 5 Sep 2020 22:39:34 -0400 Subject: [PATCH] test: codify comment --- test/unit_test/static/unit_test.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 {};