Support for C++20 ranges
Posted: Thu Jan 11, 2024 8:24 pm
Hello,
I'm working on a project for an ESP32-S3-based board (the LilyGo T-Display-S3), and I am facing problems trying to use the C++20 ranges library. Specifically, I get the error
I'm using PlatformIO to develop this project, and I have already asked an initial question in the [PlatformIO forum](https://community.platformio.org/t/c-20 ... tory/37771), which has subsequently lead me here.
Anyway, I have since come across this seemingly similar issue about support for C++20 chrono: https://github.com/espressif/esp-idf/is ... 1873703047
It is mentioned that this will be supported starting with GCC14. A quick look at https://en.cppreference.com/w/cpp/compiler_support reveals that "The One Ranges Proposal" should be supported from GCC10. So, how does all of this fit together?
All of this has me quite confused, especially considering that I'm simply trying to port a project that works on an ESP8266. Could somebody explain to me what is going wrong, and if there's anything I can do to fix it?
In case it is of any interest, my PlatformIO.ini looks like this:
With that, I get the following information when trying to build my project:
Best regards
I'm working on a project for an ESP32-S3-based board (the LilyGo T-Display-S3), and I am facing problems trying to use the C++20 ranges library. Specifically, I get the error
Code: Select all
fatal error: ranges: No such file or directory
I'm using PlatformIO to develop this project, and I have already asked an initial question in the [PlatformIO forum](https://community.platformio.org/t/c-20 ... tory/37771), which has subsequently lead me here.
Anyway, I have since come across this seemingly similar issue about support for C++20 chrono: https://github.com/espressif/esp-idf/is ... 1873703047
It is mentioned that this will be supported starting with GCC14. A quick look at https://en.cppreference.com/w/cpp/compiler_support reveals that "The One Ranges Proposal" should be supported from GCC10. So, how does all of this fit together?
All of this has me quite confused, especially considering that I'm simply trying to port a project that works on an ESP8266. Could somebody explain to me what is going wrong, and if there's anything I can do to fix it?
In case it is of any interest, my PlatformIO.ini looks like this:
Code: Select all
[env:lilygo-t-display-s3]
; platform = espressif32
platform = https://github.com/platformio/platform-espressif32.git
board = lilygo-t-display-s3
framework = arduino
build_unflags = -std=gnu++11
build_flags = -std=gnu++2a //https://community.platformio.org/t/which-c-standard-am-i-using/24597/4
Code: Select all
PACKAGES:
- framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5