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 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 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 inline Point_<_Tp>::Point_(_Tp _x, _Tp _y) : x(_x), y(_y) {} +#if (defined(__GNUC__) && __GNUC__ < 5) +template inline +Point_<_Tp>::Point_(const Point_& pt) + : x(pt.x), y(pt.y) {} +#endif + template inline Point_<_Tp>::Point_(const Point_& pt) : x(pt.x), y(pt.y) {} @@ -1180,6 +1208,15 @@ template inline Point_<_Tp>::Point_(const Vec<_Tp,2>& v) : x(v[0]), y(v[1]) {} +#if (defined(__GNUC__) && __GNUC__ < 5) +template inline +Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt) +{ + x = pt.x; y = pt.y; + return *this; +} +#endif + template inline Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt) {