Somehow on my machine (Ubuntu 22.04 LTS) compilation fails with the following errors:
libOpenDRIVE/include/Math.hpp:47:35: error: ‘plus’ is not a member of ‘std’
libOpenDRIVE/include/Math.hpp:53:35: error: ‘minus’ is not a member of ‘std’; did you mean ‘min’?
libOpenDRIVE/include/Math.hpp:80:66: error: ‘multiplies’ is not a member of ‘std’
From my side this issue can immediately be resolved since it isn't an issue regarding this lib. But wanted to share the issue for anyone else having trouble.
Somehow on my machine (Ubuntu 22.04 LTS) compilation fails with the following errors:
Even though it should be in the standard of c++14 (https://en.cppreference.com/w/cpp/utility/functional/plus) compilation fails. I've tried to update gcc and c++ from 9.4.0 to 11.3.0 but this did not resolve the issues.
After changing CMAKE_CXX_STANDARD to 17 or above, the issues are resolved (I still need to resolve https://github.com/grepthat/libOpenDRIVE/issues/46 but after that, it works).
So for anyone else with issues like that, change https://github.com/grepthat/libOpenDRIVE/blob/master/CMakeLists.txt#L8 to
set(CMAKE_CXX_STANDARD 17)
.From my side this issue can immediately be resolved since it isn't an issue regarding this lib. But wanted to share the issue for anyone else having trouble.