Browse Source

Compile for either C++11 or C++0x

teensy4-core
PaulStoffregen 10 years ago
parent
commit
69faa42dae
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      teensy3/WString.cpp
  2. +2
    -2
      teensy3/WString.h

+ 2
- 2
teensy3/WString.cpp View File

@@ -44,7 +44,7 @@ String::String(const String &value)
*this = value;
}

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String::String(String &&rval)
{
init();
@@ -198,7 +198,7 @@ String & String::operator = (const String &rhs)
return copy(rhs.buffer, rhs.len);
}

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & String::operator = (String &&rval)
{
if (this != &rval) move(rval);

+ 2
- 2
teensy3/WString.h View File

@@ -53,7 +53,7 @@ public:
String(const char *cstr = (const char *)NULL);
String(const __FlashStringHelper *pgmstr);
String(const String &str);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String(String &&rval);
String(StringSumHelper &&rval);
#endif
@@ -78,7 +78,7 @@ public:
String & operator = (const String &rhs);
String & operator = (const char *cstr);
String & operator = (const __FlashStringHelper *pgmstr);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & operator = (String &&rval);
String & operator = (StringSumHelper &&rval);
#endif

Loading…
Cancel
Save