Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build cleanly under c++14 #70

Merged
merged 1 commit into from
Apr 9, 2023
Merged

Build cleanly under c++14 #70

merged 1 commit into from
Apr 9, 2023

Conversation

richievos
Copy link
Contributor

Other parts of TinyConsole require >= c++ 14, but this forces c++17.

That's not necessarily a problem, but it triggered some build warnings for me, so in case that's unintentional I'm sending this diff.

Exact warning:

Compiling .pio/build/esp32dev/lib4a7/TinyMqtt/TinyMqtt.cpp.o
.pio/libdeps/esp32dev/TinyMqtt/src/TinyMqtt.cpp: In member function 'MqttError MqttBroker::subscribe(MqttClient*, const Topic&, uint8_t)':
.pio/libdeps/esp32dev/TinyMqtt/src/TinyMqtt.cpp:221:13: warning: structured bindings only available with -std=c++17 or -std=gnu++17
   for(auto& [retained_topic, retain]: retained)

I personally just switched to c++17 as my fix/workaround.

Other parts of TinyConsole require >= c++ 14, but this forces c++17.

That's not necessarily a problem, but it triggered some build warnings for me,
so in case that's unintentional I'm sending this diff.

Exact warning:
```
Compiling .pio/build/esp32dev/lib4a7/TinyMqtt/TinyMqtt.cpp.o
.pio/libdeps/esp32dev/TinyMqtt/src/TinyMqtt.cpp: In member function 'MqttError MqttBroker::subscribe(MqttClient*, const Topic&, uint8_t)':
.pio/libdeps/esp32dev/TinyMqtt/src/TinyMqtt.cpp:221:13: warning: structured bindings only available with -std=c++17 or -std=gnu++17
   for(auto& [retained_topic, retain]: retained)
```

I personally just switched to c++17 as my fix/workaround.
@hsaturn hsaturn merged commit ff3ff6e into hsaturn:main Apr 9, 2023
@hsaturn
Copy link
Owner

hsaturn commented Apr 9, 2023

Thanks for this.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants