aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/WString.cpp
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2014-07-07 19:54:31 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-07-16 13:06:10 +0200
commit72a5ef3c7834bd3ebf0fcccdb272a334645ba3a7 (patch)
treedb55e1c1579157e4af4e43aab9ebcba982c69fa3 /cores/arduino/WString.cpp
parentc84ff4d1778592009724f2078c7f6453a31b1a3f (diff)
Check for __cplusplus >= 201103L as well as __GXX_EXPERIMENTAL_CXX0X__
Gcc 4.8 defines __cplusplus as 201103L, so we can check for that now. It still also defines __GXX_EXPERIMENTAL_CXX0X__, but this could help on other compilers, or if gcc ever decides to stop defining the experimental macro.
Diffstat (limited to 'cores/arduino/WString.cpp')
-rw-r--r--cores/arduino/WString.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp
index dcd469d..cd3e0e8 100644
--- a/cores/arduino/WString.cpp
+++ b/cores/arduino/WString.cpp
@@ -43,7 +43,7 @@ String::String(const __FlashStringHelper *pstr)
*this = pstr;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String::String(String &&rval)
{
init();
@@ -189,7 +189,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
void String::move(String &rhs)
{
if (buffer) {
@@ -221,7 +221,7 @@ String & String::operator = (const String &rhs)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & String::operator = (String &&rval)
{
if (this != &rval) move(rval);