[libcxx-commits] [libcxx] [libc++] Destroy elements when exceptions are thrown in __construct_at_end (PR #167112)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Nov 16 17:43:09 PST 2025
================
@@ -123,6 +124,18 @@ uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp&
// uninitialized_fill_n
+template <class _Alloc, class _ForwardIterator, class _Size, class _Tp>
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
+__uninitialized_fill_n_with_alloc(_Alloc& __alloc, _ForwardIterator __first, _Size __n, const _Tp& __x) {
----------------
frederick-vs-ja wrote:
Let's use the conventional names. (Also, it seems possible to move this into `<__vector/vector.h>`, but perhaps it's also OK to keep it here for consistency,)
```suggestion
__uninitialized_allocator_fill_n(_Alloc& __alloc, _ForwardIterator __first, _Size __n, const _Tp& __x) {
```
https://github.com/llvm/llvm-project/pull/167112
More information about the libcxx-commits
mailing list