--- libs/MVS/Mesh.cpp.orig 2024-05-27 00:00:00 UTC +++ libs/MVS/Mesh.cpp @@ -35,6 +35,22 @@ #include #include #include +// Fix for vcglib compatibility with modern C++ standard library +#include +#include +namespace std { +// Provide random_shuffle for C++14/17 when it's been removed +template +void random_shuffle(RandomIt first, RandomIt last, RandomFunc& r) { + std::shuffle(first, last, std::default_random_engine()); +} +// Provide unary_function for vcglib +template +struct unary_function { + typedef ArgumentType argument_type; + typedef ResultType result_type; +}; +} #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4244 4267 4305)