diff --git a/modules/core/include/opencv2/core/types_c.h b/modules/core/include/opencv2/core/types_c.h index 9ee8c9d2b6..d4216e0df4 100644 --- a/modules/core/include/opencv2/core/types_c.h +++ b/modules/core/include/opencv2/core/types_c.h @@ -1353,7 +1353,7 @@ CvSlice; CV_INLINE CvSlice cvSlice( int start, int end ) { -#if !(defined(CV__ENABLE_C_API_CTORS) && defined(__cplusplus)) +#if !(defined(CV__ENABLE_C_API_CTORS) && defined(__cplusplus) && !defined(__CUDACC__)) CvSlice slice = { start, end }; #else CvSlice slice(start, end);