mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Explicitly default operator= for Vec<T, n>
Due to the explicitly declared copy constructor Vec<T, n>::Vec(Vec <T,n>&) GCC 9 warns if there is no assignment operator, as having one typically requires the other (rule-of-three, constructor/desctructor/assginment). As the values are just a plain array the default assignment operator does the right thing. Tell the compiler explicitly to default it. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
This commit is contained in:
parent
8937e8756e
commit
e9a2e665b2
@ -391,6 +391,10 @@ public:
|
||||
const _Tp& operator ()(int i) const;
|
||||
_Tp& operator ()(int i);
|
||||
|
||||
#ifdef CV_CXX11
|
||||
Vec<_Tp, cn>& operator=(const Vec<_Tp, cn>& rhs) = default;
|
||||
#endif
|
||||
|
||||
Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_AddOp);
|
||||
Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_SubOp);
|
||||
template<typename _T2> Vec(const Matx<_Tp, cn, 1>& a, _T2 alpha, Matx_ScaleOp);
|
||||
|
Loading…
Reference in New Issue
Block a user