openscenegraph / OpenSceneGraph

OpenSceneGraph git repository
http://www.openscenegraph.org
Other
3.21k stars 1.42k forks source link

Allow building gdal, dae, ffmpeg and obj plugins with `/std:c++17` msvc flag #1246

Open maksim-petukhov opened 1 year ago

maksim-petukhov commented 1 year ago

auto_ptr is removed in C++17. This PR fixes gdal and ffmpeg plugin in a similar way than dae plugin was fixed (see https://github.com/openscenegraph/OpenSceneGraph/commit/863dee52e20f6446b9497aa4bf1bfaefc0074d1b), but also takes into account that __cplusplus always reports 199711L in msvc when not using special flag /Zc:__cplusplus (see https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170#remarks)

ptr_fun is also removed in C++17. That's why I provided C++17 compatible version of strip function for obj plugin.