Page 1 of 1

C++ Standard Template Library with ESP32?

Posted: Thu Mar 21, 2019 11:14 am
by GeorgeFlorian1
Good afternoon !

I am trying to make some sort of circular stack that should let me add an element at the top, read elements from top to bottom, and eliminate (only when the stack is full) the element at the bottom.
In this regard I thought of adding the C++ Standard Template Library to my code so that I can use a Deque.

The only template library I found was
Embedded Template Library by John Wellbelove
on PlatformIO IDE, but it seems discontinued as the last update was over a year ago and it has very few downloads in the last month (31).

Should I trust this library or is there a way of adding the C++ STL to Arduino IDE or PlatformIO IDE ?

Thank you !

Re: C++ Standard Template Library with ESP32?

Posted: Thu Mar 21, 2019 12:26 pm
by ESP_igrr
(assuming the question is about ESP32 Arduino)
You should be able to use STL containers: #include <deque>, then use std::deque.

Re: C++ Standard Template Library with ESP32?

Posted: Thu Mar 21, 2019 3:31 pm
by idahowalker
Now just writing, if you want a queue freeRTOS might work for you?