History log of /llvm-project/libcxx/include/array (Results 1 – 25 of 114)
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 ...


# b9a2658a 21-Dec-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)

This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-

[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)

This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside <vector>
#ifdef _LIBCPP_CXX03_LANG
# include <__cxx03/vector>
#else
// normal <vector> content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.

show more ...


Revision tags: llvmorg-19.1.6
# 9474e094 13-Dec-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Granularize the <new> header (#119270)

This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer

[libc++] Granularize the <new> header (#119270)

This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer which parts of <new> are implemented on Windows by including <new.h>.

show more ...


# c166a9c7 10-Dec-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Add #if 0 block to all the top-level headers (#119234)

Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
sep

[libc++] Add #if 0 block to all the top-level headers (#119234)

Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.

show more ...


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4
# 427a5cf1 07-Nov-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Add support for bounded iterators in std::array (#110729)

This patch introduces a new kind of bounded iterator that knows the size
of its valid range at compile-time, as in std::array. Thi

[libc++] Add support for bounded iterators in std::array (#110729)

This patch introduces a new kind of bounded iterator that knows the size
of its valid range at compile-time, as in std::array. This allows computing
the end of the range from the start of the range and the size, which requires
storing only the start of the range in the iterator instead of both the start
and the size (or start and end). The iterator wrapper is otherwise identical
in design to the existing __bounded_iter.

Since this requires changing the type of the iterators returned by
std::array, this new bounded iterator is controlled by an ABI flag.

As a drive-by, centralize the tests for std::array::operator[] and add
missing tests for OOB operator[] on non-empty arrays.

Fixes #70864

show more ...


# e99c4906 31-Oct-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Granularize <cstddef> includes (#108696)


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 ...


# 17e0686a 12-Sep-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][NFC] Use [[__nodiscard__]] unconditionally (#80454)

`__has_cpp_attribute(__nodiscard__)` is always true now, so we might as
well replace `_LIBCPP_NODISCARD`. It's one less macro that can r

[libc++][NFC] Use [[__nodiscard__]] unconditionally (#80454)

`__has_cpp_attribute(__nodiscard__)` is always true now, so we might as
well replace `_LIBCPP_NODISCARD`. It's one less macro that can result in
bad diagnostics.

show more ...


Revision tags: llvmorg-19.1.0-rc4
# 348e7413 30-Aug-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Run clang-format on libcxx/include

This re-formats a few headers that had become out-of-sync with respect
to formatting since we ran clang-format on the whole codebase. There's
surpris

[libc++][NFC] Run clang-format on libcxx/include

This re-formats a few headers that had become out-of-sync with respect
to formatting since we ran clang-format on the whole codebase. There's
surprisingly few instances of it.

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2
# d067062a 30-Jul-2024 nicole mazzuca <nicole@strega-nil.co>

[libc++] fix `array<T, 0>` under `USE_WRAP_ITER` (#101156)

`array<T, 0>::iterator` was always a pointer even when
`_LIBCXX_ABI_USE_WRAP_ITER_IN_STD_ARRAY` was defined. This patch fixes
that minor

[libc++] fix `array<T, 0>` under `USE_WRAP_ITER` (#101156)

`array<T, 0>::iterator` was always a pointer even when
`_LIBCXX_ABI_USE_WRAP_ITER_IN_STD_ARRAY` was defined. This patch fixes
that minor bug.

Discovered as part of [#100603][].

Drive-by: switch from `typedef` to `using` in `<array>`

[#100603]: https://github.com/llvm/llvm-project/pull/100603

show more ...


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# d043e4c3 07-Jul-2024 Hristo Hristov <hghristov.rmm@gmail.com>

[libc++] Restore `__synth_three_way` lambda (#90398)

Restore `__synth_three_way` lambda to match the Standard.
GH-57222 is done, restoring the Standard wording implementation should
be possible.

[libc++] Restore `__synth_three_way` lambda (#90398)

Restore `__synth_three_way` lambda to match the Standard.
GH-57222 is done, restoring the Standard wording implementation should
be possible.


https://github.com/llvm/llvm-project/blob/df28d4412c1d21b0e18896c92ac77d2fac7729f1/libcxx/include/__compare/synth_three_way.h#L28

According to comment
https://github.com/llvm/llvm-project/issues/59513#issuecomment-2068338762,
GH-59513 is not a blocker.

Co-authored-by: Hristo Hristov <zingam@outlook.com>

show more ...


# e2c2ffbe 18-Jun-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Run clang-format on libcxx/include again (#95874)

As time went by, a few files have become mis-formatted w.r.t.
clang-format. This was made worse by the fact that formatting was not

[libc++][NFC] Run clang-format on libcxx/include again (#95874)

As time went by, a few files have become mis-formatted w.r.t.
clang-format. This was made worse by the fact that formatting was not
being enforced in extensionless headers. This commit simply brings all
of libcxx/include in-line with clang-format again.

We might have to do this from time to time as we update our clang-format
version, but frankly this is really low effort now that we've formatted
everything once.

show more ...


# cb417401 18-Jun-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Refactor<__type_traits/is_swappable.h> (#86822)

This changes the `is_swappable` implementation to use variable templates
first and basing the class templates on that. This avoids instantia

[libc++] Refactor<__type_traits/is_swappable.h> (#86822)

This changes the `is_swappable` implementation to use variable templates
first and basing the class templates on that. This avoids instantiating
them when the `_v` versions are used, which are generally less resource
intensive.

show more ...


# 1ba8ed0c 17-Jun-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Mark more types as trivially relocatable (#89724)

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 83bc7b57 22-Apr-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Remove _LIBCPP_DISABLE_NODISCARD_EXTENSIONS and refactor the tests (#87094)

This also adds a few tests that were missing.


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2
# 580f6048 18-Mar-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)

These headers have become very small by using compiler builtins, often
containing only two d

[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)

These headers have become very small by using compiler builtins, often
containing only two declarations. This merges these headers, since
there doesn't seem to be much of a benefit keeping them separate.

Specifically, `is_{,_nothrow,_trivially}{assignable,constructible}` are
kept and the `copy`, `move` and `default` versions of these type traits
are moved in to the respective headers.

show more ...


# 95c1313f 14-Mar-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Remove a few includes from <__functional/hash.h> (#83254)

This also moves `__all` from `sfinae_helpers.h` to `conjunction.h`.


Revision tags: llvmorg-18.1.1
# 5174b380 04-Mar-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Use __wrap_iter in string_view and array in the unstable ABI (#74482)

std::string_view and std::array iterators don't have to be raw pointers,
and in fact other implementations don't repre

[libc++] Use __wrap_iter in string_view and array in the unstable ABI (#74482)

std::string_view and std::array iterators don't have to be raw pointers,
and in fact other implementations don't represent them as raw pointers.
Them being raw pointers in libc++ makes it easier for users to write
non-portable code. This is bad in itself, but this is even worse when
considering efforts like hardening where we want an easy ability to
swap for a different iterator type. If users depend on iterators being
raw pointers, this becomes a build break.

Hence, this patch enables the use of __wrap_iter in the unstable ABI,
creating a long term path towards making this the default. This patch
may break code that assumes these iterators are raw pointers for
people compiling with the unstable ABI.

This patch also removes several assumptions that array iterators are
raw pointers in the code base and in the test suite.

show more ...


# 37dca605 29-Feb-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Clean up includes of <__assert> (#80091)

Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
th

[libc++] Clean up includes of <__assert> (#80091)

Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
that mechanism anymore, we don't need to declare __libcpp_verbose_abort
from all public headers, and we can clean up a lot of unnecessary
includes.

This patch also moves the definition of the various assertion categories
to the <__assert> header, since we now rely on regular IWYU for these
assertion macros.

rdar://105510916

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# 7b462251 25-Jan-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Fix missing and incorrect push/pop macros (#79204)

We recently noticed that the unwrap_iter.h file was pushing macros, but
it was pushing them again instead of popping them at the end of t

[libc++] Fix missing and incorrect push/pop macros (#79204)

We recently noticed that the unwrap_iter.h file was pushing macros, but
it was pushing them again instead of popping them at the end of the
file. This led to libc++ basically swallowing any custom definition of
these macros in user code:

#define min HELLO
#include <algorithm>
// min is not HELLO anymore, it's not defined

While investigating this issue, I noticed that our push/pop pragmas were
actually entirely wrong too. Indeed, instead of pushing macros like
`move`, we'd push `move(int, int)` in the pragma, which is not a valid
macro name. As a result, we would not actually push macros like `move`
-- instead we'd simply undefine them. This led to the following code not
working:

#define move HELLO
#include <algorithm>
// move is not HELLO anymore

Fixing the pragma push/pop incantations led to a cascade of issues
because we use identifiers like `move` in a large number of places, and
all of these headers would now need to do the push/pop dance.

This patch fixes all these issues. First, it adds a check that we don't
swallow important names like min, max, move or refresh as explained
above. This is done by augmenting the existing
system_reserved_names.gen.py test to also check that the macros are what
we expect after including each header.

Second, it fixes the push/pop pragmas to work properly and adds missing
pragmas to all the files I could detect a failure in via the newly added
test.

rdar://121365472

show more ...


Revision tags: llvmorg-19-init
# 9783f28c 18-Dec-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++] Format the code base (#74334)

This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmar

[libc++] Format the code base (#74334)

This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmarks, the test suite and remaining parts of the code. I'm
splitting this one into its own patch so the diff is a bit easier to
review.

This patch was generated with:

find libcxx/include libcxx/src -type f \
| grep -v 'module.modulemap.in' \
| grep -v 'CMakeLists.txt' \
| grep -v 'README.txt' \
| grep -v 'libcxx.imp' \
| grep -v '__config_site.in' \
| xargs clang-format -i

A Git merge driver is available in libcxx/utils/clang-format-merge-driver.sh
to help resolve merge and rebase issues across these formatting changes.

[1]: https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all

show more ...


# 70bcd81e 15-Dec-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++] Fix constexpr initialization of std::array<T, 0> (#74667)

This patch fixes constexpr default initialization of empty arrays and
improves the tests accordingly.

Fixes #74375


# 953ac952 05-Dec-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Use aliases instead of typedefs in std::array (#74491)

As requested in https://github.com/llvm/llvm-project/pull/74482.


# 77a00c0d 05-Dec-2023 Louis Dionne <ldionne.2@gmail.com>

[libc++] Replace uses of _VSTD:: by std:: (#74331)

As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.

See https://discourse.llvm

[libc++] Replace uses of _VSTD:: by std:: (#74331)

As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.

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

show more ...


# 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 ...


12345