Replace naked pragmas with defines

This commit is contained in:
Soham Roy
2021-10-13 21:50:52 +00:00
committed by Mateusz Pusz
parent 7d370eb496
commit 4c9c651a9e

View File

@@ -29,9 +29,11 @@
#include <units/bits/pow.h> #include <units/bits/pow.h>
#include <cassert> #include <cassert>
#define UNITS_PRAGMA(X) _Pragma(#X)
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (push) #define UNITS_DIAGNOSTIC_PUSH UNITS_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_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 #endif //_MSC_VER
namespace units { namespace units {