Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Make a few test helper constructors explicit #118975

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcxx/test/std/containers/sequences/vector/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct throwing_t {
int* throw_after_n_ = nullptr;
throwing_t() { throw 0; }

throwing_t(int& throw_after_n) : throw_after_n_(&throw_after_n) {
explicit throwing_t(int& throw_after_n) : throw_after_n_(&throw_after_n) {
if (throw_after_n == 0)
throw 0;
--throw_after_n;
Expand Down Expand Up @@ -95,7 +95,7 @@ struct throwing_iterator {
int i_;
T v_;

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

reference operator*() {
if (i_ == 1)
Expand Down
Loading