arduino / ArduinoCore-API

Hardware independent layer of the Arduino cores defining the official API
https://www.arduino.cc/reference/en/
GNU Lesser General Public License v2.1
216 stars 120 forks source link

Extend String to print 64-bit integers #156

Open drws opened 3 years ago

drws commented 3 years ago

String(long long int) and String(unsigned long long int) are not defined for relevant platforms, so String() is unable to parse 64-bit integers. A minimal non-working example would be:

#include <Arduino.h>

void setup() {
  String(1LL); // String(1L) compiles
}

void loop() {
}

Which produces an error call of overloaded 'String(long long int)' is ambiguous.

drws commented 2 years ago

This has been solved lately in the arduino-esp32.