[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
NOKEYCHECK=True
GitOrigin-RevId: a8d1182f661ccecd99efd4e543fddf3172c67a95
diff --git a/include/fstream b/include/fstream
index 09af0d9..c522b8a 100644
--- a/include/fstream
+++ b/include/fstream
@@ -219,16 +219,12 @@
// 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 @@
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 @@
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_filebuf<_CharT, _Traits>::~basic_filebuf()
{
@@ -1164,13 +1156,10 @@
: 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 @@
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ifstream<_CharT, _Traits>::basic_ifstream(basic_ifstream&& __rhs)
@@ -1261,8 +1248,6 @@
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
@@ -1379,13 +1364,10 @@
: 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 @@
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ofstream<_CharT, _Traits>::basic_ofstream(basic_ofstream&& __rhs)
@@ -1475,8 +1455,6 @@
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
@@ -1595,13 +1573,12 @@
#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 @@
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_fstream<_CharT, _Traits>::basic_fstream(basic_fstream&& __rhs)
@@ -1689,8 +1664,6 @@
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void