[libcxx-commits] [libcxx] cd74eba - [libc++] Make a few test helper constructors explicit (#118975)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 6 12:31:23 PST 2024
Author: Louis Dionne
Date: 2024-12-06T15:31:20-05:00
New Revision: cd74ebaec606e35485f007e3dcf2609f4cf9bef6
URL: https://github.com/llvm/llvm-project/commit/cd74ebaec606e35485f007e3dcf2609f4cf9bef6
DIFF: https://github.com/llvm/llvm-project/commit/cd74ebaec606e35485f007e3dcf2609f4cf9bef6.diff
LOG: [libc++] Make a few test helper constructors explicit (#118975)
Added:
Modified:
libcxx/test/std/containers/sequences/vector/common.h
Removed:
################################################################################
diff --git a/libcxx/test/std/containers/sequences/vector/common.h b/libcxx/test/std/containers/sequences/vector/common.h
index cd57b6cc3e7235..ff8147ef6b838b 100644
--- a/libcxx/test/std/containers/sequences/vector/common.h
+++ b/libcxx/test/std/containers/sequences/vector/common.h
@@ -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;
@@ -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)
More information about the libcxx-commits
mailing list