diff --git a/include/fc/time.hpp b/include/fc/time.hpp index f2e4024..c5ae58a 100644 --- a/include/fc/time.hpp +++ b/include/fc/time.hpp @@ -3,8 +3,10 @@ #include #include -#pragma warning (push) -#pragma warning (disable : 4244) +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable : 4244) +#endif //// _MSC_VER namespace fc { class microseconds { @@ -91,5 +93,6 @@ namespace fc { typedef fc::optional otime_point; } -#pragma warning (pop) - +#ifdef _MSC_VER + #pragma warning (pop) +#endif /// #ifdef _MSC_VER diff --git a/include/fc/uint128.hpp b/include/fc/uint128.hpp index 0577e3c..aab14f2 100644 --- a/include/fc/uint128.hpp +++ b/include/fc/uint128.hpp @@ -2,8 +2,10 @@ #include #include -#pragma warning (push) -#pragma warning (disable : 4244) +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable : 4244) +#endif //// _MSC_VER namespace fc { @@ -114,5 +116,6 @@ namespace std }; } -#pragma warning (pop) - +#ifdef _MSC_VER + #pragma warning (pop) +#endif ///_MSC_VER diff --git a/include/fc/utility.hpp b/include/fc/utility.hpp index 0c6c77e..098d9d0 100644 --- a/include/fc/utility.hpp +++ b/include/fc/utility.hpp @@ -59,3 +59,7 @@ namespace fc { a = fc::move(b); b = fc::move(tmp); } + +#define LLCONST(constant) static_cast(constant##ll) +#define ULLCONST(constant) static_cast(constant##ull) +