ROS2 galactic source build breaks with GCC 11.1
When trying to build ros2 galactic from source in a docker container based on Ubuntu 18.04 with GCC upgraded to 11.1 I get this set of build errors:
Starting >>> ament_copyright
--- stderr: iceoryx_utils
In file included from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:21,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:52:45: error: ‘numeric_limits’ is not a member of ‘std’
52 | static constexpr id_t INVALID_ID = std::numeric_limits<id_t>::max();
| ^~~~~~~~~~~~~~
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:52:64: error: expected primary-expression before ‘>’ token
52 | static constexpr id_t INVALID_ID = std::numeric_limits<id_t>::max();
| ^
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:52:67: error: ‘::max’ has not been declared; did you mean ‘std::max’?
52 | static constexpr id_t INVALID_ID = std::numeric_limits<id_t>::max();
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/cxx/vector.hpp:20,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:21,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:21,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /opt/ros/galactic/src/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:173:50: error: ‘numeric_limits’ is not a member of ‘std’
173 | static constexpr id_t NULL_POINTER_ID = std::numeric_limits<id_t>::max();
| ^~~~~~~~~~~~~~
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:173:69: error: expected primary-expression before ‘>’ token
173 | static constexpr id_t NULL_POINTER_ID = std::numeric_limits<id_t>::max();
| ^
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:173:72: error: ‘::max’ has not been declared; did you mean ‘std::max’?
173 | static constexpr id_t NULL_POINTER_ID = std::numeric_limits<id_t>::max();
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/cxx/vector.hpp:20,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:21,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:21,
from /opt/ros/galactic/src/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /opt/ros/galactic/src/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:174:58: error: ‘numeric_limits’ is not a member of ‘std’
174 | static constexpr offset_t NULL_POINTER_OFFSET = std::numeric_limits<offset_t>::max();
| ^~~~~~~~~~~~~~
/opt/ros/galactic/src/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:174:81: error: expected primary-expression before ‘>’ token
174 | static constexpr offset_t ...