From 1726bb6c0decddb0fd6f6e2fc70777fcd2c59e68 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 28 Oct 2021 05:49:05 +0000 Subject: [PATCH] build(icc): fix nodiscard attribute handling --- modules/core/include/opencv2/core/cvdef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 6011b2a931..c2cdcad075 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -589,6 +589,8 @@ Cv64suf; # elif __cplusplus >= 201703L // available when compiler is C++17 compliant # define CV_NODISCARD_STD [[nodiscard]] +# elif defined(__INTEL_COMPILER) + // see above, available when C++17 is enabled # elif defined(_MSC_VER) && _MSC_VER >= 1911 && _MSVC_LANG >= 201703L // available with VS2017 v15.3+ with /std:c++17 or higher; works on functions and classes # define CV_NODISCARD_STD [[nodiscard]]