fix: ranged_representation refactored to work with older compilers

This commit is contained in:
Mateusz Pusz
2022-04-22 13:07:01 +02:00
parent bded48987d
commit c598201d11
2 changed files with 12 additions and 15 deletions
+3 -2
View File
@@ -28,6 +28,7 @@
#include <units/isq/si/length.h>
#include <units/quantity_kind.h>
#include <limits>
#include <numbers>
#include <ostream>
// IWYU pragma: begin_exports
@@ -38,10 +39,10 @@ namespace geographic {
// TODO Change to `angle` dimension in degree unit when the work on magnitudes is done
template<typename T = double>
using latitude = units::dimensionless<units::one, ranged_representation<T, T(-90), T(90)>>;
using latitude = units::dimensionless<units::one, ranged_representation<T, -90, 90>>;
template<typename T = double>
using longitude = units::dimensionless<units::one, ranged_representation<T, T(-180), T(180)>>;
using longitude = units::dimensionless<units::one, ranged_representation<T, -180, 180>>;
template<class CharT, class Traits, typename T>
std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const latitude<T>& lat)