[libcxx-commits] [libcxx] a8d1182 - [libc++] Remove some _LIBCPP_CXX03_LANG from iostreams headers.
Arthur O'Dwyer via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 28 09:55:52 PDT 2021
Author: Arthur O'Dwyer
Date: 2021-06-28T12:55:26-04:00
New Revision: a8d1182f661ccecd99efd4e543fddf3172c67a95
URL: https://github.com/llvm/llvm-project/commit/a8d1182f661ccecd99efd4e543fddf3172c67a95
DIFF: https://github.com/llvm/llvm-project/commit/a8d1182f661ccecd99efd4e543fddf3172c67a95.diff
LOG: [libc++] Remove some _LIBCPP_CXX03_LANG from iostreams headers.
With the STL containers, I didn't enable move operations in C++03 mode
because that would change the overload resolution for things that today
are copy operations. With iostreams, though, the copy operations aren't
present at all, and so I see no problem with enabling move operations
even in (Clang's greatly extended) C++03 mode.
Clang's C++03 mode does not support delegating constructors.
Differential Revision: https://reviews.llvm.org/D104310
Added:
Modified:
libcxx/include/fstream
libcxx/include/ios
libcxx/include/istream
libcxx/include/ostream
libcxx/include/sstream
libcxx/include/string
libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp
libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp
libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp
libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp
libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp
libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp
libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp
libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp
libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp
libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp
libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp
libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp
libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/include/fstream b/libcxx/include/fstream
index 09af0d91e79b6..c522b8ab110d7 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -219,16 +219,12 @@ public:
// 27.9.1.2 Constructors/destructor:
basic_filebuf();
-#ifndef _LIBCPP_CXX03_LANG
basic_filebuf(basic_filebuf&& __rhs);
-#endif
virtual ~basic_filebuf();
// 27.9.1.3 Assign/swap:
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
basic_filebuf& operator=(basic_filebuf&& __rhs);
-#endif
void swap(basic_filebuf& __rhs);
// 27.9.1.4 Members:
@@ -318,8 +314,6 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf()
setbuf(nullptr, 4096);
}
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs)
: basic_streambuf<_CharT, _Traits>(__rhs)
@@ -394,8 +388,6 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_filebuf<_CharT, _Traits>::~basic_filebuf()
{
@@ -1164,13 +1156,10 @@ public:
: basic_ifstream(__p.c_str(), __mode) {}
#endif // _LIBCPP_STD_VER >= 17
#endif
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
basic_ifstream(basic_ifstream&& __rhs);
-
_LIBCPP_INLINE_VISIBILITY
basic_ifstream& operator=(basic_ifstream&& __rhs);
-#endif
_LIBCPP_INLINE_VISIBILITY
void swap(basic_ifstream& __rhs);
@@ -1240,8 +1229,6 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ifstream<_CharT, _Traits>::basic_ifstream(basic_ifstream&& __rhs)
@@ -1261,8 +1248,6 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
@@ -1379,13 +1364,10 @@ public:
: basic_ofstream(__p.c_str(), __mode) {}
#endif // _LIBCPP_STD_VER >= 17
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
basic_ofstream(basic_ofstream&& __rhs);
-
_LIBCPP_INLINE_VISIBILITY
basic_ofstream& operator=(basic_ofstream&& __rhs);
-#endif
_LIBCPP_INLINE_VISIBILITY
void swap(basic_ofstream& __rhs);
@@ -1454,8 +1436,6 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ofstream<_CharT, _Traits>::basic_ofstream(basic_ofstream&& __rhs)
@@ -1475,8 +1455,6 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
@@ -1595,13 +1573,12 @@ public:
#endif // _LIBCPP_STD_VER >= 17
#endif
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
basic_fstream(basic_fstream&& __rhs);
_LIBCPP_INLINE_VISIBILITY
basic_fstream& operator=(basic_fstream&& __rhs);
-#endif
+
_LIBCPP_INLINE_VISIBILITY
void swap(basic_fstream& __rhs);
@@ -1668,8 +1645,6 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_fstream<_CharT, _Traits>::basic_fstream(basic_fstream&& __rhs)
@@ -1689,8 +1664,6 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
diff --git a/libcxx/include/ios b/libcxx/include/ios
index eefb58f55be13..3128bca899990 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -662,10 +662,8 @@ protected:
_LIBCPP_INLINE_VISIBILITY
void move(basic_ios& __rhs);
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void move(basic_ios&& __rhs) {move(__rhs);}
-#endif
_LIBCPP_INLINE_VISIBILITY
void swap(basic_ios& __rhs) _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
diff --git a/libcxx/include/istream b/libcxx/include/istream
index 531280719b30e..17ca68388f523 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -192,14 +192,12 @@ public:
{ this->init(__sb); }
virtual ~basic_istream();
protected:
-#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY
basic_istream(basic_istream&& __rhs);
// 27.7.1.1.2 Assign/swap:
inline _LIBCPP_INLINE_VISIBILITY
basic_istream& operator=(basic_istream&& __rhs);
-#endif
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
void swap(basic_istream& __rhs) {
@@ -207,10 +205,8 @@ protected:
basic_ios<char_type, traits_type>::swap(__rhs);
}
-#ifndef _LIBCPP_CXX03_LANG
basic_istream (const basic_istream& __rhs) = delete;
basic_istream& operator=(const basic_istream& __rhs) = delete;
-#endif
public:
// 27.7.1.1.3 Prefix/suffix:
@@ -333,8 +329,6 @@ basic_istream<_CharT, _Traits>::sentry::sentry(basic_istream<_CharT, _Traits>& _
__is.setstate(ios_base::failbit);
}
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs)
: __gc_(__rhs.__gc_)
@@ -351,8 +345,6 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::~basic_istream()
{
@@ -1416,21 +1408,18 @@ public:
virtual ~basic_iostream();
protected:
-#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY
basic_iostream(basic_iostream&& __rhs);
// assign/swap
inline _LIBCPP_INLINE_VISIBILITY
basic_iostream& operator=(basic_iostream&& __rhs);
-#endif
+
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
void swap(basic_iostream& __rhs)
{ basic_istream<char_type, traits_type>::swap(__rhs); }
};
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs)
: basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
@@ -1445,8 +1434,6 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>::~basic_iostream()
{
@@ -1570,8 +1557,6 @@ getline(basic_istream<_CharT, _Traits>& __is,
return getline(__is, __str, __is.widen('\n'));
}
-#ifndef _LIBCPP_CXX03_LANG
-
template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
@@ -1590,8 +1575,6 @@ getline(basic_istream<_CharT, _Traits>&& __is,
return getline(__is, __str, __is.widen('\n'));
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits, size_t _Size>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
diff --git a/libcxx/include/ostream b/libcxx/include/ostream
index 81ba565e67f53..efeaee253eb97 100644
--- a/libcxx/include/ostream
+++ b/libcxx/include/ostream
@@ -165,27 +165,21 @@ public:
{ this->init(__sb); }
virtual ~basic_ostream();
protected:
-#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream(basic_ostream&& __rhs);
// 27.7.2.3 Assign/swap
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream& operator=(basic_ostream&& __rhs);
-#endif
+
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
void swap(basic_ostream& __rhs)
{ basic_ios<char_type, traits_type>::swap(__rhs); }
-#ifndef _LIBCPP_CXX03_LANG
basic_ostream (const basic_ostream& __rhs) = delete;
basic_ostream& operator=(const basic_ostream& __rhs) = delete;
-#else
- basic_ostream (const basic_ostream& __rhs); // not defined
- basic_ostream& operator=(const basic_ostream& __rhs); // not defined
-#endif
-public:
+public:
// 27.7.2.4 Prefix/suffix:
class _LIBCPP_TEMPLATE_VIS sentry;
@@ -291,8 +285,6 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry()
}
}
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::basic_ostream(basic_ostream&& __rhs)
{
@@ -307,8 +299,6 @@ basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::~basic_ostream()
{
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 0b614a0b09562..fbe5ffcab4c6e 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -219,19 +219,13 @@ private:
public:
// 30.8.2.1 [stringbuf.cons], constructors
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {}
+ basic_stringbuf()
+ : __hm_(nullptr), __mode_(ios_base::in | ios_base::out) {}
_LIBCPP_INLINE_VISIBILITY
explicit basic_stringbuf(ios_base::openmode __wch)
: __hm_(nullptr), __mode_(__wch) {}
-#else
- _LIBCPP_INLINE_VISIBILITY
- explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in |
- ios_base::out)
- : __hm_(nullptr), __mode_(__wch) {}
-#endif
_LIBCPP_INLINE_VISIBILITY
explicit basic_stringbuf(const string_type& __s,
@@ -643,18 +637,13 @@ private:
public:
// 30.8.3.1 [istringstream.cons], constructors
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- basic_istringstream() : basic_istringstream(ios_base::in) {}
+ basic_istringstream()
+ : basic_istream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in) {}
_LIBCPP_INLINE_VISIBILITY
explicit basic_istringstream(ios_base::openmode __wch)
: basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {}
-#else
- _LIBCPP_INLINE_VISIBILITY
- explicit basic_istringstream(ios_base::openmode __wch = ios_base::in)
- : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {}
-#endif
_LIBCPP_INLINE_VISIBILITY
explicit basic_istringstream(const string_type& __s,
@@ -728,20 +717,13 @@ private:
public:
// 30.8.4.1 [ostringstream.cons], constructors
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- basic_ostringstream() : basic_ostringstream(ios_base::out) {}
+ basic_ostringstream()
+ : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::out) {}
_LIBCPP_INLINE_VISIBILITY
explicit basic_ostringstream(ios_base::openmode __wch)
- : basic_ostream<_CharT, _Traits>(&__sb_),
- __sb_(__wch | ios_base::out) {}
-#else
- _LIBCPP_INLINE_VISIBILITY
- explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out)
- : basic_ostream<_CharT, _Traits>(&__sb_),
- __sb_(__wch | ios_base::out) {}
-#endif
+ : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::out) {}
_LIBCPP_INLINE_VISIBILITY
explicit basic_ostringstream(const string_type& __s,
@@ -816,19 +798,13 @@ private:
public:
// 30.8.5.1 [stringstream.cons], constructors
-#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- basic_stringstream() : basic_stringstream(ios_base::in | ios_base::out) {}
+ basic_stringstream()
+ : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in | ios_base::out) {}
_LIBCPP_INLINE_VISIBILITY
explicit basic_stringstream(ios_base::openmode __wch)
: basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {}
-#else
- _LIBCPP_INLINE_VISIBILITY
- explicit basic_stringstream(ios_base::openmode __wch = ios_base::in |
- ios_base::out)
- : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {}
-#endif
_LIBCPP_INLINE_VISIBILITY
explicit basic_stringstream(const string_type& __s,
diff --git a/libcxx/include/string b/libcxx/include/string
index c5e0745250ee4..3917c07a1f744 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -4439,8 +4439,6 @@ basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str);
-#ifndef _LIBCPP_CXX03_LANG
-
template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
@@ -4453,8 +4451,6 @@ basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>&& __is,
basic_string<_CharT, _Traits, _Allocator>& __str);
-#endif // _LIBCPP_CXX03_LANG
-
#if _LIBCPP_STD_VER > 17
template <class _CharT, class _Traits, class _Allocator, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp
index 69ccd202564db..173c9d110ffc4 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp
index 0a541670858e0..38aba56540f0d 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
@@ -31,7 +29,7 @@ int main(int, char**)
assert(f.sputn("123", 3) == 3);
f.pubseekoff(1, std::ios_base::beg);
assert(f.sgetc() == '2');
- std::filebuf f2(move(f));
+ std::filebuf f2(std::move(f));
assert(!f.is_open());
assert(f2.is_open());
assert(f2.sgetc() == '2');
@@ -45,7 +43,7 @@ int main(int, char**)
assert(f.sputn(L"123", 3) == 3);
f.pubseekoff(1, std::ios_base::beg);
assert(f.sgetc() == L'2');
- std::wfilebuf f2(move(f));
+ std::wfilebuf f2(std::move(f));
assert(!f.is_open());
assert(f2.is_open());
assert(f2.sgetc() == L'2');
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp
index 6032b21c579c3..9bc7887f839fd 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp
index 9166737543a0e..e210b562ac949 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
@@ -26,7 +24,7 @@ int main(int, char**)
{
std::fstream fso(temp, std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
- std::fstream fs = move(fso);
+ std::fstream fs = std::move(fso);
double x = 0;
fs << 3.25;
fs.seekg(0);
@@ -37,7 +35,7 @@ int main(int, char**)
{
std::wfstream fso(temp, std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
- std::wfstream fs = move(fso);
+ std::wfstream fs = std::move(fso);
double x = 0;
fs << 3.25;
fs.seekg(0);
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
index b9df31149efdc..439db87a0eba3 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
// FILE_DEPENDENCIES: test.dat
// <fstream>
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
index 03475e17beef0..28f55f6a857db 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
// FILE_DEPENDENCIES: test.dat
// <fstream>
@@ -25,14 +24,14 @@ int main(int, char**)
{
{
std::ifstream fso("test.dat");
- std::ifstream fs = move(fso);
+ std::ifstream fs = std::move(fso);
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fso("test.dat");
- std::wifstream fs = move(fso);
+ std::wifstream fs = std::move(fso);
double x = 0;
fs >> x;
assert(x == 3.25);
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp
index 720bcf0e77486..4db1e6c3b35fb 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp
index 60fbf2b9e360e..01676f0e75a0d 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
@@ -25,7 +23,7 @@ int main(int, char**)
std::string temp = get_temp_file_name();
{
std::ofstream fso(temp.c_str());
- std::ofstream fs = move(fso);
+ std::ofstream fs = std::move(fso);
fs << 3.25;
}
{
@@ -37,7 +35,7 @@ int main(int, char**)
std::remove(temp.c_str());
{
std::wofstream fso(temp.c_str());
- std::wofstream fs = move(fso);
+ std::wofstream fs = std::move(fso);
fs << 3.25;
}
{
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp
index 7b02842610d5b..fb1f524c7123e 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp
index 514cde055875a..2a4e1a6b1123b 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp
index bd901171cc8ee..7899c63e8293e 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp
index c5f10fa0145c2..90e5315a662b3 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
@@ -47,10 +45,7 @@ struct test_istream
};
-
int main(int, char**)
{
-
-
return 0;
}
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp
index 22163156c2c82..fb071ba970163 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp
index b529970a2883c..8fcb0c2b1ee97 100644
--- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <ostream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp
index 345388baf6e94..73991b36f6c9b 100644
--- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <ostream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp b/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp
index 76eb83148b398..13f90d92899ed 100644
--- a/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp
+++ b/libcxx/test/std/input.output/iostreams.base/is_error_code_enum_io_errc.pass.cpp
@@ -5,8 +5,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-//
-// UNSUPPORTED: c++03
// <ios>
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp
index c9b701397d761..93c8313d85909 100644
--- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp
index e4f1f2b4ddbf3..650284d87b706 100644
--- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp
index 52e4ace45efff..8be3a43fe38db 100644
--- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp
index 3a3f42f009c20..6823bb69bc627 100644
--- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp
index 9fb588d1a4304..af1eb38c349b4 100644
--- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/move.pass.cpp
@@ -22,32 +22,32 @@ int main(int, char**)
{
{
std::stringbuf buf1("testing");
- std::stringbuf buf(move(buf1));
+ std::stringbuf buf(std::move(buf1));
assert(buf.str() == "testing");
}
{
std::stringbuf buf1("testing", std::ios_base::in);
- std::stringbuf buf(move(buf1));
+ std::stringbuf buf(std::move(buf1));
assert(buf.str() == "testing");
}
{
std::stringbuf buf1("testing", std::ios_base::out);
- std::stringbuf buf(move(buf1));
+ std::stringbuf buf(std::move(buf1));
assert(buf.str() == "testing");
}
{
std::wstringbuf buf1(L"testing");
- std::wstringbuf buf(move(buf1));
+ std::wstringbuf buf(std::move(buf1));
assert(buf.str() == L"testing");
}
{
std::wstringbuf buf1(L"testing", std::ios_base::in);
- std::wstringbuf buf(move(buf1));
+ std::wstringbuf buf(std::move(buf1));
assert(buf.str() == L"testing");
}
{
std::wstringbuf buf1(L"testing", std::ios_base::out);
- std::wstringbuf buf(move(buf1));
+ std::wstringbuf buf(std::move(buf1));
assert(buf.str() == L"testing");
}
diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp
index 71c385a068060..642fd752a8f46 100644
--- a/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp
index e2a750651c6eb..91a685d2db9f7 100644
--- a/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp
index af2e62a5c808b..d2e5ab5488bdd 100644
--- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <string>
// template<class charT, class traits, class Allocator>
@@ -35,13 +33,13 @@ int main(int, char**)
assert(s == L" abc");
}
{
- typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+ typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
S s("initial text");
getline(std::istringstream(" abc* def* ghij"), s, '*');
assert(s == " abc");
}
{
- typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, min_allocator<wchar_t>> S;
+ typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, min_allocator<wchar_t> > S;
S s(L"initial text");
getline(std::wistringstream(L" abc* def* ghij"), s, L'*');
assert(s == L" abc");
diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp
index 322b49b9c6e7e..3fb35cc24d66b 100644
--- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <string>
// template<class charT, class traits, class Allocator>
@@ -35,13 +33,13 @@ int main(int, char**)
assert(s == L" abc");
}
{
- typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+ typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
S s("initial text");
getline(std::istringstream(" abc\n def\n ghij"), s);
assert(s == " abc");
}
{
- typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, min_allocator<wchar_t>> S;
+ typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, min_allocator<wchar_t> > S;
S s(L"initial text");
getline(std::wistringstream(L" abc\n def\n ghij"), s);
assert(s == L" abc");
More information about the libcxx-commits
mailing list