This is c++11 related, and I’m not entirely aquainted with R-values
The following code doesn’t compile, why?
String status;
void setup() {};
void loop() {
String tempString = “”;
unsigned char DEC_BASE = static_cast(DEC);
tempString = String(13,DEC_BASE);
status = tempString;
}
I’m getting
undefined reference to `String::operator=(String&&)’
I works, if you move the declaration and assignment into the same line
String status;
void setup() {};
void loop() {
unsigned char DEC_BASE = static_cast(DEC);
String tempString = String(13,DEC_BASE);
status = tempString;
}
Thoughts?