diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 45c25900c3..8a3167a032 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -2564,7 +2564,7 @@ SparseMatConstIterator_<_Tp>::operator ++() template inline SparseMatConstIterator_<_Tp> SparseMatConstIterator_<_Tp>::operator ++(int) { - SparseMatConstIterator it = *this; + SparseMatConstIterator_<_Tp> it = *this; SparseMatConstIterator::operator ++(); return it; } @@ -2608,7 +2608,7 @@ SparseMatIterator_<_Tp>::operator ++() template inline SparseMatIterator_<_Tp> SparseMatIterator_<_Tp>::operator ++(int) { - SparseMatIterator it = *this; + SparseMatIterator_<_Tp> it = *this; SparseMatConstIterator::operator ++(); return it; }