Description
I have written arduino C++ code in which I used std::array quite a lot. Of course I made sure to #include<ArduinoSTL.h>
and #include<array>
. The compiler raises multiple compilation errors (see below) without pointing to any line of the code:
/home/salwa/Arduino/libraries/ArduinoSTL/src/del_opvs.cpp:25:53: error: 'std::size_t' has not been declared _UCXXEXPORT void operator delete[](void * ptr, std::size_t) throw(){ ^~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/del_ops.cpp:25:50: error: 'std::size_t' has not been declared _UCXXEXPORT void operator delete(void* ptr, std::size_t) throw(){ ^~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/del_opnt.cpp:25:56: error: 'nothrow_t' in namespace 'std' does not name a type _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() { ^~~~~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/new_opnt.cpp:25:37: error: declaration of 'operator new' as non-function _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(){ ^~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/new_opnt.cpp:25:37: error: 'size_t' is not a member of 'std' /home/salwa/Arduino/libraries/ArduinoSTL/src/new_opnt.cpp:25:37: note: suggested alternative: /home/salwa/Arduino/libraries/ArduinoSTL/src/new_handler.cpp:22:12: error: 'nothrow_t' in namespace 'std' does not name a type const std::nothrow_t std::nothrow = { }; ^~~~~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/new_handler.cpp:25:6: error: 'new_handler' in namespace 'std' does not name a type std::new_handler __new_handler; ^~~~~~~~~~~ /home/salwa/Arduino/libraries/ArduinoSTL/src/new_handler.cpp:27:1: error: '_UCXXEXPORT' does not name a type
A similar issue was opened here https://github.com/mike-matera/ArduinoSTL/issues/56, it was suggested to use #include"ArduinoSTL.h"
instead of #include<ArduinoSTL.h>
, I did that but it didn't work. I also tried downgrading the AVR boards manager from 1.8.3 to 1.8.2 and to 1.8.1 but that didn't seem to solve the problem.
- Computer kernel/OS: 5.4.0-67-generic build(deps): bump actions/upload-artifact from 2 to 3 #75~18.04.1-Ubuntu
- ArduinoIDE: 1.8.13
- Tested AVR Boards manager: 1.8.1, 1.8.2, 1.8.3 (the problem persists with all these versions)
Any suggestions?