From 1e81069d538b0fb22216d35b42b5470aa4d4ee87 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 1 Aug 2023 11:53:50 +0200 Subject: [PATCH] feat: `absolute_point_origin` convertibility removed --- example/include/geographic.h | 1 - example/unmanned_aerial_vehicle.cpp | 1 - src/core/include/mp-units/quantity_point.h | 6 ------ test/unit_test/static/concepts_test.cpp | 1 - 4 files changed, 9 deletions(-) diff --git a/example/include/geographic.h b/example/include/geographic.h index 77808181..036fda4b 100644 --- a/example/include/geographic.h +++ b/example/include/geographic.h @@ -38,7 +38,6 @@ namespace geographic { inline constexpr struct mean_sea_level : mp_units::absolute_point_origin { - using mp_units::absolute_point_origin::absolute_point_origin; } mean_sea_level; using msl_altitude = mp_units::quantity_point; diff --git a/example/unmanned_aerial_vehicle.cpp b/example/unmanned_aerial_vehicle.cpp index 435cc8f7..912effe1 100644 --- a/example/unmanned_aerial_vehicle.cpp +++ b/example/unmanned_aerial_vehicle.cpp @@ -38,7 +38,6 @@ enum class earth_gravity_model { egm84_15, egm95_5, egm2008_1 }; template struct height_above_ellipsoid_t : absolute_point_origin { static constexpr earth_gravity_model egm = M; - using absolute_point_origin::absolute_point_origin; }; template inline constexpr height_above_ellipsoid_t height_above_ellipsoid; diff --git a/src/core/include/mp-units/quantity_point.h b/src/core/include/mp-units/quantity_point.h index 76b92143..2e73f328 100644 --- a/src/core/include/mp-units/quantity_point.h +++ b/src/core/include/mp-units/quantity_point.h @@ -32,12 +32,6 @@ namespace mp_units { template struct absolute_point_origin { static constexpr QuantitySpec auto quantity_spec = Q; - absolute_point_origin() = default; - template - requires(implicitly_convertible(Q2, Q)) - consteval absolute_point_origin(absolute_point_origin) - { - } }; namespace detail { diff --git a/test/unit_test/static/concepts_test.cpp b/test/unit_test/static/concepts_test.cpp index a7b0a6da..76cb5e80 100644 --- a/test/unit_test/static/concepts_test.cpp +++ b/test/unit_test/static/concepts_test.cpp @@ -359,7 +359,6 @@ static_assert(!QuantityLike); // QuantityPoint inline constexpr struct my_origin : absolute_point_origin { - using absolute_point_origin::absolute_point_origin; } my_origin; static_assert(QuantityPoint>);