madhephaestus / ESP32Servo

Arduino-compatible servo library for the ESP32
139 stars 55 forks source link

error: expected primary-expression before ')' token #40

Closed linoxolus closed 1 year ago

linoxolus commented 1 year ago

In file included from /home/khai/Arduino/servo/servo.ino:7: /home/khai/Arduino/libraries/ServoESP32/src/Servo.h:68:81: error: call to non-'constexpr' function 'const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]' static const int TIMER_RESOLUTION = std::min(16, SOC_LEDC_TIMER_BIT_WIDE_NUM); ^ /home/khai/Arduino/libraries/ServoESP32/src/Servo.h: In member function 'T ServoTemplate::mapTemplate(T, T, T, T, T) const': /home/khai/Arduino/libraries/ServoESP32/src/Servo.h:256:28: error: 'is_floating_point_v' is not a member of 'std' if constexpr (std::is_floating_point_v) { ^~~~~~~ /home/khai/Arduino/libraries/ServoESP32/src/Servo.h:256:28: note: suggested alternative: 'is_floating_point' if constexpr (std::is_floating_point_v) { ^~~~~~~ is_floating_point /home/khai/Arduino/libraries/ServoESP32/src/Servo.h:256:49: error: expected primary-expression before '>' token if constexpr (std::is_floating_point_v) { ^ /home/khai/Arduino/libraries/ServoESP32/src/Servo.h:256:50: error: expected primary-expression before ')' token if constexpr (std::is_floating_point_v) { ^

exit status 1

Compilation error: exit status 1

madhephaestus commented 1 year ago

ServoESP32 is not his library