[libcxx-commits] [libcxx] [libc++][sstream] Explicitly delete special member functions (PR #80254)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 12 03:08:42 PST 2024
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/80254
>From ee057b6f2f011d80fdb79b31cecc60f6430e8865 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Wed, 31 Jan 2024 12:33:05 +0200
Subject: [PATCH 1/4] [libc++][sstream] Add deleted special member functions
The standard declares the copy constructors and copy assign operators as deleted.
References:
- https://eel.is/c++draft/string.streams
---
libcxx/include/sstream | 16 +++++++++++
.../copy.compile.pass.cpp | 25 +++++++++++++++++
.../istringstream.cons/copy.compile.pass.cpp | 25 +++++++++++++++++
.../copy.compile.pass.cpp | 25 +++++++++++++++++
.../ostringstream.cons/copy.compile.pass.cpp | 25 +++++++++++++++++
.../stringbuf.assign/copy.compile.pass.cpp | 27 +++++++++++++++++++
.../stringbuf.cons/copy.compile.pass.cpp | 27 +++++++++++++++++++
.../stringstream.assign/copy.compile.pass.cpp | 25 +++++++++++++++++
.../stringstream.cons/copy.compile.pass.cpp | 25 +++++++++++++++++
9 files changed, 220 insertions(+)
create mode 100644 libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 6c354cf0b39737..2a009b05b2ba69 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -48,10 +48,12 @@ public:
template <class SAlloc>
explicit basic_stringbuf(const basic_string<char_type, traits_type, SAlloc>& s,
ios_base::openmode which = ios_base::in | ios_base::out); // C++20
+ basic_istringstream(const basic_istringstream&) = delete;
basic_stringbuf(basic_stringbuf&& rhs);
basic_stringbuf(basic_stringbuf&& rhs, const allocator_type& a); // C++20
// [stringbuf.assign] Assign and swap:
+ basic_istringstream& operator=(const basic_istringstream&) = delete;
basic_stringbuf& operator=(basic_stringbuf&& rhs);
void swap(basic_stringbuf& rhs) noexcept(see below); // conditionally noexcept since C++20
@@ -119,9 +121,11 @@ public:
template <class SAlloc>
explicit basic_istringstream(const basic_string<char_type, traits_type, SAlloc>& s,
ios_base::openmode which = ios_base::in); // C++20
+ basic_istringstream(const basic_istringstream&) = delete;
basic_istringstream(basic_istringstream&& rhs);
// [istringstream.assign] Assign and swap:
+ basic_istringstream& operator=(const basic_istringstream&) = delete;
basic_istringstream& operator=(basic_istringstream&& rhs);
void swap(basic_istringstream& rhs);
@@ -178,9 +182,11 @@ public:
template <class SAlloc>
explicit basic_ostringstream(const basic_string<char_type, traits_type, SAlloc>& s,
ios_base::openmode which = ios_base::out); // C++20
+ basic_ostringstream(const basic_ostringstream&) = delete;
basic_ostringstream(basic_ostringstream&& rhs);
// [ostringstream.assign] Assign and swap:
+ basic_ostringstream& operator=(const basic_ostringstream&) = delete;
basic_ostringstream& operator=(basic_ostringstream&& rhs);
void swap(basic_ostringstream& rhs);
@@ -237,9 +243,11 @@ public:
template <class SAlloc>
explicit basic_stringstream(const basic_string<char_type, traits_type, SAlloc>& s,
ios_base::openmode which = ios_base::out | ios_base::in); // C++20
+ basic_stringstream(const basic_stringstream&) = delete;
basic_stringstream(basic_stringstream&& rhs);
// [stringstream.assign] Assign and swap:
+ basic_stringstream& operator=(const basic_stringstream&) = delete;
basic_stringstream& operator=(basic_stringstream&& rhs);
void swap(basic_stringstream& rhs);
@@ -364,6 +372,7 @@ public:
}
#endif // _LIBCPP_STD_VER >= 20
+ basic_stringbuf(const basic_stringbuf&) = delete;
basic_stringbuf(basic_stringbuf&& __rhs) : __mode_(__rhs.__mode_) { __move_init(std::move(__rhs)); }
#if _LIBCPP_STD_VER >= 20
@@ -374,6 +383,7 @@ public:
#endif
// [stringbuf.assign] Assign and swap:
+ basic_stringbuf& operator=(const basic_stringbuf&) = delete;
basic_stringbuf& operator=(basic_stringbuf&& __rhs);
void swap(basic_stringbuf& __rhs)
#if _LIBCPP_STD_VER >= 20
@@ -822,12 +832,14 @@ public:
: basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::in) {}
#endif // _LIBCPP_STD_VER >= 20
+ basic_istringstream(const basic_istringstream&) = delete;
_LIBCPP_HIDE_FROM_ABI basic_istringstream(basic_istringstream&& __rhs)
: basic_istream<_CharT, _Traits>(std::move(__rhs)), __sb_(std::move(__rhs.__sb_)) {
basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
// [istringstream.assign] Assign and swap:
+ basic_istringstream& operator=(const basic_istringstream&) = delete;
basic_istringstream& operator=(basic_istringstream&& __rhs) {
basic_istream<char_type, traits_type>::operator=(std::move(__rhs));
__sb_ = std::move(__rhs.__sb_);
@@ -929,12 +941,14 @@ public:
: basic_ostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::out) {}
#endif // _LIBCPP_STD_VER >= 20
+ basic_ostringstream(const basic_ostringstream&) = delete;
_LIBCPP_HIDE_FROM_ABI basic_ostringstream(basic_ostringstream&& __rhs)
: basic_ostream<_CharT, _Traits>(std::move(__rhs)), __sb_(std::move(__rhs.__sb_)) {
basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
// [ostringstream.assign] Assign and swap:
+ basic_ostringstream& operator=(const basic_ostringstream&) = delete;
basic_ostringstream& operator=(basic_ostringstream&& __rhs) {
basic_ostream<char_type, traits_type>::operator=(std::move(__rhs));
__sb_ = std::move(__rhs.__sb_);
@@ -1040,12 +1054,14 @@ public:
: basic_iostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch) {}
#endif // _LIBCPP_STD_VER >= 20
+ basic_stringstream(const basic_stringstream&) = delete;
_LIBCPP_HIDE_FROM_ABI basic_stringstream(basic_stringstream&& __rhs)
: basic_iostream<_CharT, _Traits>(std::move(__rhs)), __sb_(std::move(__rhs.__sb_)) {
basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
// [stringstream.assign] Assign and swap:
+ basic_stringstream& operator=(const basic_stringstream&) = delete;
basic_stringstream& operator=(basic_stringstream&& __rhs) {
basic_iostream<char_type, traits_type>::operator=(std::move(__rhs));
__sb_ = std::move(__rhs.__sb_);
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..f635006a229c3b
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_istringstream& operator=(const basic_istringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..41b91b48044c6f
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_istringstream(const basic_istringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..350bb8ec364341
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_stringstream& operator=(const basic_stringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_constructible<std::stringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wstringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..decde2d94c6657
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_ostringstream(const basic_ostringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_assignable<std::ostringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_assignable<std::wostringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..fa2c96af97d217
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringbuf
+
+// basic_stringbuf(const basic_stringbuf&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_assignable<std::basic_stringbuf<char>>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_assignable<std::basic_stringbuf<wchar_t>>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..f3670b45bec095
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringbuf
+
+// basic_stringbuf(const basic_stringbuf&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_constructible<std::basic_stringbuf<char>>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::basic_stringbuf<wchar_t>>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..e20ebe2899c3ab
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_stringstream& operator=(const basic_stringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_assignable<std::stringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_assignable<std::wstringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
new file mode 100644
index 00000000000000..353df09a9a38a6
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+
+// basic_stringstream(const basic_stringstream&) = delete;
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert(!std::is_copy_constructible< std::stringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible< std::wstringstream>::value, "");
+#endif
>From 3637d75e0f4c93c6c914b6791d5c5740cb18b14d Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Mon, 12 Feb 2024 12:36:57 +0200
Subject: [PATCH 2/4] Fixed synopsis
---
libcxx/include/sstream | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 2a009b05b2ba69..8862e2ef99f8da 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -48,12 +48,12 @@ public:
template <class SAlloc>
explicit basic_stringbuf(const basic_string<char_type, traits_type, SAlloc>& s,
ios_base::openmode which = ios_base::in | ios_base::out); // C++20
- basic_istringstream(const basic_istringstream&) = delete;
+ basic_stringbuf(const basic_stringbuf&) = delete;
basic_stringbuf(basic_stringbuf&& rhs);
basic_stringbuf(basic_stringbuf&& rhs, const allocator_type& a); // C++20
// [stringbuf.assign] Assign and swap:
- basic_istringstream& operator=(const basic_istringstream&) = delete;
+ basic_stringbuf& operator=(const basic_stringbuf&) = delete;
basic_stringbuf& operator=(basic_stringbuf&& rhs);
void swap(basic_stringbuf& rhs) noexcept(see below); // conditionally noexcept since C++20
>From 6bc38731836d1f93d111278af883450d19c5fc81 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Mon, 12 Feb 2024 13:04:21 +0200
Subject: [PATCH 3/4] Addressed comments
---
.../copy.compile.pass.cpp | 25 --------
.../istringstream.cons/copy.compile.pass.cpp | 25 --------
.../istringstream/types.compile.pass.cpp | 62 +++++++++++++++++++
.../istringstream/types.pass.cpp | 39 ------------
.../copy.compile.pass.cpp | 25 --------
.../ostringstream.cons/copy.compile.pass.cpp | 25 --------
.../ostringstream/types.compile.pass.cpp | 62 +++++++++++++++++++
.../ostringstream/types.pass.cpp | 39 ------------
.../stringbuf/types.compile.pass.cpp | 62 +++++++++++++++++++
.../string.streams/stringbuf/types.pass.cpp | 39 ------------
.../stringstream.assign/copy.compile.pass.cpp | 25 --------
.../stringstream.cons/copy.compile.pass.cpp | 25 --------
.../stringstream/types.compile.pass.cpp | 62 +++++++++++++++++++
.../stringstream/types.pass.cpp | 39 ------------
14 files changed, 248 insertions(+), 306 deletions(-)
delete mode 100644 libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/istringstream/types.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/types.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/types.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
create mode 100644 libcxx/test/std/input.output/string.streams/stringstream/types.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
deleted file mode 100644
index f635006a229c3b..00000000000000
--- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.assign/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_istringstream& operator=(const basic_istringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
deleted file mode 100644
index 41b91b48044c6f..00000000000000
--- a/libcxx/test/std/input.output/string.streams/istringstream/istringstream.cons/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_istringstream(const basic_istringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/types.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/types.compile.pass.cpp
new file mode 100644
index 00000000000000..f47295339420e8
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/istringstream/types.compile.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_istringstream
+// : public basic_istream<charT, traits>
+// {
+// public:
+// typedef charT char_type;
+// typedef traits traits_type;
+// typedef typename traits_type::int_type int_type;
+// typedef typename traits_type::pos_type pos_type;
+// typedef typename traits_type::off_type off_type;
+// typedef Allocator allocator_type;
+//
+// basic_istringstream(const basic_istringstream&) = delete;
+// basic_istringstream& operator=(const basic_istringstream&) = delete;
+//
+// basic_istringstream(basic_istringstream&& rhs);
+// basic_istringstream& operator=(basic_istringstream&& rhs);
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+// Types
+
+static_assert((std::is_base_of<std::basic_istream<char>, std::basic_istringstream<char> >::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::char_type, char>::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::traits_type, std::char_traits<char> >::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
+static_assert((std::is_same<std::basic_istringstream<char>::allocator_type, std::allocator<char> >::value), "");
+
+// Copy properties
+
+static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
+#endif
+
+// Move properties
+
+static_assert(std::is_move_constructible<std::istringstream>::value, "");
+static_assert(std::is_move_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(std::is_move_constructible<std::wistringstream>::value, "");
+static_assert(std::is_move_assignable<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp
deleted file mode 100644
index da1b1de7358d82..00000000000000
--- a/libcxx/test/std/input.output/string.streams/istringstream/types.pass.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_istringstream
-// : public basic_istream<charT, traits>
-// {
-// public:
-// typedef charT char_type;
-// typedef traits traits_type;
-// typedef typename traits_type::int_type int_type;
-// typedef typename traits_type::pos_type pos_type;
-// typedef typename traits_type::off_type off_type;
-// typedef Allocator allocator_type;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-int main(int, char**)
-{
- static_assert((std::is_base_of<std::basic_istream<char>, std::basic_istringstream<char> >::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::char_type, char>::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::traits_type, std::char_traits<char> >::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
- static_assert((std::is_same<std::basic_istringstream<char>::allocator_type, std::allocator<char> >::value), "");
-
- return 0;
-}
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
deleted file mode 100644
index 350bb8ec364341..00000000000000
--- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.assign/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_stringstream& operator=(const basic_stringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_constructible<std::stringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_constructible<std::wstringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
deleted file mode 100644
index decde2d94c6657..00000000000000
--- a/libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.cons/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_ostringstream(const basic_ostringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_assignable<std::ostringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_assignable<std::wostringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/types.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/types.compile.pass.cpp
new file mode 100644
index 00000000000000..72335ad64c21f2
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/ostringstream/types.compile.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_ostringstream
+// : public basic_ostream<charT, traits>
+// {
+// public:
+// typedef charT char_type;
+// typedef traits traits_type;
+// typedef typename traits_type::int_type int_type;
+// typedef typename traits_type::pos_type pos_type;
+// typedef typename traits_type::off_type off_type;
+// typedef Allocator allocator_type;
+//
+// basic_ostringstream(const basic_ostringstream&) = delete;
+// basic_ostringstream& operator=(const basic_ostringstream&) = delete;
+//
+// basic_ostringstream(basic_ostringstream&& rhs);
+// basic_ostringstream& operator=(basic_ostringstream&& rhs);
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+// Types
+
+static_assert((std::is_base_of<std::basic_ostream<char>, std::basic_ostringstream<char> >::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::char_type, char>::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::traits_type, std::char_traits<char> >::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
+static_assert((std::is_same<std::basic_ostringstream<char>::allocator_type, std::allocator<char> >::value), "");
+
+// Copy properties
+
+static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
+#endif
+
+// Move properties
+
+static_assert(std::is_move_constructible<std::istringstream>::value, "");
+static_assert(std::is_move_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(std::is_move_constructible<std::wistringstream>::value, "");
+static_assert(std::is_move_assignable<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp
deleted file mode 100644
index b29419279a37cb..00000000000000
--- a/libcxx/test/std/input.output/string.streams/ostringstream/types.pass.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_ostringstream
-// : public basic_ostream<charT, traits>
-// {
-// public:
-// typedef charT char_type;
-// typedef traits traits_type;
-// typedef typename traits_type::int_type int_type;
-// typedef typename traits_type::pos_type pos_type;
-// typedef typename traits_type::off_type off_type;
-// typedef Allocator allocator_type;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-int main(int, char**)
-{
- static_assert((std::is_base_of<std::basic_ostream<char>, std::basic_ostringstream<char> >::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::char_type, char>::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::traits_type, std::char_traits<char> >::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
- static_assert((std::is_same<std::basic_ostringstream<char>::allocator_type, std::allocator<char> >::value), "");
-
- return 0;
-}
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/types.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/types.compile.pass.cpp
new file mode 100644
index 00000000000000..71a362e8f084b6
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringbuf/types.compile.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringbuf
+// : public basic_streambuf<charT, traits>
+// {
+// public:
+// typedef charT char_type;
+// typedef traits traits_type;
+// typedef typename traits_type::int_type int_type;
+// typedef typename traits_type::pos_type pos_type;
+// typedef typename traits_type::off_type off_type;
+// typedef Allocator allocator_type;
+//
+// basic_streambuf(const basic_streambuf&) = delete;
+// basic_streambuf& operator=(const basic_streambuf&) = delete;
+//
+// basic_streambuf(basic_streambuf&& rhs);
+// basic_streambuf& operator=(basic_streambuf&& rhs);
+
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+static_assert((std::is_base_of<std::basic_streambuf<char>, std::basic_stringbuf<char> >::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::char_type, char>::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::traits_type, std::char_traits<char> >::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::int_type, std::char_traits<char>::int_type>::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::off_type, std::char_traits<char>::off_type>::value), "");
+static_assert((std::is_same<std::basic_stringbuf<char>::allocator_type, std::allocator<char> >::value), "");
+
+
+// Copy properties
+
+static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
+#endif
+
+// Move properties
+
+static_assert(std::is_move_constructible<std::istringstream>::value, "");
+static_assert(std::is_move_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(std::is_move_constructible<std::wistringstream>::value, "");
+static_assert(std::is_move_assignable<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp
deleted file mode 100644
index cec616947a04af..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringbuf/types.pass.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringbuf
-// : public basic_streambuf<charT, traits>
-// {
-// public:
-// typedef charT char_type;
-// typedef traits traits_type;
-// typedef typename traits_type::int_type int_type;
-// typedef typename traits_type::pos_type pos_type;
-// typedef typename traits_type::off_type off_type;
-// typedef Allocator allocator_type;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-int main(int, char**)
-{
- static_assert((std::is_base_of<std::basic_streambuf<char>, std::basic_stringbuf<char> >::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::char_type, char>::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::traits_type, std::char_traits<char> >::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::int_type, std::char_traits<char>::int_type>::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::off_type, std::char_traits<char>::off_type>::value), "");
- static_assert((std::is_same<std::basic_stringbuf<char>::allocator_type, std::allocator<char> >::value), "");
-
- return 0;
-}
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
deleted file mode 100644
index e20ebe2899c3ab..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.assign/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_stringstream& operator=(const basic_stringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_assignable<std::stringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_assignable<std::wstringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
deleted file mode 100644
index 353df09a9a38a6..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringstream/stringstream.cons/copy.compile.pass.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-
-// basic_stringstream(const basic_stringstream&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_constructible< std::stringstream>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_constructible< std::wstringstream>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/types.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/types.compile.pass.cpp
new file mode 100644
index 00000000000000..fc9b66d4f13010
--- /dev/null
+++ b/libcxx/test/std/input.output/string.streams/stringstream/types.compile.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <sstream>
+
+// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+// class basic_stringstream
+// : public basic_iostream<charT, traits>
+// {
+// public:
+// typedef charT char_type;
+// typedef traits traits_type;
+// typedef typename traits_type::int_type int_type;
+// typedef typename traits_type::pos_type pos_type;
+// typedef typename traits_type::off_type off_type;
+// typedef Allocator allocator_type;
+//
+// basic_stringstream(const basic_stringstream&) = delete;
+// basic_stringstream& operator=(const basic_stringstream&) = delete;
+//
+// basic_stringstream(basic_stringstream&& rhs);
+// basic_stringstream& operator=(basic_stringstream&& rhs);
+
+#include <sstream>
+#include <type_traits>
+
+#include "test_macros.h"
+
+// Types
+
+static_assert((std::is_base_of<std::basic_iostream<char>, std::basic_stringstream<char> >::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::char_type, char>::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::traits_type, std::char_traits<char> >::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
+static_assert((std::is_same<std::basic_stringstream<char>::allocator_type, std::allocator<char> >::value), "");
+
+// Copy properties
+
+static_assert(!std::is_copy_constructible<std::istringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(!std::is_copy_constructible<std::wistringstream>::value, "");
+static_assert(!std::is_copy_assignable<std::wistringstream>::value, "");
+#endif
+
+// Move properties
+
+static_assert(std::is_move_constructible<std::istringstream>::value, "");
+static_assert(std::is_move_assignable<std::istringstream>::value, "");
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+static_assert(std::is_move_constructible<std::wistringstream>::value, "");
+static_assert(std::is_move_assignable<std::wistringstream>::value, "");
+#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp
deleted file mode 100644
index 11990e6a57f818..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringstream/types.pass.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringstream
-// : public basic_iostream<charT, traits>
-// {
-// public:
-// typedef charT char_type;
-// typedef traits traits_type;
-// typedef typename traits_type::int_type int_type;
-// typedef typename traits_type::pos_type pos_type;
-// typedef typename traits_type::off_type off_type;
-// typedef Allocator allocator_type;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-int main(int, char**)
-{
- static_assert((std::is_base_of<std::basic_iostream<char>, std::basic_stringstream<char> >::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::char_type, char>::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::traits_type, std::char_traits<char> >::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::int_type, std::char_traits<char>::int_type>::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::pos_type, std::char_traits<char>::pos_type>::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::off_type, std::char_traits<char>::off_type>::value), "");
- static_assert((std::is_same<std::basic_stringstream<char>::allocator_type, std::allocator<char> >::value), "");
-
- return 0;
-}
>From b2e7b0af4f6c0981f91e1e82bb30bfd3f97ecdbc Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Mon, 12 Feb 2024 13:08:26 +0200
Subject: [PATCH 4/4] Deleted files
---
.../stringbuf.assign/copy.compile.pass.cpp | 27 -------------------
.../stringbuf.cons/copy.compile.pass.cpp | 27 -------------------
2 files changed, 54 deletions(-)
delete mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
delete mode 100644 libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
deleted file mode 100644
index fa2c96af97d217..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.assign/copy.compile.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringbuf
-
-// basic_stringbuf(const basic_stringbuf&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_assignable<std::basic_stringbuf<char>>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_assignable<std::basic_stringbuf<wchar_t>>::value, "");
-#endif
diff --git a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp b/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
deleted file mode 100644
index f3670b45bec095..00000000000000
--- a/libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/copy.compile.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++03
-
-// <sstream>
-
-// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-// class basic_stringbuf
-
-// basic_stringbuf(const basic_stringbuf&) = delete;
-
-#include <sstream>
-#include <type_traits>
-
-#include "test_macros.h"
-
-static_assert(!std::is_copy_constructible<std::basic_stringbuf<char>>::value, "");
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-static_assert(!std::is_copy_constructible<std::basic_stringbuf<wchar_t>>::value, "");
-#endif
More information about the libcxx-commits
mailing list