Skip to content

Commit 1d15541

Browse files
authored
[libc++] Remove abandoned __append declaration in vector<bool> (#121673)
The `vector<bool>` implementation in libcxx contains a declaration of a private `__append` function, which is neither defined nor used anywhere in the codebase. This PR aims to remove this abandoned declaration, as its presence is misleading and could lead to confusion during future maintenance. I have no idea why we have a declaration without a definition. My guess is that the declaration might be inherited from the implementation of `vector<T>`, where `__append` is both necessary and properly defined. The declaration may have been inadvertently copied from `vector<T>` to `vector<bool>` and subsequently abandoned, as `vector<bool>` never needs it.
1 parent 054e7c5 commit 1d15541

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

libcxx/include/__vector/vector_bool.h

-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator> {
442442
template <class _InputIterator, class _Sentinel>
443443
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
444444
__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n);
445-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __append(size_type __n, const_reference __x);
446445
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference __make_ref(size_type __pos) _NOEXCEPT {
447446
return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);
448447
}

0 commit comments

Comments
 (0)