Skip to content

Commit 5034dd6

Browse files
committed
Refactor
1 parent ab69a8f commit 5034dd6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

libcxx/test/std/containers/sequences/vector/common.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ struct throwing_t {
5050

5151
template <class T>
5252
struct throwing_allocator {
53-
using value_type = T;
54-
using is_always_equal = std::false_type;
53+
using value_type = T;
5554

5655
bool throw_on_copy_ = false;
5756

libcxx/test/std/containers/sequences/vector/vector.cons/exceptions.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ int main(int, char**) {
4444
}
4545
check_new_delete_called();
4646

47-
try { // Throw in vector(size_type, const allocator_type&) from allocator
48-
throwing_allocator<int> alloc(false, true); // throw on copy only
47+
try { // Throw in vector(size_type, const allocator_type&) from allocator
48+
throwing_allocator<int> alloc(/*throw_on_ctor = */ false, /*throw_on_copy = */ true);
4949
AllocVec get_alloc(0, alloc);
5050
} catch (int) {
5151
}
@@ -106,7 +106,7 @@ int main(int, char**) {
106106

107107
try { // Throw in vector(InputIterator, InputIterator, const allocator_type&) from allocator
108108
int a[] = {1, 2};
109-
throwing_allocator<int> alloc(false, true); // throw on copy only
109+
throwing_allocator<int> alloc(/*throw_on_ctor = */ false, /*throw_on_copy = */ true);
110110
AllocVec vec(cpp17_input_iterator<int*>(a), cpp17_input_iterator<int*>(a + 2), alloc);
111111
} catch (int) {
112112
// FIXME: never called.
@@ -115,7 +115,7 @@ int main(int, char**) {
115115

116116
try { // Throw in vector(InputIterator, InputIterator, const allocator_type&) from allocator
117117
int a[] = {1, 2};
118-
throwing_allocator<int> alloc(false, true); // throw on copy only
118+
throwing_allocator<int> alloc(/*throw_on_ctor = */ false, /*throw_on_copy = */ true);
119119
AllocVec vec(forward_iterator<int*>(a), forward_iterator<int*>(a + 2), alloc);
120120
} catch (int) {
121121
// FIXME: never called.

0 commit comments

Comments
 (0)