Browse Source

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

main
PaulStoffregen 9 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

*this = value; *this = value;
} }


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


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

+ 2
- 2
teensy3/WString.h View File

String(const char *cstr = (const char *)NULL); String(const char *cstr = (const char *)NULL);
String(const __FlashStringHelper *pgmstr); String(const __FlashStringHelper *pgmstr);
String(const String &str); String(const String &str);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String(String &&rval); String(String &&rval);
String(StringSumHelper &&rval); String(StringSumHelper &&rval);
#endif #endif
String & operator = (const String &rhs); String & operator = (const String &rhs);
String & operator = (const char *cstr); String & operator = (const char *cstr);
String & operator = (const __FlashStringHelper *pgmstr); String & operator = (const __FlashStringHelper *pgmstr);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & operator = (String &&rval); String & operator = (String &&rval);
String & operator = (StringSumHelper &&rval); String & operator = (StringSumHelper &&rval);
#endif #endif

Loading…
Cancel
Save