@@ -162,13 +162,13 @@ template<typename _Tp> class Point_
162162 // ! default constructor
163163 Point_ ();
164164 Point_ (_Tp _x, _Tp _y);
165- Point_ (const Point_& pt);
166- Point_ (Point_&& pt) CV_NOEXCEPT;
165+ Point_ (const Point_& pt) = default ;
166+ Point_ (Point_&& pt) CV_NOEXCEPT = default ;
167167 Point_ (const Size_<_Tp>& sz);
168168 Point_ (const Vec<_Tp, 2 >& v);
169169
170- Point_& operator = (const Point_& pt);
171- Point_& operator = (Point_&& pt) CV_NOEXCEPT;
170+ Point_& operator = (const Point_& pt) = default ;
171+ Point_& operator = (Point_&& pt) CV_NOEXCEPT = default ;
172172 // ! conversion to another data type
173173 template <typename _Tp2> operator Point_<_Tp2>() const ;
174174
@@ -244,13 +244,13 @@ template<typename _Tp> class Point3_
244244 // ! default constructor
245245 Point3_ ();
246246 Point3_ (_Tp _x, _Tp _y, _Tp _z);
247- Point3_ (const Point3_& pt);
248- Point3_ (Point3_&& pt) CV_NOEXCEPT;
247+ Point3_ (const Point3_& pt) = default ;
248+ Point3_ (Point3_&& pt) CV_NOEXCEPT = default ;
249249 explicit Point3_ (const Point_<_Tp>& pt);
250250 Point3_ (const Vec<_Tp, 3 >& v);
251251
252- Point3_& operator = (const Point3_& pt);
253- Point3_& operator = (Point3_&& pt) CV_NOEXCEPT;
252+ Point3_& operator = (const Point3_& pt) = default ;
253+ Point3_& operator = (Point3_&& pt) CV_NOEXCEPT = default ;
254254 // ! conversion to another data type
255255 template <typename _Tp2> operator Point3_<_Tp2>() const ;
256256 // ! conversion to cv::Vec<>
@@ -320,12 +320,12 @@ template<typename _Tp> class Size_
320320 // ! default constructor
321321 Size_ ();
322322 Size_ (_Tp _width, _Tp _height);
323- Size_ (const Size_& sz);
324- Size_ (Size_&& sz) CV_NOEXCEPT;
323+ Size_ (const Size_& sz) = default ;
324+ Size_ (Size_&& sz) CV_NOEXCEPT = default ;
325325 Size_ (const Point_<_Tp>& pt);
326326
327- Size_& operator = (const Size_& sz);
328- Size_& operator = (Size_&& sz) CV_NOEXCEPT;
327+ Size_& operator = (const Size_& sz) = default ;
328+ Size_& operator = (Size_&& sz) CV_NOEXCEPT = default ;
329329 // ! the area (width*height)
330330 _Tp area () const ;
331331 // ! aspect ratio (width/height)
@@ -425,13 +425,13 @@ template<typename _Tp> class Rect_
425425 // ! default constructor
426426 Rect_ ();
427427 Rect_ (_Tp _x, _Tp _y, _Tp _width, _Tp _height);
428- Rect_ (const Rect_& r);
429- Rect_ (Rect_&& r) CV_NOEXCEPT;
428+ Rect_ (const Rect_& r) = default ;
429+ Rect_ (Rect_&& r) CV_NOEXCEPT = default ;
430430 Rect_ (const Point_<_Tp>& org, const Size_<_Tp>& sz);
431431 Rect_ (const Point_<_Tp>& pt1, const Point_<_Tp>& pt2);
432432
433- Rect_& operator = ( const Rect_& r ) ;
434- Rect_& operator = ( Rect_&& r ) CV_NOEXCEPT;
433+ Rect_& operator = (const Rect_& r) = default ;
434+ Rect_& operator = (Rect_&& r) CV_NOEXCEPT = default ;
435435 // ! the top-left corner
436436 Point_<_Tp> tl () const ;
437437 // ! the bottom-right corner
@@ -1164,14 +1164,6 @@ template<typename _Tp> inline
11641164Point_<_Tp>::Point_(_Tp _x, _Tp _y)
11651165 : x(_x), y(_y) {}
11661166
1167- template <typename _Tp> inline
1168- Point_<_Tp>::Point_(const Point_& pt)
1169- : x(pt.x), y(pt.y) {}
1170-
1171- template <typename _Tp> inline
1172- Point_<_Tp>::Point_(Point_&& pt) CV_NOEXCEPT
1173- : x(std::move(pt.x)), y(std::move(pt.y)) {}
1174-
11751167template <typename _Tp> inline
11761168Point_<_Tp>::Point_(const Size_<_Tp>& sz)
11771169 : x(sz.width), y(sz.height) {}
@@ -1180,20 +1172,6 @@ template<typename _Tp> inline
11801172Point_<_Tp>::Point_(const Vec<_Tp,2 >& v)
11811173 : x(v[0 ]), y(v[1 ]) {}
11821174
1183- template <typename _Tp> inline
1184- Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt)
1185- {
1186- x = pt.x ; y = pt.y ;
1187- return *this ;
1188- }
1189-
1190- template <typename _Tp> inline
1191- Point_<_Tp>& Point_<_Tp>::operator = (Point_&& pt) CV_NOEXCEPT
1192- {
1193- x = std::move (pt.x ); y = std::move (pt.y );
1194- return *this ;
1195- }
1196-
11971175template <typename _Tp> template <typename _Tp2> inline
11981176Point_<_Tp>::operator Point_<_Tp2>() const
11991177{
@@ -1431,14 +1409,6 @@ template<typename _Tp> inline
14311409Point3_<_Tp>::Point3_(_Tp _x, _Tp _y, _Tp _z)
14321410 : x(_x), y(_y), z(_z) {}
14331411
1434- template <typename _Tp> inline
1435- Point3_<_Tp>::Point3_(const Point3_& pt)
1436- : x(pt.x), y(pt.y), z(pt.z) {}
1437-
1438- template <typename _Tp> inline
1439- Point3_<_Tp>::Point3_(Point3_&& pt) CV_NOEXCEPT
1440- : x(std::move(pt.x)), y(std::move(pt.y)), z(std::move(pt.z)) {}
1441-
14421412template <typename _Tp> inline
14431413Point3_<_Tp>::Point3_(const Point_<_Tp>& pt)
14441414 : x(pt.x), y(pt.y), z(_Tp()) {}
@@ -1459,20 +1429,6 @@ Point3_<_Tp>::operator Vec<_Tp, 3>() const
14591429 return Vec<_Tp, 3 >(x, y, z);
14601430}
14611431
1462- template <typename _Tp> inline
1463- Point3_<_Tp>& Point3_<_Tp>::operator = (const Point3_& pt)
1464- {
1465- x = pt.x ; y = pt.y ; z = pt.z ;
1466- return *this ;
1467- }
1468-
1469- template <typename _Tp> inline
1470- Point3_<_Tp>& Point3_<_Tp>::operator = (Point3_&& pt) CV_NOEXCEPT
1471- {
1472- x = std::move (pt.x ); y = std::move (pt.y ); z = std::move (pt.z );
1473- return *this ;
1474- }
1475-
14761432template <typename _Tp> inline
14771433_Tp Point3_<_Tp>::dot(const Point3_& pt) const
14781434{
@@ -1685,14 +1641,6 @@ template<typename _Tp> inline
16851641Size_<_Tp>::Size_(_Tp _width, _Tp _height)
16861642 : width(_width), height(_height) {}
16871643
1688- template <typename _Tp> inline
1689- Size_<_Tp>::Size_(const Size_& sz)
1690- : width(sz.width), height(sz.height) {}
1691-
1692- template <typename _Tp> inline
1693- Size_<_Tp>::Size_(Size_&& sz) CV_NOEXCEPT
1694- : width(std::move(sz.width)), height(std::move(sz.height)) {}
1695-
16961644template <typename _Tp> inline
16971645Size_<_Tp>::Size_(const Point_<_Tp>& pt)
16981646 : width(pt.x), height(pt.y) {}
@@ -1703,20 +1651,6 @@ Size_<_Tp>::operator Size_<_Tp2>() const
17031651 return Size_<_Tp2>(saturate_cast<_Tp2>(width), saturate_cast<_Tp2>(height));
17041652}
17051653
1706- template <typename _Tp> inline
1707- Size_<_Tp>& Size_<_Tp>::operator = (const Size_<_Tp>& sz)
1708- {
1709- width = sz.width ; height = sz.height ;
1710- return *this ;
1711- }
1712-
1713- template <typename _Tp> inline
1714- Size_<_Tp>& Size_<_Tp>::operator = (Size_<_Tp>&& sz) CV_NOEXCEPT
1715- {
1716- width = std::move (sz.width ); height = std::move (sz.height );
1717- return *this ;
1718- }
1719-
17201654template <typename _Tp> inline
17211655_Tp Size_<_Tp>::area() const
17221656{
@@ -1827,14 +1761,6 @@ template<typename _Tp> inline
18271761Rect_<_Tp>::Rect_(_Tp _x, _Tp _y, _Tp _width, _Tp _height)
18281762 : x(_x), y(_y), width(_width), height(_height) {}
18291763
1830- template <typename _Tp> inline
1831- Rect_<_Tp>::Rect_(const Rect_<_Tp>& r)
1832- : x(r.x), y(r.y), width(r.width), height(r.height) {}
1833-
1834- template <typename _Tp> inline
1835- Rect_<_Tp>::Rect_(Rect_<_Tp>&& r) CV_NOEXCEPT
1836- : x(std::move(r.x)), y(std::move(r.y)), width(std::move(r.width)), height(std::move(r.height)) {}
1837-
18381764template <typename _Tp> inline
18391765Rect_<_Tp>::Rect_(const Point_<_Tp>& org, const Size_<_Tp>& sz)
18401766 : x(org.x), y(org.y), width(sz.width), height(sz.height) {}
@@ -1848,26 +1774,6 @@ Rect_<_Tp>::Rect_(const Point_<_Tp>& pt1, const Point_<_Tp>& pt2)
18481774 height = std::max (pt1.y , pt2.y ) - y;
18491775}
18501776
1851- template <typename _Tp> inline
1852- Rect_<_Tp>& Rect_<_Tp>::operator = ( const Rect_<_Tp>& r )
1853- {
1854- x = r.x ;
1855- y = r.y ;
1856- width = r.width ;
1857- height = r.height ;
1858- return *this ;
1859- }
1860-
1861- template <typename _Tp> inline
1862- Rect_<_Tp>& Rect_<_Tp>::operator = ( Rect_<_Tp>&& r ) CV_NOEXCEPT
1863- {
1864- x = std::move (r.x );
1865- y = std::move (r.y );
1866- width = std::move (r.width );
1867- height = std::move (r.height );
1868- return *this ;
1869- }
1870-
18711777template <typename _Tp> inline
18721778Point_<_Tp> Rect_<_Tp>::tl() const
18731779{
0 commit comments