[PR] change disable error to macro

This commit is contained in:
Jonas Hoppe
2024-09-04 09:28:44 +02:00
parent 61ada08c3b
commit d1897b1fe9

View File

@@ -189,10 +189,8 @@ constexpr void handle_dynamic_spec(int& value, fmt_arg_ref<typename Context::cha
} }
} }
#ifdef _MSC_VER MP_UNITS_DIAGNOSTIC_PUSH
#pragma warning(push) MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
#pragma warning(disable : 4702)
#endif
struct width_checker { struct width_checker {
template<typename T> template<typename T>
[[nodiscard]] constexpr unsigned long long operator()(T value) const [[nodiscard]] constexpr unsigned long long operator()(T value) const
@@ -205,10 +203,7 @@ struct width_checker {
MP_UNITS_THROW(MP_UNITS_STD_FMT::format_error("width is not integer")); MP_UNITS_THROW(MP_UNITS_STD_FMT::format_error("width is not integer"));
} }
}; };
MP_UNITS_DIAGNOSTIC_POP
#ifdef _MSC_VER
#pragma warning(pop)
#endif
MP_UNITS_EXPORT_END MP_UNITS_EXPORT_END