From 240ec3a460c6a4a1005b5f4a9dd9d97eacf555f5 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 20 Oct 2021 19:58:31 +0200 Subject: [PATCH] build: CTAD for quantity is not supported by clang --- src/core/include/units/quantity.h | 2 ++ test/unit_test/static/quantity_test.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/core/include/units/quantity.h b/src/core/include/units/quantity.h index a5ebf3ce..ee879311 100644 --- a/src/core/include/units/quantity.h +++ b/src/core/include/units/quantity.h @@ -383,8 +383,10 @@ public: }; // CTAD +#if !UNITS_COMP_CLANG || UNITS_COMP_CLANG > 13 template explicit(false) quantity(Rep&&) -> quantity; +#endif template explicit(false) quantity(Rep) -> quantity; diff --git a/test/unit_test/static/quantity_test.cpp b/test/unit_test/static/quantity_test.cpp index d00d03d2..2560c142 100644 --- a/test/unit_test/static/quantity_test.cpp +++ b/test/unit_test/static/quantity_test.cpp @@ -273,8 +273,10 @@ static_assert(get_length_derived_quantity() == 1_q_m); // CTAD ///////// +#if !UNITS_COMP_CLANG || UNITS_COMP_CLANG > 13 static_assert(std::is_same_v); static_assert(std::is_same_v); +#endif static_assert(is_same_v(123)}), length>); static_assert(is_same_v(123)}), speed>);