// 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:
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)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_filebuf<_CharT, _Traits>::~basic_filebuf()
{
: 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);
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ifstream<_CharT, _Traits>::basic_ifstream(basic_ifstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
: 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);
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_ofstream<_CharT, _Traits>::basic_ofstream(basic_ofstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
#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);
}
#endif
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
basic_fstream<_CharT, _Traits>::basic_fstream(basic_fstream&& __rhs)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
inline
void
_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
{ 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) {
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:
__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_)
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::~basic_istream()
{
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))
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>::~basic_iostream()
{
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>&
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)
{ 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;
}
}
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::basic_ostream(basic_ostream&& __rhs)
{
return *this;
}
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::~basic_ostream()
{
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,
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,
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,
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,
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>&
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
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
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');
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');
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
{
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);
{
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);
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
// FILE_DEPENDENCIES: test.dat
// <fstream>
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
// FILE_DEPENDENCIES: test.dat
// <fstream>
{
{
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);
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <fstream>
// template <class charT, class traits = char_traits<charT> >
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;
}
{
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;
}
{
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
};
-
int main(int, char**)
{
-
-
return 0;
}
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <istream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <ostream>
// template <class charT, class traits = char_traits<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <ostream>
// template <class charT, class traits = char_traits<charT> >
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-//
-// UNSUPPORTED: c++03
// <ios>
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
{
{
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");
}
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <sstream>
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <string>
// template<class charT, class traits, class Allocator>
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");
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
-
// <string>
// template<class charT, class traits, class Allocator>
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");