1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

suppress specific warnings

This commit is contained in:
Neargye 2019-12-13 11:19:21 +05:00
parent 5bea6283aa
commit 70cf23a7e3

View file

@ -43,6 +43,12 @@
#include <type_traits>
#include <utility>
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 26495) // Variable 'magic_enum::detail::static_string<N>::chars' is uninitialized.
# pragma warning(disable : 26451) // Arithmetic overflow: 'indexes[static_cast<U>(value) - min_v<E>]' using operator '-' on a 4 byte value and then casting the result to a 8 byte value.
#endif
// Checks magic_enum compiler compatibility.
#if defined(__clang__) || defined(__GNUC__) && __GNUC__>= 9 || defined(_MSC_VER)
# undef MAGIC_ENUM_SUPPORTED
@ -596,4 +602,8 @@ constexpr auto operator^=(E& lhs, E rhs) noexcept -> detail::enable_if_enum_t<E,
} // namespace magic_enum
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif // NEARGYE_MAGIC_ENUM_HPP