I have a C++ class constructor like:
Motors(int p1=0, int p2=0);
However, when I attempt to instantiate it with named parameters like:
Motors motors(p1=123, p2=456);
the Arduino C/C++ compiler gives me the errors:
src/motors.ino:3: error: ‘p1’ was not declared in this scope src/motors.ino:3: error: ‘p2’ was not declared in this scope
The compiler doesn't seem to support named parameters and thinks I'm referring to variables. I thought named parameters was a pretty widely supported feature, even in C++. What am I doing wrong?