From 70cbc3d8832913c650461b3860e561d0570c6996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 29 Jan 2020 02:39:33 +0100 Subject: [PATCH] cvdef.h: Don't use C's limits.h under C++ Just like with the other headers in the rest of the file. See e.g. https://stackoverflow.com/questions/36831465/what-difference-does-it-make-when-i-include-limits-or-limits-h-in-my-c-cod for the reasons, the most important one being that limits.h does not respect namespaces, which can make problems for downstream consumers of cvdef.h. --- modules/core/include/opencv2/core/cvdef.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 787be9e730..28a5187b17 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -181,7 +181,12 @@ namespace cv { #undef abs #undef Complex +#if defined __cplusplus +#include +#else #include +#endif + #include "opencv2/core/hal/interface.h" #if defined __ICL