Skip to content

Commit cd74eba

Browse files
authored
[libc++] Make a few test helper constructors explicit (#118975)
1 parent b23fc2c commit cd74eba

File tree

1 file changed

+2
-2
lines changed
  • libcxx/test/std/containers/sequences/vector

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct throwing_t {
2020
int* throw_after_n_ = nullptr;
2121
throwing_t() { throw 0; }
2222

23-
throwing_t(int& throw_after_n) : throw_after_n_(&throw_after_n) {
23+
explicit throwing_t(int& throw_after_n) : throw_after_n_(&throw_after_n) {
2424
if (throw_after_n == 0)
2525
throw 0;
2626
--throw_after_n;
@@ -95,7 +95,7 @@ struct throwing_iterator {
9595
int i_;
9696
T v_;
9797

98-
throwing_iterator(int i = 0, const T& v = T()) : i_(i), v_(v) {}
98+
explicit throwing_iterator(int i = 0, const T& v = T()) : i_(i), v_(v) {}
9999

100100
reference operator*() {
101101
if (i_ == 1)

0 commit comments

Comments
 (0)