49 Commits

Author SHA1 Message Date
A. Jiang
c2950982fe
[libc++] Add Wroclaw straw polls (#118116) 2024-12-02 08:54:07 -05:00
Louis Dionne
ae9b91acc7 [libc++] Fix malformed CSV entry for C++26 LWG issue 2024-11-29 16:03:40 -05:00
h-vetinari
8b19d29a3f
[libc++] remove minor version in status pages (#113241)
Minor version of releases starts at `N.1.0` for all releases since 4532617ae42005.

The current status pages are not terribly wrong (the version during
development can be considered `N.0`), but still it's kinda weird to use
versions that never get released as the lower bound.
2024-11-04 10:48:50 -05:00
Xiaoyang Liu
7c721999ca
[libc++][ranges] LWG4016: container-insertable checks do not match what container-inserter does (#113103)
This patch implements LWG4016: container-insertable checks do not match
what container-inserter does.
2024-10-23 10:04:50 -04:00
Michael Jones
6c4267fb17
[libcxx][libc] Hand in Hand PoC with from_chars (#91651)
Implements std::from_chars for float and double.

The implementation uses LLVM-libc to do the real parsing. Since this is
the first time libc++
uses LLVM-libc there is a bit of additional infrastructure code. The
patch is based on the
[RFC] Project Hand In Hand (LLVM-libc/libc++ code sharing)

https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701
2024-10-21 15:04:06 -07:00
Xiaoyang Liu
51259deb72
[libc++] LWG4025: Move assignment operator of std::expected<cv void, E> should not be conditionally deleted (#109363)
This patch implements LWG4025: Move assignment operator of
`std::expected<cv void, E>` should not be conditionally deleted.

Closes #105324
2024-09-27 12:54:22 -04:00
NoumanAmir-10xe
6776d65cea
[libc++] Implement LWG3953 (#107535)
Closes #105303
2024-09-09 14:49:22 -04:00
Louis Dionne
c2cac69d08
[libc++] Replace 'tags' in CSV status pages by inline notes (#105581)
This patch replaces 'tags' in the CSV status pages by inline notes
that optionally describe more details about the paper/LWG issue.

Tags were not really useful anymore because we have a vastly superior
tagging system via Github issues, and keeping the tags up-to-date
between CSV files and Github is going to be really challenging.

This patch also adds support for encoding custom notes in the CSV
files via Github issues. To encode a note in the CSV file, the
body (initial description) of a Github issue can be edited to contain
the following markers:

    BEGIN-RST-NOTES
    text that will be added as a note in the RST
    END-RST-NOTES

Amongst other things, this solves the problem of conveying that a
paper has been implemented as a DR, and it gives a unified way to
add notes to the status pages from Github.
2024-08-28 13:42:41 -04:00
Mark de Wever
e0441d587b
[libc++][chono] Use hidden friends for leap_second comparison. (#104713)
The function

    template<class Duration>
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
constexpr auto operator<=>(const leap_second& x, const
sys_time<Duration>& y) noexcept;

Has a recursive constrained. This caused an infinite loop in GCC and is
now hit by https://github.com/llvm/llvm-project/pull/102857.

A fix would be to make this function a hidden friend, this solution is
propsed in LWG4139.

For consistency all comparisons are made hidden friends. Since the issue
causes compilation failures no additional test are needed.

Fixes: https://github.com/llvm/llvm-project/issues/104700
2024-08-20 19:13:27 +02:00
Louis Dionne
a845dba9e5 [libc++] Remove non-existent LWG issue from the .csv files
We can only track existing LWG issues because we need a valid LWG issue
number for all issues. I'll create another GH issue to track creating
that LWG issue instead.
2024-08-14 16:40:49 -04:00
Louis Dionne
e80bc77774 [libc++] Normalize how we track the meeting at which a paper of LWG issue was voted
This uses the same values as we use in the Github project that tracks
Standards conformance.
2024-08-13 16:58:24 -04:00
Louis Dionne
b6262880b3
[libc++] Consistency fixes for the CSV status files (#101572)
- Make sure we always have the same number of entries. In particular, I
  dropped the "Group" entry that was tracked for papers but not for LWG
  issues, since I don't think that added much. The group is already
  tracked on the paper itself.
- Add "Label" row to all the CSV files.

This is mechanical, but it's necessary if we want to process our CSV
files uniformly, for example to synchronize their state with Github
issues.
2024-08-02 09:13:20 -04:00
Mark de Wever
d2553a2be9
[libc++][doc] Updates the libc++ status page. (#100595)
- LWG3147 Definitions of "likely" and "unlikely" are likely to cause
problems Adjusts the requirements on programs using the Standard
library.

- LWG3328 Clarify that std::string is not good for UTF-8 Adds a
non-normative note, aimed at users of the Standard library.

- LWG3784 std.compat should not provide ::byte and its friends was
implemented during modules.

- LWG3062 Unnecessary decay_t in is_execution_policy_v should be
remove_cvref_t Was implemented while implementing parallel algorithms.

- LWG3362 Strike stop_source's operator!= The removed operator was never
implemented.

- LWG3616 LWG 3498 seems to miss the non-member swap for basic_syncbuf
This was implemented correctly from the start.

- LWG3199 istream >> bitset<0> fails This was implemented in
fc4486c2472b84384d4a31d2436a91bdb9b29792, might be in LLVM-9

- LWG3828 Sync intmax_t and uintmax_t with C2x Standardardized existing
practice.

- LWG3713 Sorted with respect to comparator (only) Wording issue in the
Standard.

- LWG3823 Unnecessary precondition for is_aggregate Changes the
preconditions

- LWG3826 Redundant specification [for overload of yield_value] Changes
a remark to a note

- LWG3203 span element access invalidation Update wording relevant for
users of the Standard library.
2024-07-26 18:33:51 +02:00
Hristo Hristov
e475bb7ac3
[libc++][memory] P1132R8: out_ptr - a scalable output pointer abstraction (#73618)
Differential Revision: https://reviews.llvm.org/D150525

Implements:
- https://wg21.link/P1132R8 - `out_ptr` - a scalable output pointer
abstraction
- https://eel.is/c++draft/smartptr.adapt - 20.3.4 Smart pointer adaptors
- https://wg21.link/LWG3734 - Inconsistency in `inout_ptr` and `out_ptr`
for empty case
- https://wg21.link/LWG3897- `inout_ptr` will not update raw pointer to
0

---------

Co-authored-by: Hristo Hristov <zingam@outlook.com>
2024-07-19 06:38:02 +03:00
Hristo Hristov
60b6f43ea1
[libc++][ranges] LWG4001: iota_view should provide empty (#79687)
Implements: https://wg21.link/LWG4001
- https://eel.is/c++draft/range.iota.view

---------

Co-authored-by: Zingam <zingam@outlook.com>
Co-authored-by: Will Hawkins <whh8b@obs.cr>
2024-07-17 18:10:17 +03:00
Hristo Hristov
8ba9ed6825
[libc++][ranges] LWG4035: single_view should provide empty (#98371)
Implements: https://wg21.link/LWG4035

- https://eel.is/c++draft/range.single.view
2024-07-16 18:13:05 +03:00
h-vetinari
a37c35e807
[libc++] mark P0154 as implemented; fix column alignment issues (#97865)
AFAIU, P0154 support is complete as of
https://github.com/llvm/llvm-project/pull/89446
2024-07-10 08:31:07 +02:00
A. Jiang
ca055bbec7
[libc++][format] LWG4061: Should std::basic_format_context be default-constructible/copyable/movable? (#97251)
See [LWG4061](https://cplusplus.github.io/LWG/issue4061) and
[P3341R0](https://wg21.link/p3341r0). Effectively reverts commit
36ce0c3b1e581ca310ae7d0cbc6af002cc5d0251.


`libcxx/test/std/utilities/format/format.functions/bug_81590.compile.pass.cpp`
has a `format` function that unexpectedly takes the
`basic_format_context` by value, which is made ill-formed by LWG4061.
This PR changes the function to take the context by reference.
2024-07-09 12:23:50 +02:00
A. Jiang
96c9913332
[libc++][format] LWG4106: basic_format_args should not be default-constructible (#97250)
See [LWG4106](https://cplusplus.github.io/LWG/issue4106) and
[P3341R0](https://wg21.link/p3341r0).

The test coverage for the empty state of `basic_format_args` in
`get.pass.cpp` is to be completely removed, because the
non-default-constructibility is covered in `ctor.pass.cpp`.
2024-07-09 12:21:30 +02:00
Mark de Wever
2dadf8d7f5
[libc++] Update status after the St. Louis meeting. (#97951)
This updates:
- The status tables
- Feature test macros
- New headers for modules
2024-07-08 19:35:31 +02:00
Louis Dionne
a66e2a1988
[libc++] Revert temporary attempt to implement LWG 4110 (#95263)
When I filed LWG4110 after the discussion in #93071, I thought it was
going to be a straightforward fix. It turns out that it isn't, so we
should stay in the state where libc++ is Standards conforming even if
that state leads to some reasonable code being rejected by the library.
Once WG21 figures out what to do with this issue and votes on it, we'll
implement it through our normal means.

This reverts f638f7b6a7c2 and 16f2aa1a2ddf.
2024-06-14 14:34:56 -04:00
Louis Dionne
f638f7b6a7 [libc++] Update with LWG issue number for shared-ptr constructor 2024-06-11 16:48:35 -04:00
yronglin
f9672cb775
[NFC][libc++] Mark LWG3951 as implemented (#93191)
Since we have already addressed the LWG issue, this PR marks LWG3951 as
implemented.

Signed-off-by: yronglin <yronglin777@gmail.com>
Co-authored-by: A. Jiang <de34@live.cn>
2024-05-28 18:09:36 -07:00
Hristo Hristov
8afa6cf510
[libc++][functional] P2944R3 (partial): Comparisons for reference_wrapper (reference_wrapper operators only) (#88384)
Implements https://wg21.link/P2944R3 (partially)
Implements https://wg21.link/LWG4071 /
https://cplusplus.github.io/LWG/issue4071 (fixes build failures in the
test suite)
- https://eel.is/c++draft/refwrap.comparisons
2024-05-09 12:48:37 +03:00
yronglin
0ecc1646cb
[libc++][ranges] Implement LWG4053 and LWG4054 (#88612)
Implement
- LWG4053 Unary call to `std::views::repeat` does not decay the argument
- LWG4054 Repeating a `repeat_view` should repeat the view

Signed-off-by: yronglin <yronglin777@gmail.com>
2024-04-30 12:32:01 -06:00
Xiaoyang Liu
e74be35c1a
[libc++][ranges] LWG3984: ranges::to's recursion branch may be ill-formed (#87964)
This pull request implements LWG3984: ranges::to's recursion branch
may be ill-formed.

In the current implementation, ranges::to's recursion branch pipes the
range into a `views::transform(/* lambda */)`, which is a __range_adaptor_closure
object. In libc++, the pipe operator of __range_adaptor_closure requires a
viewable_range, so the following code won't compile, as the type of lvalue
`r` doesn't model viewable_range:

  #include <ranges>
  #include <vector>
  #include <list>

  int main() {
    std::vector<std::vector<int>> v;
    auto r = std::views::all(std::move(v));
    auto l = std::ranges::to<std::list<std::list<int>>>(r);
  }

Co-authored-by: A. Jiang <de34@live.cn>
2024-04-26 11:00:47 -04:00
Mark de Wever
ad76a85954
[libc++][format] Improves escaping. (#88283)
The change increments the size of the lookup table considerably. The
table has an "upper boundary" check. The removal of the code units with
the property Grapheme_Extend=Yes removes the range E0100..E01EF. This
breaks the trailing large continuous section in two parts. This will be
improved in a followup patch.

Implements:
- P2713R1 Escaping improvements in std::format
- LWG3965 Incorrect example in [format.string.escaped] p3 for formatting
of combining characters

```
---------------------------------------------------------
Benchmark                           Before          After    
---------------------------------------------------------
BM_ascii_escaped<char>            95696 ns      110704 ns
BM_unicode_escaped<char>          89311 ns      101371 ns
BM_cyrillic_escaped<char>         58633 ns       63329 ns
BM_japanese_escaped<char>         44500 ns       41223 ns
BM_emoji_escaped<char>            99156 ns      111022 ns
BM_ascii_escaped<wchar_t>         92245 ns      112441 ns
BM_unicode_escaped<wchar_t>       80970 ns      102776 ns
BM_cyrillic_escaped<wchar_t>      51253 ns       58977 ns
BM_japanese_escaped<wchar_t>      37252 ns       36885 ns
BM_emoji_escaped<wchar_t>         96226 ns      115885 ns
```
2024-04-25 17:16:41 +02:00
Louis Dionne
ed962a66c5
[libc++] Implement LWG4023 (#87513)
This patch implements LWG4023 by adding explicit assertions for the
added preconditions and also fixes a few tests that were violating these
preconditions.
2024-04-25 09:32:35 -04:00
Mark de Wever
1fda1776e3
[libc++][chrono] Adds the sys_info class. (#85619)
Adds the sys_info class and time_zone::get_info(). The code still has a
few quirks and has not been optimized for performance yet.

The returned sys_info is compared against the output of the zdump tool
in the test giving confidence the implementation is correct.

Implements parts of:
- P0355 Extending <chrono> to Calendars and Time Zones

Implements:
- LWGXXXX The sys_info range should be affected by save
2024-04-10 07:50:17 +02:00
Louis Dionne
e280407a48
[libc++] Add test coverage for our implementation of LWG4031 (#87508)
This was actually already implemented in the initial version of
std::expected, but this patch adds test coverage and makes it more
explicit that we intend to make these functions noexcept.
2024-04-09 11:27:40 -04:00
Louis Dionne
d83233f597
[libc++] Mark some recent LWG issues and papers as done (#87502)
Justifications:
- LWG3950: Done in #66206
- LWG3975: Wording changes only
- LWG4011: Wording changes only
- LWG4030: Wording changes only
- LWG4043: Wording changes only
- LWG3036 and P2875R4: We implemented neither, but the latter reverts
the former, so now we implement both without doing anything!
2024-04-03 13:50:55 -04:00
Louis Dionne
b699a9ba11
[libc++] Update status page after the Tokyo meeting (#87395) 2024-04-03 08:21:11 -04:00
Hristo Hristov
7d78ccf7d5
[libc++][memory] P2652R2: Disallow Specialization of allocator_traits (#79978)
Implements P2652R2 <https://wg21.link/P2652R2>:
- https://eel.is/c++draft/allocator.requirements.general
- https://eel.is/c++draft/memory.syn
- https://eel.is/c++draft/allocator.traits.general
- https://eel.is/c++draft/allocator.traits.members
- https://eel.is/c++draft/diff.cpp20.concepts
- https://eel.is/c++draft/diff.cpp20.utilities

---------

Co-authored-by: Zingam <zingam@outlook.com>
2024-02-01 12:31:25 +01:00
Hristo Hristov
552f5549de
[libc++][any] LWG3305: any_cast<void> (#78215)
Implements: https://wg21.link/LWG3305
- https://eel.is/c++draft/any.nonmembers

---------

Co-authored-by: Zingam <zingam@outlook.com>
2024-01-20 06:08:24 +02:00
Twice
7ded34576f
[libc++] Implement LWG3940: std::expected<void, E>::value() also needs E to be copy constructible (#71819)
This patch includes the fix for
[LWG3940](https://cplusplus.github.io/LWG/issue3940)
(`std::expected<void, E>::value()` also needs `E` to be copy
constructible)
2024-01-19 10:06:11 +00:00
Mark de Wever
f49ccca86a
[libc++] Update status after the Kona meeting. (#72421)
This updates:
- The status tables
- Feature test macros (including previously missing ones)
- New headers for modules
2023-11-16 10:17:19 +01:00
yronglin
9f67143be0 [libc++] Implement LWG3938 (Cannot use std::expected monadic ops with move-only error_type)
Implement LWG3938 (Cannot use std::expected monadic ops with move-only error_type)
https://wg21.link/LWG3938

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D154116
2023-09-06 22:38:29 +08:00
Mark de Wever
438073b213 [libc++][doc] Removes clang name in version number.
Noticed I had these left in just committed code.
2023-07-08 13:36:32 +02:00
Mark de Wever
d3d079678c [NFC][libc++] Addresses LWG3905.
Note libc++ implemented this in its initial version. It always used the type
from the C library and never validated whether it was an integer type.

Implements
- LWG3905 Type of std::fexcept_t

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153285
2023-07-08 12:56:46 +02:00
Mark de Wever
00e740f1e9 [NFC][libc++] Addresses LWG3903.
Note libc++ actually implemented this wording from the start (D49338).
The Clang version is the same as the version that implements
  P0122R7 <span>

Implements
- LWG3903 span destructor is redundantly noexcept

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153284
2023-07-08 12:54:49 +02:00
Mark de Wever
f8d96d8e06 [NFC][libc++] Addresses LWG3885.
Implements
- LWG3885 'op' should be in [zombie.names]

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153283
2023-07-08 12:27:24 +02:00
Nikolas Klauser
75f6af82c3 [libc++] Mark LWG2994 as complete and remove Clang from the version
Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D154381
2023-07-05 14:43:04 -07:00
Louis Dionne
fc5e76da22 [libc++] Reformat status tables
We use 17.0 instead of Clang 17 in our status tables pretty consistently,
but not universally. This ensures that we do it universally, for all
versions.

Differential Revision: https://reviews.llvm.org/D154461
2023-07-05 08:37:19 -04:00
Mark de Wever
48abcf11ad [libc++][format] Adds formattable-with concept.
This change has a few additional effects:
- Abstract classes are now formattable.
- Volatile objects are no longer formattable.

Implements
- LWG3631 basic_format_arg(T&&) should use remove_cvref_t<T> throughout
- LWG3925 Concept formattable's definition is incorrect

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D152092
2023-06-21 08:05:33 +02:00
Mark de Wever
ffe0495105 [NFC][libc++] Addresses LWG3927.
Changes to preconditions have no impact on the library.

Implements
- LWG3927 Unclear preconditions for operator[] for sequence containers

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153286
2023-06-20 17:19:55 +02:00
Mark de Wever
946116fc05 [NFC][libc++] Addresses LWG3935.
Note libc++ implemented this in its initial version.

Implements
- LWG3935 template<class X> constexpr complex& operator=(const complex<X>&) has no specification

Reviewed By: #libc, philnik, ldionne

Differential Revision: https://reviews.llvm.org/D153287
2023-06-20 17:16:06 +02:00
Mark de Wever
3f05d044f4 [libc++] Update status after Varna meeting.
This updates:
- The status tables
- Feature test macros
- New headers for modules
The latter avoids forgetting about modules when implementing the feature
in a new header.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153192
2023-06-19 16:55:30 +02:00
Mark de Wever
b72a7cb320 [libc++][doc] Move not yet adopted issues to C++26.
The development of C++23 is complete, so these issues will be adopted in
C++26 (or later).

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153053
2023-06-16 17:39:08 +02:00
Mark de Wever
00c97cbc57 [libc++] Adds C++26 support.
Clang has been updated to support C++26, this adds the same support for
libc++. At the moment C++23 and C++26 are identical. During the next
plenary in June the first C++26 papers will be voted on.

Note like Clang this patch uses C++26 is the internal part and C++2c in
the user visible part.

Depends on D150795

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D151026
2023-05-24 07:49:19 +02:00