且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2015错误C4996'std :: _ Copy_impl':使用参数可能不安全的函数调用

更新时间:2021-10-17 23:35:57

我已按照

I solved the problem following instructions in this article suggested by @DanMašek in the comment.

我添加了标题<iterator>,然后使用了类stdext::checked_array_iterator.结果是这样的:

I added the header <iterator> and then I used the class stdext::checked_array_iterator. The result is something like that:

    double * r0_ptr = m_matrix.ptr<double>(0);
    std::copy(temp_v1.begin(), temp_v1.end(), stdext::checked_array_iterator<double *>(r0_ptr, m_matrix.cols));