aZholtikov / ZHNetwork

ESP-NOW based Mesh network for ESP8266/ESP32.
MIT License
40 stars 9 forks source link

fix: include <queue> only #4

Closed rfvermut closed 1 year ago

rfvermut commented 1 year ago

I'm working on a weird corner-case project incorporating mesh network into ESPHome. When compiling together I'm getting a clash of yield declarations.

In file included from c:\users\pveretennikovs\.platformio\packages\toolchain-xtensa-esp32s3\xtensa-esp32s3-elf\include\c++\8.4.0\future:39,
                 from c:\users\pveretennikovs\.platformio\packages\toolchain-xtensa-esp32s3\xtensa-esp32s3-elf\include\c++\8.4.0\xtensa-esp32s3-elf\no-rtti\bits\stdc++.h:105,
                 from .piolibdeps/mesh-node/ZHNetwork/src/ZHNetwork.h:5,
                 from src/mesh.hpp:2,
                 from src/main.cpp:18:
c:\users\pveretennikovs\.platformio\packages\toolchain-xtensa-esp32s3\xtensa-esp32s3-elf\include\c++\8.4.0\thread:354:13: error: declaration of 'void yield()' not in a namesp
ace surrounding 'esphome'
     yield() noexcept

But seems like whole stdc is not needed, queue is enough to compile

aZholtikov commented 1 year ago

Thanks.