Skip to content

Commit 9452162

Browse files
committed
fix issue 8411.
1 parent eae1ebf commit 9452162

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

modules/core/include/opencv2/core/mat.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ class CV_EXPORTS _OutputArray : public _InputArray
294294
template<typename _Tp> _OutputArray(std::vector<_Tp>& vec);
295295
_OutputArray(std::vector<bool>& vec);
296296
template<typename _Tp> _OutputArray(std::vector<std::vector<_Tp> >& vec);
297+
_OutputArray(std::vector<std::vector<bool> >&);
297298
template<typename _Tp> _OutputArray(std::vector<Mat_<_Tp> >& vec);
298299
template<typename _Tp> _OutputArray(Mat_<_Tp>& m);
299300
template<typename _Tp> _OutputArray(_Tp* vec, int n);

modules/core/include/opencv2/core/mat.inl.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ template<typename _Tp> inline
161161
_OutputArray::_OutputArray(std::vector<std::vector<_Tp> >& vec)
162162
{ init(FIXED_TYPE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_WRITE, &vec); }
163163

164+
inline
165+
_OutputArray::_OutputArray(std::vector<std::vector<bool> >&)
166+
{ CV_Error(Error::StsUnsupportedFormat, "std::vector<std::vector<bool> > cannot be an output array\n"); }
167+
164168
template<typename _Tp> inline
165169
_OutputArray::_OutputArray(std::vector<Mat_<_Tp> >& vec)
166170
{ init(FIXED_TYPE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_WRITE, &vec); }

0 commit comments

Comments
 (0)