Fix stack overflow on gcc with c++17 (#15343)
authorZyrin <alexis.ts@gmx.de>
Wed, 21 Aug 2019 08:57:03 +0000 (10:57 +0200)
committerZyrin <alexis.ts@gmx.de>
Wed, 21 Aug 2019 08:57:03 +0000 (10:57 +0200)
modules/core/include/opencv2/core/mat.inl.hpp

index a2e7923..d74b6e6 100644 (file)
@@ -1809,7 +1809,7 @@ Mat_<_Tp> Mat_<_Tp>::cross(const Mat_& m) const
 template<typename _Tp> template<typename T2> inline
 Mat_<_Tp>::operator Mat_<T2>() const
 {
-    return Mat_<T2>(*this);
+    return Mat_<T2>(static_cast<const Mat&>(*this));
 }
 
 template<typename _Tp> inline