cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.35k stars 909 forks source link

error: no member named 'random_shuffle' in namespace 'std' #845

Open yurivict opened 2 years ago

yurivict commented 2 years ago

random_shuffle was removed in c++17 and you use c++17.

/usr/bin/c++ -DCGAL_USE_GMPXX=1 -D_LIB -D_USE_BOOST -D_USE_EIGEN -D_USE_FAST_CBRT -D_USE_FAST_FLOAT2INT -D_USE_NONFREE -D_USE_OPENGL -D_USE_OPENMP -D_USE_SSE -I/usr/local/include/eigen3 -I/disk-samsung/freebsd-ports/graphics/openmvs/work/openMVS-2.0.1 -I/disk-samsung/freebsd-ports/graphics/openmvs/work/.build -I/usr/local/include/vcglib -isystem /usr/local/include -isystem /usr/local/include/opencv4 -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer   -stdlib=libc++ -W -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wstrict-prototypes -Winit-self -Wsign-promo -Wreorder -Wno-undef -Wno-switch -Wno-switch-enum -Wno-switch-default -Wno-implicit-fallthrough -Wno-comment -Wno-narrowing -Wno-attributes -Wno-ignored-attributes -Wno-enum-compare -Wno-misleading-indentation -Wno-missing-field-initializers -Wno-unused-result -Wno-unused-function -Wno-unused-parameter -Wno-delete-incomplete -Wno-unnamed-type-template-args -Wno-int-in-bool-context -fdiagnostics-show-option -ftemplate-backtrace-limit=0 -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -ffunction-sections -fopenmp=libomp -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer  -DNDEBUG -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /disk-samsung/freebsd-ports/graphics/openmvs/work/.build/libs/MVS/CMakeFiles/MVS.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /disk-samsung/freebsd-ports/graphics/openmvs/work/.build/libs/MVS/CMakeFiles/MVS.dir/cmake_pch.hxx -MD -MT libs/MVS/CMakeFiles/MVS.dir/Mesh.cpp.o -MF libs/MVS/CMakeFiles/MVS.dir/Mesh.cpp.o.d -o libs/MVS/CMakeFiles/MVS.dir/Mesh.cpp.o -c /disk-samsung/freebsd-ports/graphics/openmvs/work/openMVS-2.0.1/libs/MVS/Mesh.cpp
In file included from /disk-samsung/freebsd-ports/graphics/openmvs/work/openMVS-2.0.1/libs/MVS/Mesh.cpp:58:
In file included from /usr/local/include/vcglib/vcg/complex/algorithms/isotropic_remeshing.h:27:
In file included from /usr/local/include/vcglib/vcg/complex/algorithms/update/curvature.h:30:
/usr/local/include/vcglib/vcg/complex/algorithms/point_sampling.h:716:10: error: no member named 'random_shuffle' in namespace 'std'
    std::random_shuffle(faceVec.begin(),faceVec.end(), p_myrandom);
    ~~~~~^
/usr/local/include/vcglib/vcg/complex/algorithms/point_sampling.h:726:10: error: no member named 'random_shuffle' in namespace 'std'
    std::random_shuffle(vertVec.begin(),vertVec.end(), p_myrandom);
    ~~~~~^
/usr/local/include/vcglib/vcg/complex/algorithms/point_sampling.h:1932:10: error: no member named 'random_shuffle' in namespace 'std'
    std::random_shuffle(montecarloSHT.AllocatedCells.begin(),montecarloSHT.AllocatedCells.end(), p_myrandom);
    ~~~~~^
/usr/local/include/vcglib/vcg/complex/algorithms/point_sampling.h:2066:14: error: no member named 'random_shuffle' in namespace 'std'
        std::random_shuffle(montecarloSHT.AllocatedCells.begin(),montecarloSHT.AllocatedCells.end(), p_myrandom);
        ~~~~~^
cdcseacave commented 2 years ago

you are right, but the problem is in a external library; you can either make a PR to it, or use C++14

yurivict commented 2 years ago

https://github.com/cnr-isti-vclab/vcglib/issues/198