gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.21k stars 484 forks source link

msgs.cc: add missing <array> include #3290

Closed scpeters closed 1 year ago

scpeters commented 1 year ago

🦟 Bug fix

Fixes https://github.com/osrf/homebrew-simulation/issues/2179

Summary

There is a reported build failure on some versions of macOS in https://github.com/osrf/homebrew-simulation/issues/2179, and I observed a failed bottle build on macOS Monterey:

Build Status https://build.osrfoundation.org/job/generic-release-homebrew_triggered_bottle_builder/1088/label=osx_monterey/

There is a complaint about msgs.cc:

gazebo/msgs/msgs.cc:2023:34: error: implicit instantiation of undefined template 'std::array<std::string, 2>'
std::array<std::string, 2> dimensions = {{"horizontal", "vertical"}};
^

The solution is to include the <array> header file.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

traversaro commented 1 year ago

Please ignore conda-forge CI failures, they are not related to the PR and will be solved by https://github.com/gazebosim/gazebo-classic/pull/3287 .

scpeters commented 1 year ago

I'm not sure why the abi-checker jobs are failing too; I'll look into that. I'll merge this anyway since it doesn't affect API/ABI