From eae1ebfd29d1e7a521bec89b3ab0627e714110f2 Mon Sep 17 00:00:00 2001 From: "KUANG, Fangjun" Date: Wed, 22 Mar 2017 22:03:29 +0100 Subject: [PATCH] fix issue 8411. --- modules/core/include/opencv2/core/mat.hpp | 1 + modules/core/include/opencv2/core/mat.inl.hpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index e3a24032d0..f1a2ee42e0 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -177,6 +177,7 @@ public: template _InputArray(const std::vector<_Tp>& vec); _InputArray(const std::vector& vec); template _InputArray(const std::vector >& vec); + _InputArray(const std::vector >&); template _InputArray(const std::vector >& vec); template _InputArray(const _Tp* vec, int n); template _InputArray(const Matx<_Tp, m, n>& matx); diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index b3b7110cbc..556c3e7a23 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -85,6 +85,10 @@ template inline _InputArray::_InputArray(const std::vector >& vec) { init(FIXED_TYPE + STD_VECTOR_VECTOR + DataType<_Tp>::type + ACCESS_READ, &vec); } +inline +_InputArray::_InputArray(const std::vector >&) +{ CV_Error(Error::StsUnsupportedFormat, "std::vector > is not supported!\n"); } + template inline _InputArray::_InputArray(const std::vector >& vec) { init(FIXED_TYPE + STD_VECTOR_MAT + DataType<_Tp>::type + ACCESS_READ, &vec); }