From ce02821e148f88df931101882249d68b88cb11ac Mon Sep 17 00:00:00 2001 From: Dmitriy Sobolev Date: Mon, 17 Feb 2025 17:20:33 +0000 Subject: [PATCH] Silence negators deprecation warnings --- include/oneapi/dpl/functional | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/oneapi/dpl/functional b/include/oneapi/dpl/functional index 825d4d94a39..a01d9ad2517 100644 --- a/include/oneapi/dpl/functional +++ b/include/oneapi/dpl/functional @@ -17,7 +17,18 @@ #define _ONEDPL_FUNCTIONAL #include "oneapi/dpl/internal/common_config.h" + +// Silence the deprecation warnings of the negators injected from +// The macro definition is contained in this header to avoid redefinition errors on the user side +#if _ONEDPL___cplusplus < 202002L && defined(_MSC_VER) && !defined(_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING) +# define _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING +# define _ONEDPL_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING +#endif #include +#if defined(_ONEDPL_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING) +# undef _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING +# undef _ONEDPL_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING +#endif #include "oneapi/dpl/utility"