diff --git a/src/core/include/units/quantity_cast.h b/src/core/include/units/quantity_cast.h index 1472b701..9c6d218a 100644 --- a/src/core/include/units/quantity_cast.h +++ b/src/core/include/units/quantity_cast.h @@ -29,9 +29,11 @@ #include #include +#define UNITS_PRAGMA(X) _Pragma(#X) #ifdef _MSC_VER -#pragma warning (push) -#pragma warning (disable:4244) // warning C4244: 'argument': conversion from 'intmax_t' to 'T', possible loss of data with T=int +#define UNITS_DIAGNOSTIC_PUSH UNITS_PRAGMA(warning(push)) +#define UNITS_DIAGNOSTIC_IGNORE_LOSSY_CONVERSION UNITS_PRAGMA(warning(disable : 4244)) +// warning C4244: 'argument': conversion from 'intmax_t' to 'T', possible loss of data with T=int #endif //_MSC_VER namespace units {