I'm using Visual Micro in VS 2019 and need std::map.
I successfully installed ArduinoSTL via the Add Library>Download and Install Arduino Library menu item.
I added <ArduionSTL.h> to my .ino.
Any ideas why I get the following errors when I compile?
I successfully installed ArduinoSTL via the Add Library>Download and Install Arduino Library menu item.
I added <ArduionSTL.h> to my .ino.
Any ideas why I get the following errors when I compile?
Code:
Compiling debug version of 'LED Control' for 'Teensy 3.2 / 3.1'
ArduinoSTL.cpp: 79:2: warning: #warning "printf() will not be functional on this platform." [-Wcpp]
#warning "printf() will not be functional on this platform."
WProgram.h:45: In file included from
Arduino.h*:6: from
ArduinoSTL.cpp:2: from
wiring.h: 48:76: error: 'enable_if' in namespace 'std' does not name a template type
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std*: enable_if<std::is_integral<T>::value >::type* = 0)
wiring.h: 48:85: error: expected ',' or '...' before '<' token
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std*: enable_if<std::is_integral<T>::value >::type* = 0)
wiring.h: 64:68: error: 'enable_if' in namespace 'std' does not name a template type
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std*: enable_if<std::is_floating_point<T>::value >::type* = 0)
wiring.h: 64:77: error: expected ',' or '...' before '<' token
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std*: enable_if<std::is_floating_point<T>::value >::type* = 0)
WProgram.h:45: In file included from
Arduino.h*:6: from
ArduinoSTL.cpp:2: from
wiring.h: 72:54: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:68: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:75: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:89: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: In function constexpr decltype (((a < b) ? (<expression error> > a) : (<expression error> > b))) min(A&&, B&&)
wiring.h: 73:18: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:32: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:39: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:53: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: At global scope
wiring.h: 76:54: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:68: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:75: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:89: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: In function constexpr decltype (((a < b) ? (<expression error> > a) : (<expression error> > b))) max(A&&, B&&)
wiring.h: 77:19: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:33: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:40: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:54: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
WProgram.h:45: In file included from
Arduino.h*:6: from
wiring.h: 48:76: error: 'enable_if' in namespace 'std' does not name a template type
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std*: enable_if<std::is_integral<T>::value >::type* = 0)
wiring.h: 48:85: error: expected ',' or '...' before '<' token
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std*: enable_if<std::is_integral<T>::value >::type* = 0)
wiring.h: 64:68: error: 'enable_if' in namespace 'std' does not name a template type
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std*: enable_if<std::is_floating_point<T>::value >::type* = 0)
wiring.h: 64:77: error: expected ',' or '...' before '<' token
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std*: enable_if<std::is_floating_point<T>::value >::type* = 0)
WProgram.h:45: In file included from
Arduino.h*:6: from
wiring.h: 72:54: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:68: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:75: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 72:89: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: In function constexpr decltype (((a < b) ? (<expression error> > a) : (<expression error> > b))) min(A&&, B&&)
wiring.h: 73:18: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:32: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:39: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 73:53: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: At global scope
wiring.h: 76:54: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:68: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:75: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)) {
wiring.h: 76:89: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)) {
wiring.h: In function constexpr decltype (((a < b) ? (<expression error> > a) : (<expression error> > b))) max(A&&, B&&)
wiring.h: 77:19: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:33: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:40: error: 'forward' is not a member of 'std
forward<A>(a) : std::forward<B>(b)
wiring.h: 77:54: error: expected primary-expression before '>' token
forward<A>(a) : std::forward<B>(b)
Error compiling libraries
Debug Build Error: This hardware might not support the default Visual Micro Debugger.
If this project is using OTA/WiFi upload then please use the vMicro>Debugger menu to set the Serial COM and Remote port for the debugger.
Otherwise switch the toolbar from 'Debug' to 'Release' and build again.
or switch off Automatic Debugging
or configure the SoftwareSerial debugger option.
Debug build failed for project 'LED Control'
Last edited: