diff --git a/modules/core/include/opencv2/core/cvstd_wrapper.hpp b/modules/core/include/opencv2/core/cvstd_wrapper.hpp index a65dfd4bd3..027639bb00 100644 --- a/modules/core/include/opencv2/core/cvstd_wrapper.hpp +++ b/modules/core/include/opencv2/core/cvstd_wrapper.hpp @@ -57,10 +57,12 @@ template struct has_custom_delete : public std::false_type {}; +// Force has_custom_delete to std::false_type when NVCC is compiling CUDA source files +#ifndef __CUDACC__ template struct has_custom_delete, void, T*>::value >::type > : public std::true_type {}; - +#endif template struct Ptr : public std::shared_ptr