History log of /llvm-project/libcxx/include/__algorithm/copy.h (Results 1 – 25 of 29)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# f6958523 08-Jan-2025 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Put _LIBCPP_NODEBUG on all internal aliases (#118710)

This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experie

[libc++] Put _LIBCPP_NODEBUG on all internal aliases (#118710)

This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experience.

show more ...


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# a2042521 12-Nov-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Remove _AlgPolicy from std::copy and algorithms using std::copy (#115887)

`std::copy` doesn't use the `_AlgPolicy` for anything other than calling
itself with it, so we can just remove the

[libc++] Remove _AlgPolicy from std::copy and algorithms using std::copy (#115887)

`std::copy` doesn't use the `_AlgPolicy` for anything other than calling
itself with it, so we can just remove the argument. This also removes
the need in a few other algorithms which had an `_AlgPolicy` argument
only to call `copy`.

show more ...


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# 09e3a360 16-Sep-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][modules] Fix missing and incorrect includes (#108850)

This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to

[libc++][modules] Fix missing and incorrect includes (#108850)

This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to move
towards a mostly monolithic top-level std module.

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# c388690a 27-Mar-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][NFC] Simplify copy and move lowering to memmove a bit (#83574)

We've introduced `__constexpr_memmove` a while ago, which simplified the
implementation of the copy and move lowering a bit.

[libc++][NFC] Simplify copy and move lowering to memmove a bit (#83574)

We've introduced `__constexpr_memmove` a while ago, which simplified the
implementation of the copy and move lowering a bit. This allows us to
remove some of the boilerplate.

show more ...


Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 4c198542 04-Dec-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095)

In preparation for running clang-format on the whole code base, we are
also removing mentions of the legacy _LIBCPP_INLIN

[libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095)

In preparation for running clang-format on the whole code base, we are
also removing mentions of the legacy _LIBCPP_INLINE_VISIBILITY macro in
favor of the newer _LIBCPP_HIDE_FROM_ABI.

We're still leaving the definition of _LIBCPP_INLINE_VISIBILITY to avoid
creating needless breakage in case some older patches are checked-in
with mentions of the old macro. After we branch for LLVM 18, we can do
another pass to clean up remaining uses of the macro that might have
gotten introduced by mistake (if any) and remove the macro itself at the
same time. This is just a minor convenience to smooth out the transition
as much as possible.

See
https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
for the clang-format proposal.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# dd489131 27-Oct-2023 Rajveer Singh Bharadwaj <rajveer.developer@icloud.com>

[libc++] Fix _CopySegment helper in ranges::copy(join_view, out) when called in a static assertion context (#69593)

Resolves Issue #69083

The `_CopySegment` helper for `ranges::copy(join_view, ou

[libc++] Fix _CopySegment helper in ranges::copy(join_view, out) when called in a static assertion context (#69593)

Resolves Issue #69083

The `_CopySegment` helper for `ranges::copy(join_view, out)` is not
`constexpr` causing rejection in `libc++` in a static assertion context
as in the issue snippet.

show more ...


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 91014794 06-Jul-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Add 'const' to some operator()

This is NFC because the function object is stateless anyway. This is
done solely for consistency with surrounding code and this was probably
an oversight

[libc++][NFC] Add 'const' to some operator()

This is NFC because the function object is stateless anyway. This is
done solely for consistency with surrounding code and this was probably
an oversight in https://reviews.llvm.org/D132505.

Differential Revision: https://reviews.llvm.org/D154612

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5
# dc124cda 01-Jun-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Introduce __for_each_segment and use it in copy/move

This simplifies the code inside copy/move and makes it easier to apply the optimization to other algorithms.

Reviewed By: ldionne, Mord

[libc++] Introduce __for_each_segment and use it in copy/move

This simplifies the code inside copy/move and makes it easier to apply the optimization to other algorithms.

Reviewed By: ldionne, Mordante, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D151265

show more ...


# 80643d93 17-May-2023 Nikolas Klauser <n_klauser@apple.com>

[libc++][NFC] Rename iterator category checks to make it obvious that they check //only// the iterator category

We plan to add concepts for checking that iterators actually provide what they claim t

[libc++][NFC] Rename iterator category checks to make it obvious that they check //only// the iterator category

We plan to add concepts for checking that iterators actually provide what they claim to. This is to avoid people thinking that these type traits actually check the iterator requirements in more detail.

Reviewed By: ldionne, #libc

Spies: Mordante, libcxx-commits, wenlei

Differential Revision: https://reviews.llvm.org/D150801

show more ...


Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6
# c9080145 20-Nov-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Refactor deque::iterator algorithm optimizations

This has multiple benefits:
- The optimizations are also performed for the `ranges::` versions of the algorithms
- Code duplication is reduc

[libc++] Refactor deque::iterator algorithm optimizations

This has multiple benefits:
- The optimizations are also performed for the `ranges::` versions of the algorithms
- Code duplication is reduced
- it is simpler to add this optimization for other segmented iterators,
like `ranges::join_view::iterator`
- Algorithm code is removed from `<deque>`

Reviewed By: ldionne, huixie90, #libc

Spies: mstorsjo, sstefan1, EricWF, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D132505

show more ...


# 5629d492 14-Jan-2023 varconst <varconsteq@gmail.com>

Reapply "[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`"

This reverts commit a6e1080b87db8fbe0e1afadd96af5a3c0bd5e279.

Fix the conditions when the `memmove` optimization can be

Reapply "[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`"

This reverts commit a6e1080b87db8fbe0e1afadd96af5a3c0bd5e279.

Fix the conditions when the `memmove` optimization can be applied and refactor them out into a reusable type trait, fix and significantly expand the tests.

Differential Revision: https://reviews.llvm.org/D139235

show more ...


# e0a66116 20-Dec-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Granularize <type_traits> includes in <compare>

Reviewed By: Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D140480


Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2
# a6e1080b 02-Oct-2022 Vitaly Buka <vitalybuka@google.com>

Revert "[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`"

Breaks msan, asan

https://lab.llvm.org/buildbot/#/builders/5/builds/27904

This reverts commit 005916de58f73aa5c4264c084b

Revert "[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`"

Breaks msan, asan

https://lab.llvm.org/buildbot/#/builders/5/builds/27904

This reverts commit 005916de58f73aa5c4264c084ba7b0e21040d88f.

show more ...


# 005916de 02-Oct-2022 Konstantin Varlamov <varconst@apple.com>

[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`

Instead of using `reverse_iterator`, share the optimization between the 4 algorithms. The key observation here that `memmove` appli

[libc++][ranges]Refactor `copy{,_backward}` and `move{,_backward}`

Instead of using `reverse_iterator`, share the optimization between the 4 algorithms. The key observation here that `memmove` applies to both `copy` and `move` identically, and to their `_backward` versions very similarly. All algorithms now follow the same pattern along the lines of:
```
if constexpr (can_memmove<InIter, OutIter>) {
memmove(first, last, out);
} else {
naive_implementation(first, last, out);
}
```
A follow-up will delete `unconstrained_reverse_iterator`.

This patch removes duplication and divergence between `std::copy`, `std::move` and `std::move_backward`. It also improves testing:
- the test for whether the optimization is used only applied to `std::copy` and, more importantly, was essentially a no-op because it would still pass if the optimization was not used;
- there were no tests to make sure the optimization is not used when the effect would be visible.

Differential Revision: https://reviews.llvm.org/D130695

show more ...


Revision tags: llvmorg-15.0.1
# 5fab33af 05-Sep-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Avoid instantiating type_trait classes

Use `using` aliases to avoid instantiating lots of types

Reviewed By: ldionne, #libc

Spies: libcxx-commits, miyuki

Differential Revision: https://r

[libc++] Avoid instantiating type_trait classes

Use `using` aliases to avoid instantiating lots of types

Reviewed By: ldionne, #libc

Spies: libcxx-commits, miyuki

Differential Revision: https://reviews.llvm.org/D132785

show more ...


Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3
# 5146b57b 19-Aug-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][NFC] Rename the constexpr macros

This was discussed on Discord with the consensus that we should rename the macros.

Reviewed By: ldionne, Mordante, var-const, avogelsgesang, jloser, #libc

[libc++][NFC] Rename the constexpr macros

This was discussed on Discord with the consensus that we should rename the macros.

Reviewed By: ldionne, Mordante, var-const, avogelsgesang, jloser, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D131498

show more ...


Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1
# e01b4fe9 27-Jul-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Fix unwrapping ranges with different iterators and sentinels

Reviewed By: ldionne, huixie90, #libc

Spies: arichardson, sstefan1, libcxx-commits, mgorny

Differential Revision: https://revi

[libc++] Fix unwrapping ranges with different iterators and sentinels

Reviewed By: ldionne, huixie90, #libc

Spies: arichardson, sstefan1, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D129040

show more ...


Revision tags: llvmorg-16-init
# 20a11cb5 24-Jul-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Fix algorithms which use reverse_iterator

This adds a C++20-version of `reverse_iterator` which doesn't SFINAE away the operators for use inside the classic STL algorithms. Pre-C++20 `_AlgR

[libc++] Fix algorithms which use reverse_iterator

This adds a C++20-version of `reverse_iterator` which doesn't SFINAE away the operators for use inside the classic STL algorithms. Pre-C++20 `_AlgRevIter` is just an alias for `reverse_iterator`.

Reviewed By: var-const, #libc

Spies: huixie90, libcxx-commits

Differential Revision: https://reviews.llvm.org/D128864

show more ...


Revision tags: llvmorg-14.0.6
# fb3477a4 17-Jun-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Unwrap reverse_iterator<reverse_iterator<Iter>> in __unwrap_iter

Simplify the implementation of `std::copy` and `std::move` by using `__unwrap_iter` and `__rewrap_iter` to unwrap and rewrap

[libc++] Unwrap reverse_iterator<reverse_iterator<Iter>> in __unwrap_iter

Simplify the implementation of `std::copy` and `std::move` by using `__unwrap_iter` and `__rewrap_iter` to unwrap and rewrap `reverse_iterator<reverse_iterator<Iter>>` instead of specializing `__copy_impl` and `__move_impl`.

Reviewed By: ldionne, #libc

Spies: wenlei, libcxx-commits

Differential Revision: https://reviews.llvm.org/D127049

show more ...


Revision tags: llvmorg-14.0.5
# 7611eb48 07-Jun-2022 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Simplify enable_if for std::copy optimization

Get rid of the __is_trivially_copy_assignable_unwrapped helper, which
is only used in one place, and use __iter_value_type instead of
iter

[libc++][NFC] Simplify enable_if for std::copy optimization

Get rid of the __is_trivially_copy_assignable_unwrapped helper, which
is only used in one place, and use __iter_value_type instead of
iterator_traits<T>::value_type.

Differential Revision: https://reviews.llvm.org/D127230

show more ...


# ef8e9182 03-Jun-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Forward more often to memmove in copy

In D122982 I accidentally disabled the memmove optimization. This re-enables it and adds more cases where copy forwards to memmove.
Fixes https://githu

[libc++] Forward more often to memmove in copy

In D122982 I accidentally disabled the memmove optimization. This re-enables it and adds more cases where copy forwards to memmove.
Fixes https://github.com/llvm/llvm-project/issues/33687

Reviewed By: var-const, #libc, ldionne

Spies: pkasting, ayzhao, dcheng, xbolva00, libcxx-commits

Differential Revision: https://reviews.llvm.org/D124328

show more ...


Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2
# 1d83750f 15-Apr-2022 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Implement ranges::copy{, _n, _if, _backward}

Reviewed By: Mordante, var-const, #libc

Spies: sstefan1, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D122982


Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 368faaca 28-Feb-2022 Louis Dionne <ldionne.2@gmail.com>

[libc++] Revert "Protect users from relying on detail headers" & related changes

This commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,
which were related to the original commit).

[libc++] Revert "Protect users from relying on detail headers" & related changes

This commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,
which were related to the original commit). As landed, 5aaefa51 had
unintended consequences on some downstream bots and didn't have proper
coverage upstream due to a few subtle things. Implementing this is
something we should do in libc++, however we'll first need to address
a few issues listed in https://reviews.llvm.org/D106124#3349710.

Differential Revision: https://reviews.llvm.org/D120683

show more ...


# 5aaefa51 25-Feb-2022 Christopher Di Bella <cjdb@google.com>

[libcxx][modules] protects users from relying on detail headers

libc++ has started splicing standard library headers into much more
fine-grained content for maintainability. It's very likely that ou

[libcxx][modules] protects users from relying on detail headers

libc++ has started splicing standard library headers into much more
fine-grained content for maintainability. It's very likely that outdated
and naive tooling (some of which is outside of LLVM's scope) will
suggest users include things such as <__ranges/access.h> instead of
<ranges>, and Hyrum's law suggests that users will eventually begin to
rely on this without the help of tooling. As such, this commit
intends to protect users from themselves, by making it a hard error for
anyone outside of the standard library to include libc++ detail headers.

Differential Revision: https://reviews.llvm.org/D106124

show more ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init
# fa6b9e40 02-Feb-2022 Arthur O'Dwyer <arthur.j.odwyer@gmail.com>

[libc++] Normalize all our '#pragma GCC system_header', and regression-test.

Now we'll notice if a header forgets to include this magic phrase.

Differential Revision: https://reviews.llvm.org/D1188

[libc++] Normalize all our '#pragma GCC system_header', and regression-test.

Now we'll notice if a header forgets to include this magic phrase.

Differential Revision: https://reviews.llvm.org/D118800

show more ...


12