fix(example): treat_as_floating_point specified for validated_type and ranged_representation

This commit is contained in:
Mateusz Pusz
2023-09-04 12:30:14 +02:00
parent b6bc9434d0
commit d7261c8f76
2 changed files with 8 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ public:
template<typename T, auto Min, auto Max>
inline constexpr bool mp_units::is_scalar<ranged_representation<T, Min, Max>> = mp_units::is_scalar<T>;
template<typename T, auto Min, auto Max>
inline constexpr bool mp_units::treat_as_floating_point<ranged_representation<T, Min, Max>> =
mp_units::treat_as_floating_point<T>;
template<typename T, auto Min, auto Max>
struct MP_UNITS_STD_FMT::formatter<ranged_representation<T, Min, Max>> : formatter<T> {
template<typename FormatContext>

View File

@@ -104,6 +104,10 @@ public:
template<typename T, typename Validator>
inline constexpr bool mp_units::is_scalar<validated_type<T, Validator>> = mp_units::is_scalar<T>;
template<typename T, typename Validator>
inline constexpr bool mp_units::treat_as_floating_point<validated_type<T, Validator>> =
mp_units::treat_as_floating_point<T>;
template<typename CharT, typename Traits, typename T, typename Validator>
std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os,