Closed edgetriggered closed 1 year ago
Weird, all CI builds are working fine (gcc-9), what OS?
Arch Linux, which returns the following error messages:
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp: In constructor ‘radio_tool::fw::SGLHeader::SGLHeader(const uint16_t&, const uint32_t&, const std::string&, const std::string&, const std::string&, const std::string&, const uint8_t&, const uint16_t&)’:
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:50:57: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
50 | radio_group(group.begin(), std::find_if(group.begin(), group.end(), NotAscii)),
| ^~~~~~~
| find
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:51:57: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
51 | radio_model(model.begin(), std::find_if(model.begin(), model.end(), NotAscii)),
| ^~~~~~~
| find
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp: At global scope:
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:179:46: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
179 | static auto Create() -> std::unique_ptr<FirmwareSupport>
| ^~~~~~~~~~
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:27:1: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
26 | #include <iomanip>
+++ |+#include <memory>
27 |
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:179:46: error: expected ‘;’ at end of member declaration
179 | static auto Create() -> std::unique_ptr<FirmwareSupport>
| ^~~~~~~~~~
| ;
/src/radio_tool/include/radio_tool/fw/tyt_fw_sgl.hpp:179:56: error: expected unqualified-id before ‘<’ token
179 | static auto Create() -> std::unique_ptr<FirmwareSupport>
I was unable to build with GCC 12.2 without these includes, relating to the use of std::find_if and std::unique_ptr.