I am encountering a compilation error with version 1.3.x of the Paho MQTT C++ library on specific ARM toolchains, while it compiles successfully on an Ubuntu machine and with an Android toolchain. Reverting to version 1.2 resolves the issue.
I am using C11, enforced in my CMake configuration. The error is as follows:
In file included from /3rdParty/paho-mqtt-cpp/src/paho_cpp_project/src/mqtt/iasync_client.h:34:0,
from /3rdParty/paho-mqtt-cpp/src/paho_cpp_project/src/mqtt/async_client.h:41,
from /3rdParty/paho-mqtt-cpp/src/paho_cpp_project/src/async_client.cpp:20:
/3rdParty/paho-mqtt-cpp/src/paho_cpp_project/src/mqtt/disconnect_options.h: In constructor 'mqtt::disconnect_options::disconnect_options(const MQTTAsync_disconnectOptions&)':
/3rdParty/paho-mqtt-cpp/src/paho_cpp_project/src/mqtt/disconnect_options.h:68:76: error: cannot convert 'const MQTTAsync_disconnectOptions' to 'char' in initialization
disconnect_options(const MQTTAsync_disconnectOptions& copts) : opts_{copts} {}
Turns out these older toolchains have a couple things disabled with one of them being std::initializer_list which used in v1.3 and not in v1.2. properties.cpp/h disconnect_options.cpp/h use the feature now.
Issue Description
I am encountering a compilation error with version 1.3.x of the Paho MQTT C++ library on specific ARM toolchains, while it compiles successfully on an Ubuntu machine and with an Android toolchain. Reverting to version 1.2 resolves the issue.
I am using C11, enforced in my CMake configuration. The error is as follows: