Fix compliation fail Types_hpp
fix the issue https://github.com/COVESA/capicxx-core-runtime/issues/47
Got the problem with yocto build same as issue 47
build/tmp/work/core2-64-poky-linux/capicxx-core-runtime/3.2.3-r7/capicxx-core-runtime-3.2.3-r7/include/CommonAPI/Types.hpp:113:40: error: return type 'std::string' {aka 'class std::__cxx11::basic_string<char>'} is incomplete 113 | virtual std::string getEnv() const { | ^ /home/phongtran/Workspace/env/poky/build/tmp/work/core2-64-poky-linux/capicxx-core-runtime/3.2.3-r7/capicxx-core-runtime-3.2.3-r7/include/CommonAPI/Types.hpp:116:48: error: return type 'std::string' {aka 'class std::__cxx11::basic_string<char>'} is incomplete 116 | virtual std::string getHostAddress() const { |
We experience that same issue here, probably due to a stricter parsing in newer versions of GCC or refactoring in the GNU C++ library. At least GCC 13.2.0 shipped with Ubuntu 24.04 LTS shows the same behavior, while adding the missing include in CommonAPI/Types.hpp (as is done here in this PR) fixes this issue.