File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ String::String(const __FlashStringHelper *pstr)
63
63
*this = pstr;
64
64
}
65
65
66
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
66
67
String::String (String &&rval)
67
68
: buffer(rval.buffer)
68
69
, capacity(rval.capacity)
@@ -72,6 +73,7 @@ String::String(String &&rval)
72
73
rval.capacity = 0 ;
73
74
rval.len = 0 ;
74
75
}
76
+ #endif
75
77
76
78
String::String (char c)
77
79
{
@@ -211,6 +213,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
211
213
return *this ;
212
214
}
213
215
216
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
214
217
void String::move (String &rhs)
215
218
{
216
219
if (this != &rhs)
@@ -226,6 +229,7 @@ void String::move(String &rhs)
226
229
rhs.capacity = 0 ;
227
230
}
228
231
}
232
+ #endif
229
233
230
234
String & String::operator = (const String &rhs)
231
235
{
@@ -237,11 +241,13 @@ String & String::operator = (const String &rhs)
237
241
return *this ;
238
242
}
239
243
244
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
240
245
String & String::operator = (String &&rval)
241
246
{
242
247
move (rval);
243
248
return *this ;
244
249
}
250
+ #endif
245
251
246
252
String & String::operator = (const char *cstr)
247
253
{
Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ class String
72
72
String (const uint8_t *cstr, unsigned int length) : String((const char *)cstr, length) {}
73
73
String (const String &str);
74
74
String (const __FlashStringHelper *str);
75
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
75
76
String (String &&rval);
77
+ #endif
76
78
explicit String (char c);
77
79
explicit String (unsigned char , unsigned char base=10 );
78
80
explicit String (int , unsigned char base=10 );
@@ -96,7 +98,9 @@ class String
96
98
String & operator = (const String &rhs);
97
99
String & operator = (const char *cstr);
98
100
String & operator = (const __FlashStringHelper *str);
101
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
99
102
String & operator = (String &&rval);
103
+ #endif
100
104
101
105
// concatenate (works w/ built-in types)
102
106
@@ -227,7 +231,9 @@ class String
227
231
// copy and move
228
232
String & copy (const char *cstr, unsigned int length);
229
233
String & copy (const __FlashStringHelper *pstr, unsigned int length);
234
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
230
235
void move (String &rhs);
236
+ #endif
231
237
};
232
238
233
239
class StringSumHelper : public String
You can’t perform that action at this time.
0 commit comments