From 2dc420c50526933438e03f7ca8a1f3483d6cb876 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 8 Jun 2023 22:19:34 +0200 Subject: [PATCH] fix: new quantity creation policy for irrational magnitudes forbids creation of `longitude` and `latitude` with an integral representation --- example/include/geographic.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/example/include/geographic.h b/example/include/geographic.h index c9c55dc7..d303f0a1 100644 --- a/example/include/geographic.h +++ b/example/include/geographic.h @@ -105,26 +105,6 @@ constexpr longitude operator"" _W(long double v) { return longitude{-v * mp_units::si::degree}; } -constexpr latitude operator"" _N(unsigned long long v) -{ - gsl_ExpectsAudit(std::in_range(v)); - return latitude{static_cast(v) * mp_units::si::degree}; -} -constexpr latitude operator"" _S(unsigned long long v) -{ - gsl_ExpectsAudit(std::in_range(v)); - return latitude{-static_cast(v) * mp_units::si::degree}; -} -constexpr longitude operator"" _E(unsigned long long v) -{ - gsl_ExpectsAudit(std::in_range(v)); - return longitude{static_cast(v) * mp_units::si::degree}; -} -constexpr longitude operator"" _W(unsigned long long v) -{ - gsl_ExpectsAudit(std::in_range(v)); - return longitude{-static_cast(v) * mp_units::si::degree}; -} } // namespace literals