1 Star 0 Fork 23

yanhailiang / opencv

forked from src-openEuler / opencv 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix_compilation_of_copy_assignment_operators_with_GCC.patch 3.46 KB
一键复制 编辑 原始数据 按行查看 历史
shenwei41 提交于 2021-11-17 10:39 . repair clang abi
diff -Npur opencv-4.5.2/modules/core/include/opencv2/core/types.hpp opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp
--- opencv-4.5.2/modules/core/include/opencv2/core/types.hpp 2021-04-02 19:23:54.000000000 +0800
+++ opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp 2021-11-13 16:24:25.592720089 +0800
@@ -162,13 +162,23 @@ public:
//! default constructor
Point_();
Point_(_Tp _x, _Tp _y);
+#if (defined(__GNUC__) && __GNUC__ < 5)
+ Point_(const Point_& pt);
+ Point_(Point_&& pt) CV_NOEXCEPT = default;
+#elif OPENCV_ABI_COMPATIBILITY < 500
Point_(const Point_& pt);
Point_(Point_&& pt) CV_NOEXCEPT;
+#endif
Point_(const Size_<_Tp>& sz);
Point_(const Vec<_Tp, 2>& v);
+#if (defined(__GNUC__) && __GNUC__ < 5)
+ Point_& operator = (const Point_& pt);
+ Point_& operator = (Point_&& pt) CV_NOEXCEPT = default;
+#elif OPENCV_ABI_COMPATIBILITY < 500
Point_& operator = (const Point_& pt);
Point_& operator = (Point_&& pt) CV_NOEXCEPT;
+#endif
//! conversion to another data type
template<typename _Tp2> operator Point_<_Tp2>() const;
@@ -244,13 +254,17 @@ public:
//! default constructor
Point3_();
Point3_(_Tp _x, _Tp _y, _Tp _z);
+#if OPENCV_ABI_COMPATIBILITY < 500
Point3_(const Point3_& pt);
Point3_(Point3_&& pt) CV_NOEXCEPT;
+#endif
explicit Point3_(const Point_<_Tp>& pt);
Point3_(const Vec<_Tp, 3>& v);
+#if OPENCV_ABI_COMPATIBILITY < 500
Point3_& operator = (const Point3_& pt);
Point3_& operator = (Point3_&& pt) CV_NOEXCEPT;
+#endif
//! conversion to another data type
template<typename _Tp2> operator Point3_<_Tp2>() const;
//! conversion to cv::Vec<>
@@ -320,12 +334,16 @@ public:
//! default constructor
Size_();
Size_(_Tp _width, _Tp _height);
+#if OPENCV_ABI_COMPATIBILITY < 500
Size_(const Size_& sz);
Size_(Size_&& sz) CV_NOEXCEPT;
+#endif
Size_(const Point_<_Tp>& pt);
+#if OPENCV_ABI_COMPATIBILITY < 500
Size_& operator = (const Size_& sz);
Size_& operator = (Size_&& sz) CV_NOEXCEPT;
+#endif
//! the area (width*height)
_Tp area() const;
//! aspect ratio (width/height)
@@ -425,13 +443,17 @@ public:
//! default constructor
Rect_();
Rect_(_Tp _x, _Tp _y, _Tp _width, _Tp _height);
+#if OPENCV_ABI_COMPATIBILITY < 500
Rect_(const Rect_& r);
Rect_(Rect_&& r) CV_NOEXCEPT;
+#endif
Rect_(const Point_<_Tp>& org, const Size_<_Tp>& sz);
Rect_(const Point_<_Tp>& pt1, const Point_<_Tp>& pt2);
+#if OPENCV_ABI_COMPATIBILITY < 500
Rect_& operator = ( const Rect_& r );
Rect_& operator = ( Rect_&& r ) CV_NOEXCEPT;
+#endif
//! the top-left corner
Point_<_Tp> tl() const;
//! the bottom-right corner
@@ -1164,6 +1186,12 @@ template<typename _Tp> inline
Point_<_Tp>::Point_(_Tp _x, _Tp _y)
: x(_x), y(_y) {}
+#if (defined(__GNUC__) && __GNUC__ < 5)
+template<typename _Tp> inline
+Point_<_Tp>::Point_(const Point_& pt)
+ : x(pt.x), y(pt.y) {}
+#endif
+
template<typename _Tp> inline
Point_<_Tp>::Point_(const Point_& pt)
: x(pt.x), y(pt.y) {}
@@ -1180,6 +1208,15 @@ template<typename _Tp> inline
Point_<_Tp>::Point_(const Vec<_Tp,2>& v)
: x(v[0]), y(v[1]) {}
+#if (defined(__GNUC__) && __GNUC__ < 5)
+template<typename _Tp> inline
+Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt)
+{
+ x = pt.x; y = pt.y;
+ return *this;
+}
+#endif
+
template<typename _Tp> inline
Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt)
{
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yanhailiangyhl/opencv.git
git@gitee.com:yanhailiangyhl/opencv.git
yanhailiangyhl
opencv
opencv
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891