diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-04-18 23:38:41 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-04-18 23:38:41 +0000 |
commit | e915b5c1f28e3407d92c2d5981b377b3ed94e985 (patch) | |
tree | 9c45d9c455d71f50a90fa6ed1e51665f7c34465a | |
parent | 6b17a7ba2c6c549c679c18309dd8adce23425010 (diff) | |
download | libcxx-e915b5c1f28e3407d92c2d5981b377b3ed94e985.tar.gz |
Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300626 91177308-0d34-0410-b5e6-96231b3b80d8
26 files changed, 96 insertions, 121 deletions
diff --git a/include/fstream b/include/fstream index 7bcc5d450..5ec42bd13 100644 --- a/include/fstream +++ b/include/fstream @@ -193,13 +193,13 @@ public: // 27.9.1.2 Constructors/destructor: basic_filebuf(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG basic_filebuf(basic_filebuf&& __rhs); #endif virtual ~basic_filebuf(); // 27.9.1.3 Assign/swap: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY basic_filebuf& operator=(basic_filebuf&& __rhs); #endif @@ -276,7 +276,7 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf() setbuf(0, 4096); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs) @@ -352,7 +352,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_filebuf<_CharT, _Traits>::~basic_filebuf() @@ -1017,12 +1017,10 @@ public: _LIBCPP_INLINE_VISIBILITY explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in); #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY basic_ifstream(basic_ifstream&& __rhs); -#endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY basic_ifstream& operator=(basic_ifstream&& __rhs); #endif @@ -1071,7 +1069,7 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope } #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline @@ -1092,7 +1090,7 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline @@ -1177,12 +1175,10 @@ public: explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out); _LIBCPP_INLINE_VISIBILITY explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY basic_ofstream(basic_ofstream&& __rhs); -#endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY basic_ofstream& operator=(basic_ofstream&& __rhs); #endif @@ -1231,7 +1227,7 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope } #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline @@ -1252,7 +1248,7 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline @@ -1339,12 +1335,10 @@ public: _LIBCPP_INLINE_VISIBILITY explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out); #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY basic_fstream(basic_fstream&& __rhs); -#endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY basic_fstream& operator=(basic_fstream&& __rhs); #endif @@ -1393,7 +1387,7 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm } #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline @@ -1414,7 +1408,7 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> inline diff --git a/include/istream b/include/istream index 774f38df2..9a8bb44ef 100644 --- a/include/istream +++ b/include/istream @@ -189,12 +189,11 @@ public: { this->init(__sb); } virtual ~basic_istream(); protected: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_istream(basic_istream&& __rhs); -#endif + // 27.7.1.1.2 Assign/swap: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES inline _LIBCPP_INLINE_VISIBILITY basic_istream& operator=(basic_istream&& __rhs); #endif @@ -332,7 +331,7 @@ basic_istream<_CharT, _Traits>::sentry::sentry(basic_istream<_CharT, _Traits>& _ __is.setstate(ios_base::failbit); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs) @@ -350,7 +349,7 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_istream<_CharT, _Traits>::~basic_istream() @@ -1424,7 +1423,7 @@ ws(basic_istream<_CharT, _Traits>& __is) return __is; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Tp> inline _LIBCPP_INLINE_VISIBILITY @@ -1435,7 +1434,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x) return __is; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> class _LIBCPP_TEMPLATE_VIS basic_iostream @@ -1458,13 +1457,11 @@ public: virtual ~basic_iostream(); protected: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_iostream(basic_iostream&& __rhs); -#endif // assign/swap -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES inline _LIBCPP_INLINE_VISIBILITY basic_iostream& operator=(basic_iostream&& __rhs); #endif @@ -1474,7 +1471,7 @@ protected: public: }; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs) @@ -1490,7 +1487,7 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_iostream<_CharT, _Traits>::~basic_iostream() @@ -1607,7 +1604,7 @@ getline(basic_istream<_CharT, _Traits>& __is, return getline(__is, __str, __is.widen('\n')); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template<class _CharT, class _Traits, class _Allocator> inline _LIBCPP_INLINE_VISIBILITY @@ -1627,7 +1624,7 @@ getline(basic_istream<_CharT, _Traits>&& __is, return getline(__is, __str, __is.widen('\n')); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, size_t _Size> basic_istream<_CharT, _Traits>& diff --git a/include/ostream b/include/ostream index 3d9be8b7a..ca2c83f74 100644 --- a/include/ostream +++ b/include/ostream @@ -165,13 +165,11 @@ public: { this->init(__sb); } virtual ~basic_ostream(); protected: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_ostream(basic_ostream&& __rhs); -#endif // 27.7.2.3 Assign/swap -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES inline _LIBCPP_INLINE_VISIBILITY basic_ostream& operator=(basic_ostream&& __rhs); #endif @@ -290,7 +288,7 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry() } } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_ostream<_CharT, _Traits>::basic_ostream(basic_ostream&& __rhs) @@ -306,7 +304,7 @@ basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits> basic_ostream<_CharT, _Traits>::~basic_ostream() @@ -1023,7 +1021,7 @@ flush(basic_ostream<_CharT, _Traits>& __os) return __os; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Stream, class _Tp> inline _LIBCPP_INLINE_VISIBILITY @@ -1039,7 +1037,7 @@ operator<<(_Stream&& __os, const _Tp& __x) return _VSTD::move(__os); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template<class _CharT, class _Traits, class _Allocator> basic_ostream<_CharT, _Traits>& diff --git a/include/sstream b/include/sstream index 40b97854f..411374207 100644 --- a/include/sstream +++ b/include/sstream @@ -212,12 +212,10 @@ public: inline _LIBCPP_INLINE_VISIBILITY explicit basic_stringbuf(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG basic_stringbuf(basic_stringbuf&& __rhs); -#endif // 27.8.1.2 Assign and swap: -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_stringbuf& operator=(basic_stringbuf&& __rhs); #endif void swap(basic_stringbuf& __rhs); @@ -255,7 +253,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type& str(__s); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs) @@ -346,7 +344,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> void @@ -641,13 +639,13 @@ public: inline _LIBCPP_INLINE_VISIBILITY explicit basic_istringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_istringstream(basic_istringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_istringstream& operator=(basic_istringstream&& __rhs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY void swap(basic_istringstream& __rhs); @@ -675,7 +673,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri { } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(basic_istringstream&& __rhs) @@ -694,7 +692,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream& return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> void basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rhs) @@ -758,13 +756,13 @@ public: inline _LIBCPP_INLINE_VISIBILITY explicit basic_ostringstream(const string_type& __s, ios_base::openmode __wch = ios_base::out); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_ostringstream(basic_ostringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_ostringstream& operator=(basic_ostringstream&& __rhs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY void swap(basic_ostringstream& __rhs); @@ -792,7 +790,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri { } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(basic_ostringstream&& __rhs) @@ -811,7 +809,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream& return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> void @@ -877,13 +875,13 @@ public: inline _LIBCPP_INLINE_VISIBILITY explicit basic_stringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY basic_stringstream(basic_stringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_stringstream& operator=(basic_stringstream&& __rhs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY void swap(basic_stringstream& __rhs); @@ -911,7 +909,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string { } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(basic_stringstream&& __rhs) @@ -930,7 +928,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&& return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _CharT, class _Traits, class _Allocator> void diff --git a/include/strstream b/include/strstream index 81eef2ab4..b00b9d830 100644 --- a/include/strstream +++ b/include/strstream @@ -151,12 +151,12 @@ public: strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = 0); strstreambuf(const unsigned char* __gnext, streamsize __n); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY strstreambuf(strstreambuf&& __rhs); _LIBCPP_INLINE_VISIBILITY strstreambuf& operator=(strstreambuf&& __rhs); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG virtual ~strstreambuf(); @@ -191,7 +191,7 @@ private: void __init(char* __gnext, streamsize __n, char* __pbeg); }; -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG inline _LIBCPP_INLINE_VISIBILITY strstreambuf::strstreambuf(strstreambuf&& __rhs) @@ -226,7 +226,7 @@ strstreambuf::operator=(strstreambuf&& __rhs) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG class _LIBCPP_TYPE_VIS istrstream : public istream @@ -245,7 +245,7 @@ public: istrstream(char* __s, streamsize __n) : istream(&__sb_), __sb_(__s, __n) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY istrstream(istrstream&& __rhs) : istream(_VSTD::move(__rhs)), @@ -261,7 +261,7 @@ public: __sb_ = _VSTD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG virtual ~istrstream(); @@ -294,7 +294,7 @@ public: __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY ostrstream(ostrstream&& __rhs) : ostream(_VSTD::move(__rhs)), @@ -310,7 +310,7 @@ public: __sb_ = _VSTD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG virtual ~ostrstream(); @@ -354,7 +354,7 @@ public: __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY strstream(strstream&& __rhs) : iostream(_VSTD::move(__rhs)), @@ -370,7 +370,7 @@ public: __sb_ = _VSTD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG virtual ~strstream(); diff --git a/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp index a92ec872a..66409543f 100644 --- a/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::filebuf f; @@ -52,5 +53,4 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp b/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp index f13ee4470..96806fbfe 100644 --- a/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::filebuf f; @@ -50,5 +51,4 @@ int main() assert(f2.sgetc() == L'2'); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp index b5157e90e..b143bd4a5 100644 --- a/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::fstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out @@ -46,5 +47,4 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp index d2ae30286..556cc858a 100644 --- a/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::fstream fso(temp, std::ios_base::in | std::ios_base::out @@ -44,5 +45,4 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp index 9c2fcad33..36fa29a4e 100644 --- a/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ifstream fso("test.dat"); std::ifstream fs; @@ -36,5 +37,4 @@ int main() fs >> x; assert(x == 3.25); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp b/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp index aaac12122..eeb06e0e5 100644 --- a/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ifstream fso("test.dat"); std::ifstream fs = move(fso); @@ -34,5 +35,4 @@ int main() fs >> x; assert(x == 3.25); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp index 0f21eb81d..094f55073 100644 --- a/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::ofstream fso(temp.c_str()); @@ -48,5 +49,4 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp index 8645358cb..fe885cf40 100644 --- a/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp +++ b/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <fstream> // template <class charT, class traits = char_traits<charT> > @@ -20,7 +22,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string temp = get_temp_file_name(); { std::ofstream fso(temp.c_str()); @@ -46,5 +47,4 @@ int main() assert(x == 3.25); } std::remove(temp.c_str()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp b/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp index 2032e935b..cf6c8ae68 100644 --- a/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp +++ b/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <istream> // template <class charT, class traits = char_traits<charT> > @@ -17,7 +19,6 @@ #include <istream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> struct testbuf @@ -37,11 +38,9 @@ struct test_iostream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb1; testbuf<char> sb2; @@ -88,5 +87,4 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp b/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp index c0592e927..e8fd00c7a 100644 --- a/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp +++ b/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <istream> // template <class charT, class traits = char_traits<charT> > @@ -17,7 +19,6 @@ #include <istream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> struct testbuf @@ -37,11 +38,9 @@ struct test_iostream : base(std::move(s)) {} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb; test_iostream<char> is1(&sb); @@ -74,5 +73,4 @@ int main() assert(is.precision() == 6); assert(is.getloc().name() == "C"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp b/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp index 2876d76c1..18887b75d 100644 --- a/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp +++ b/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <istream> // template <class charT, class traits = char_traits<charT> > @@ -17,7 +19,6 @@ #include <istream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> struct testbuf @@ -37,11 +38,9 @@ struct test_istream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb1; testbuf<char> sb2; @@ -88,5 +87,4 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp index 40fe0795d..1b58a9a52 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <ostream> // template <class charT, class traits = char_traits<charT> > @@ -17,7 +19,6 @@ #include <ostream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> struct testbuf @@ -37,11 +38,9 @@ struct test_ostream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb1; testbuf<char> sb2; @@ -88,5 +87,4 @@ int main() assert(os2.precision() == 6); assert(os2.getloc().name() == "C"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp index b3045b323..7d225d495 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <ostream> // template <class charT, class traits = char_traits<charT> > @@ -17,7 +19,6 @@ #include <ostream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> struct testbuf @@ -37,11 +38,9 @@ struct test_ostream : base(std::move(s)) {} }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb; test_ostream<char> os1(&sb); @@ -70,5 +69,4 @@ int main() assert(os.precision() == 6); assert(os.getloc().name() == "C"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp b/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp index 8be0b51d9..83210c087 100644 --- a/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp +++ b/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <ostream> // template <class charT, class traits = char_traits<charT> > @@ -19,7 +21,6 @@ #include <ostream> #include <cassert> -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class CharT> class testbuf @@ -53,11 +54,9 @@ protected: } }; -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf<char> sb; std::ostream(&sb) << "testing..."; @@ -68,5 +67,4 @@ int main() std::wostream(&sb) << L"123"; assert(sb.str() == L"123"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp index e57ad55c9..2a428c5d9 100644 --- a/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ b/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::istringstream ss0(" 123 456"); std::istringstream ss; @@ -82,5 +83,4 @@ int main() s1 >> s; assert(s == L"Dddddddddddddddddd"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp b/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp index adc46ab65..0a45b796b 100644 --- a/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp +++ b/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::istringstream ss0(" 123 456"); std::istringstream ss(std::move(ss0)); @@ -44,5 +45,4 @@ int main() ss >> i; assert(i == 456); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp b/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp index a52068595..8801001f4 100644 --- a/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp +++ b/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ostringstream ss0(" 123 456"); std::ostringstream ss; @@ -42,5 +43,4 @@ int main() ss << i << ' ' << 567; assert(ss.str() == L"234 5676"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp b/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp index 3d9e305e0..67bfc50cd 100644 --- a/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp +++ b/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ostringstream ss0(" 123 456"); std::ostringstream ss(std::move(ss0)); @@ -40,5 +41,4 @@ int main() ss << i << ' ' << 567; assert(ss.str() == L"234 5676"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp b/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp index 4ae3aa6e8..436c76c5b 100644 --- a/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp +++ b/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::stringstream ss0(" 123 456 "); std::stringstream ss(std::move(ss0)); @@ -48,5 +49,4 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp b/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp index 78d682fc4..94de61610 100644 --- a/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp +++ b/test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -22,7 +24,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector<std::istringstream> vecis; vecis.push_back(std::istringstream()); vecis.back().str("hub started at [00 6b 8b 45 69]"); @@ -34,5 +35,4 @@ int main() vecis[n].seekg(0, std::ios_base::beg); assert(vecis[n].str().size() == 31); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp b/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp index ccaf72d7e..3cce695c4 100644 --- a/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp +++ b/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <sstream> // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > @@ -19,7 +21,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::stringstream ss0(" 123 456 "); std::stringstream ss; @@ -50,5 +51,4 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |