You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I used your gnat project on an ESP32 3 years ago and got it running ok.
I have now updated to the latest ESP IDF and I can't compile the server.h file.
I have renamed server.h to MQTTBroker.h to improve clarity in my codebase, but have not changed the fundamental operation.
I tried changing the std::function to std::move_only_function but that gave a different set of errors.
I really don't understand c++ well enough to properly debug this and don't know how to fix it.
Maybe the issue is with the unique_ptr in the DataStoreEntry?
The full error is:
main/include/gnat/mqtt_broker.h:172:15: required from 'gnat::Status gnat::MQTTBroker<DataStore, Clock>::HandleMessage(gnat::Packet*) [with ClientConnection = AcTcpConnection; DataStore = gnat::DataStore<std::__cxx11::basic_string >; Clock = ClockWrapper]'
main/ac_mqtt_connection.cpp:73:42: required from here
/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/std_function.h:439:69: error: static assertion failed: std::function target must be copy-constructible
439 | static_assert(is_copy_constructible<__decay_t<_Functor>>::value,
| ^~~~~
/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/std_function.h:439:69: note: 'std::integral_constant<bool, false>::value' evaluates to false
[19/25] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ac_mqtt_server.cpp.obj
The text was updated successfully, but these errors were encountered:
Hi,
I used your gnat project on an ESP32 3 years ago and got it running ok.
I have now updated to the latest ESP IDF and I can't compile the server.h file.
I have renamed server.h to MQTTBroker.h to improve clarity in my codebase, but have not changed the fundamental operation.
I tried changing the std::function to std::move_only_function but that gave a different set of errors.
I really don't understand c++ well enough to properly debug this and don't know how to fix it.
Maybe the issue is with the unique_ptr in the DataStoreEntry?
The full error is:
The text was updated successfully, but these errors were encountered: