We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9344a7c commit cfd24cdCopy full SHA for cfd24cd
libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
@@ -65,16 +65,6 @@ template <typename T, typename U>
65
bool operator!=(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs) {
66
return lhs.imp != rhs.imp;
67
}
68
-
69
-template <class S>
70
-TEST_CONSTEXPR_CXX20 void test_assign(S& s1, const S& s2) {
71
- try {
72
- s1 = s2;
73
- } catch (std::bad_alloc&) {
74
- return;
75
- }
76
- assert(false);
77
-}
78
#endif
79
80
template <class S>
@@ -122,7 +112,11 @@ TEST_CONSTEXPR_CXX20 bool test() {
122
112
assert(s2 == p2);
123
113
124
114
imp2.deactivate();
125
- test_assign(s1, s2);
115
+ try {
116
+ s1 = s2;
117
+ assert(false);
118
+ } catch (std::bad_alloc&) {
119
+ }
126
120
assert(s1 == p1);
127
121
128
0 commit comments