1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

sfm: fix build in non-C++11 mode

This commit is contained in:
Alexander Alekhin
2020-11-18 12:01:40 +00:00
parent 24a882361d
commit 8df9e849c4

View File

@@ -125,7 +125,11 @@ class vector {
memcpy(data, data_, sizeof(*data)*size_); memcpy(data, data_, sizeof(*data)*size_);
#else #else
for (int i = 0; i < size_; ++i) for (int i = 0; i < size_; ++i)
#ifdef CV_CXX11
new (&data[i]) T(std::move(data_[i])); new (&data[i]) T(std::move(data_[i]));
#else
new (&data[i]) T(data_[i]);
#endif
for (int i = 0; i < size_; ++i) for (int i = 0; i < size_; ++i)
data_[i].~T(); data_[i].~T();
#endif #endif