From cbbf44fbbfd311a51c3e768abdadd4edb8adc219 Mon Sep 17 00:00:00 2001 From: Braxton Salyer Date: Tue, 30 Jan 2024 18:28:01 -0600 Subject: [PATCH] Suppress an MSVC warning in is_operator_able.h --- include/hyperion/mpl/type_traits/is_operator_able.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/hyperion/mpl/type_traits/is_operator_able.h b/include/hyperion/mpl/type_traits/is_operator_able.h index d93a6d2..2410bc6 100644 --- a/include/hyperion/mpl/type_traits/is_operator_able.h +++ b/include/hyperion/mpl/type_traits/is_operator_able.h @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -908,7 +909,15 @@ namespace hyperion::mpl::type_traits { template requires concepts::Dividible struct is_dividible : std::true_type { + // disable MSVC warning about unsafe usaoge of `bool` here +#if HYPERION_PLATFORM_COMPILER_IS_MSVC + _Pragma("warning( push )"); + _Pragma("warning( disable : 4804 )"); +#endif // HYPERION_PLATFORM_COMPILER_IS_MSVC using result_type = decltype(std::declval() / std::declval()); +#if HYPERION_PLATFORM_COMPILER_IS_MSVC + _Pragma("warning( pop )"); +#endif // HYPERION_PLATFORM_COMPILER_IS_MSVC }; /// @brief Value of the type trait `is_dividible` .