facontidavide / ros_type_introspection

Deserialize ROS messages that are unknown at compilation time
MIT License
61 stars 30 forks source link

Fixed osx compilation failure due to implicit_instantiation of std::array #2

Closed prclibo closed 7 years ago

prclibo commented 7 years ago

Compilation on osx generates the following error:

In file included from /Users/li/desktop_full_ws/src/ros_type_introspection/src/deserializer.cpp:35: /Users/li/desktop_full_ws/install_isolated/include/ros_type_introspection/deserializer.hpp:70:26: error: implicit instantiation of undefined template 'std::1::array<unsigned short, 7>' std::array<uint16_t,7> index_array; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:114:65: note: template is declared here template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array; ^ 1 error generated. make[2]: [CMakeFiles/ros_type_introspection.dir/src/deserializer.cpp.o] Error 1 make[1]: [CMakeFiles/ros_type_introspection.dir/all] Error 2

Adding the missing #include <array> solves the problem.

facontidavide commented 7 years ago

thanks