String overloads not working properly

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?

My unsigned char casting is the same solution as posted for this problem


although this is the a further issue with the move operator

Both of these should be fixed so you can do
// A->B->A method here used to prevent compiler from optimizing.
String myString;
String temp;
temp = String(13,DEC);
myString = temp;