509 Commits

Author SHA1 Message Date
ZhangYin
dc53410693
[libc++] <experimental/simd> Add operator value_type() of simd reference (#68960) 2023-10-23 11:51:34 +02:00
Nikolas Klauser
d2a46e6480 [libc++][PSTL] Implement std::move
Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155330
2023-10-22 10:25:49 +02:00
Christian Trott
639a0986f3
[libc++] mdspan - implement layout_stride (#69650)
This implements layout_stride for C++23 and with that completes the
implementation of the C++23 mdspan header. The feature test macro is
added, and the status pages updated.

Co-authored-by: Damien L-G <dalg24@gmail.com>

Differential Revision: https://reviews.llvm.org/D157171
2023-10-20 08:13:52 -06:00
ZhangYin
593521b079
[libcxx] <experimental/simd> Add generate constructor of class simd (#66737)
Differential Revision: https://reviews.llvm.org/D159442
2023-10-12 07:39:31 -05:00
Hui
bcf172ec57
[libc++] LWG 3821 uses_allocator_construction_args should have overload for pair-like (#66939)
This change addresses LWG 3821 and LWG 3677.

- make `std::pair`'s constructor no longer takes `subrange`
- `uses_allocator_construction_args` constraint changes w.r.t to
`pair-like` types
- `uses_allocator_construction_args` constraints checks
`is-pair-like<remove_cv_t<T>>`
2023-10-09 13:50:27 +01:00
Nikolas Klauser
0d7947b08c [libc++] Implement P2614R2 (Deprecate numeric_limits::has_denorm)
Reviewed By: #libc, ldionne

Spies: ldionne, Mordante, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155411
2023-10-06 11:30:55 +02:00
Will Hawkins
08e4ccbff8
[libc++][ranges][NFC] Mark ranges::slide_view in progress (#68056)
Mark `ranges::slide_view` implementation as in progress.
2023-10-03 14:05:25 -04:00
Hui
4fa812bb52 [libc++] Implement std::condition_variable_any::wait[_for/until] overloads that take stop_token
- This is section 32.6.4 of P0660R10
- https://eel.is/c++draft/thread.condvarany.intwait

Differential Revision: https://reviews.llvm.org/D153441
2023-09-29 13:50:16 +01:00
Igor Zhukov
910b76a002 [libc++] Implement LWG-3655: The INVOKE operation and union types
https://cplusplus.github.io/LWG/issue3655

Differential Revision: https://reviews.llvm.org/D144645
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2023-09-21 05:23:41 -04:00
Daniel Cheng
078651b6de
[libc++] Implement LWG3545: std::pointer_traits should be SFINAE-friendly. (#65177)
See https://wg21.link/LWG3545 for background and details.

Differential Revision: https://reviews.llvm.org/D158922
2023-09-18 08:46:59 -04:00
Louis Dionne
4d08eccd63
[libc++] Implement P2538R1 "ADL-proof std::projected" (#65411)
Notice that because Holder<Incomplete> is _possible_ to complete, but
_unsafe_ to complete, that means that Holder<Incomplete>* is basically
not an iterator and it's not even safe to ask if
input_iterator<Holder<Incomplete>*> because that _will_ necessarily
complete the type. So it's totally expected that we still cannot safely
ask e.g.


static_assert(std::indirect_unary_predicate<bool(&)(Holder<Incomplete>&),
Holder<Incomplete>*>);

or even

static_assert(!std::indirect_unary_predicate<int, Holder<Incomplete>*>);

This was originally uploaded as https://reviews.llvm.org/D119029 and I
picked it up here as part of the Github PR transition.

Co-authored-by: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
2023-09-15 10:09:38 -04:00
eric
571e4f233b Mark LWG 2426 as complete.
Atomic is implemented by Clang, and Clang already implements the
behavior in the DR. This was initially noticed by Zoe Carver.
2023-09-14 16:42:57 -04:00
Zhangyin
ed29f275bf [libcxx] <experimental/simd> Add broadcast constructor of class simd/simd_mask
Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D156225
2023-09-12 11:41:49 +08:00
Zhangyin
a284d0cc9c [libcxx] <experimental/simd> Added aliagned flag types, traits is_simd_flag_type[_v], memory_alignment[_v] and related tests
Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153319
2023-09-12 11:41:44 +08:00
Zhangyin
ce5652c78a [libcxx] <experimental/simd> Added simd width functions, simd_size traits and related tests
Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D144363
2023-09-12 11:41:42 +08:00
Zhangyin
0e30dd44ad [libcxx] <experimental/simd> Add ABI tags, class template simd/simd_mask implementations. Add related simd traits and tests.
[libcxx] <experimental/simd> Add ABI tags, class template simd/simd_mask implementations.
[libcxx] <experimental/simd> Add traits is_abi_tag[_v], is_simd[_v] and is_simd_mask[_v].
[libcxx] <experimental/simd> Add related tests.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D144362
2023-09-12 11:41:40 +08:00
Hristo Hristov
623bb5c2c2 [libc++][ranges][NFC] Status page: Adds enumerate_view patch 2023-09-11 14:43:19 +03:00
h-vetinari
afc96481c4
[libc++] Clean up some minor inconsistencies in the status pages (#65259) 2023-09-07 11:05:19 -04:00
Mark de Wever
f78f93bc9f [libc++][chrono] Adds tzdb_list implementation.
This is the first step to implement time zone support in libc++. This
adds the complete tzdb_list class and a minimal tzdb class. The tzdb
class only contains the version, which is used by reload_tzdb.

Next to these classes it contains documentation and build system support
needed for time zone support. The code depends on the IANA Time Zone
Database, which should be available on the platform used or provided by
the libc++ vendors.

The code is labeled as experimental since there will be ABI breaks
during development; the tzdb class needs to have the standard headers.

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

Addresses:
- LWG3319 Properly reference specification of IANA time zone database

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D154282
2023-09-06 20:48:07 +02: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
Jakub Mazurkiewicz
065dc485bd [libc++][ranges] Implement P2443R1: views::chunk_by
This patch implements https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2443r1.html (`views::chunk_by`).

Reviewed By: #libc, var-const

Differential Revision: https://reviews.llvm.org/D144767
2023-09-05 16:19:49 -07:00
yronglin
06ef752b7c [libc++] Implement LWG3464(istream::gcount() can overflow)
Implement LWG3464 https://wg21.link/LWG3464

Reviewed By: #libc, Mordante, philnik

Differential Revision: https://reviews.llvm.org/D158749
2023-08-29 20:18:25 +08:00
yronglin
2051a41219 Revert "[libc++] Implement LWG3464(istream::gcount() can overflow)"
This reverts commit d57fe1dbe0506c006d8f082101a7c00fde798ddb.
2023-08-27 13:34:32 +08:00
yronglin
d57fe1dbe0 [libc++] Implement LWG3464(istream::gcount() can overflow)
Implement LWG3464 https://wg21.link/LWG3464

Reviewed By: Mordante

Differential Revision: https://reviews.llvm.org/D158749
2023-08-27 11:24:40 +08:00
Mark de Wever
ea82a822d9 [libc++] Adds string_view constructor overload
Implements
- P2697R1 Interfacing bitset with string_view

Depends on D153192

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D153201
2023-08-25 17:56:27 +02:00
Will Hawkins
3db0e400f0 [libcxx][NFC] Update status documentation for stride range view
Note that there is a Differential revision for the stride ranges
view implementation and the names of the people who are developing
it.

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D158446
2023-08-23 19:28:37 +02:00
Mark de Wever
92ac360063 [libc++][charconv] Adds operator bool.
Implements
- P2497R0 Testing for success or failure of <charconv> functions

Depends on D153192

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D153199
2023-08-23 19:25:10 +02:00
yrong
96377e5cc1 [libc++][expected] Implement LWG3836
Implement LWG3836 (https://wg21.link/LWG3836)
`std::expected<bool, E1>` conversion constructor `expected(const expected<U, G>&)` should take precedence over `expected(U&&)` with operator `bool`

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D155701
2023-08-20 20:18:09 +08:00
Kazu Hirata
14292d9f1e [libcxx] Fix typos in documentation 2023-08-10 18:44:19 -07:00
Nikolas Klauser
9e94f7dcb5 [libc++] Remove P2554R0 from the status paper, since it's also part of P0009R18 2023-08-10 14:29:36 -07:00
Nikolas Klauser
f8a1913e46 [libc++] Remove P2553R1 from the status page, since it's been part of P0009R18 2023-08-10 14:13:06 -07:00
zijunzhao
996559602b Update RangesAlgorithm status
Reviewed By: philnik, #libc

Differential Revision: https://reviews.llvm.org/D157539
2023-08-09 19:28:00 +00:00
Mark de Wever
cf83cfb3a5 [libc++][doc] Updates format related release notes.
As suggested by @ldionne.

Reviewed By: ldionne, #libc, avogelsgesang

Differential Revision: https://reviews.llvm.org/D156030
2023-08-09 19:04:29 +02:00
Nikolas Klauser
ae381cf9f2 [libc++] Fix PSTL status 2023-08-03 09:32:54 -07:00
Mark de Wever
770b020610 [libc++][doc] Uses the proper paper number.
This was brought to my attention in
88622aabf1 (r122279717)
2023-07-22 16:44:59 +02:00
Mark de Wever
e2953303f4 [libc++][print] Adds stdout functions.
Implements parts of
- P2093R14 Formatted output
- P2539R4  Should the output of std::print to a terminal be
           synchronized with the underlying stream?

Depends on D150044

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D155262
2023-07-22 11:28:17 +02:00
varconst
c3648f37d0 [libc++][ranges] Implement ranges::to.
Differential Revision: https://reviews.llvm.org/D142335
2023-07-20 22:48:18 -07:00
Nikolas Klauser
37e5baf318 [libc++][PSTL] Implement std::sort
Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits, mgrang

Differential Revision: https://reviews.llvm.org/D152860
2023-07-20 14:45:36 -07:00
yrong
a2160dd34d [libc++][ranges] Implement P2474R2(views::repeat).
- Implement https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2474r2.html
- Implement LWG3875(https://cplusplus.github.io/LWG/issue3875).

Depends on D151629

Reviewed By: #libc, Mordante, philnik, var-const

Differential Revision: https://reviews.llvm.org/D141699
2023-07-20 20:03:01 +08:00
Mark de Wever
3f65f71833 [libc++][print] Adds FILE functions.
Drive-by fix to make sure the __retarget_buffer works correctly whan
using a hint of 1. This was discovered in one of the new tests.

Drive-by fixes __retarget_buffer when initialized with size 1.

Implements parts of
- P2093R14 Formatted output
- P2539R4  Should the output of std::print to a terminal be
           synchronized with the underlying stream?

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D150044
2023-07-18 20:07:11 +02:00
pateldeev
347f45ed2b [libc++][LWG 2996] Implement c++20 shared_ptr rvalue overloads.
Implement c++20 `shared_ptr` rvalue overloads for aliasing constructor and pointer casts. See https://cplusplus.github.io/LWG/issue2996

Commit from
"patedeev" <dkp10000@gmail.com>

Reviewed By: philnik, #libc, ldionne, pateldeev

Differential Revision: https://reviews.llvm.org/D135548
2023-07-18 20:04:21 +02:00
Mark de Wever
44d17cd739 [libc++][doc] Updates the release notes.
This is a preparation for the upcoming LLVM 17 release.

Reviewed By: ldionne, jloser, H-G-Hristov, #libc

Differential Revision: https://reviews.llvm.org/D154874
2023-07-17 18:41:10 +02:00
Piotr Fusik
c7c0095b29 [libc++] Implement stringstream members of P0408R7 (Efficient Access to basic_stringbuf's Buffer)
Reviewed By: Mordante, #libc

Differential Revision: https://reviews.llvm.org/D155359
2023-07-16 18:32:56 +02:00
Piotr Fusik
6ed4041891 [libc++] Implement ostringstream members of P0408R7 (Efficient Access to basic_stringbuf's Buffer)
Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D155276
2023-07-16 15:25:35 +02:00
Christian Trott
20c6b9d451 [libc++][mdspan] Implement default_accessor
This commit implements default_accessor in support of C++23 mdspan
(https://wg21.link/p0009). default_accessor is the trivial accessor
using plain pointers and reference to element types.

Co-authored-by: Damien L-G <dalg24@gmail.com>

Differential Revision: https://reviews.llvm.org/D153935
2023-07-14 11:52:40 -06:00
Piotr Fusik
61d2a9b3ea [libc++] Implement istringstream members of P0408R7 (Efficient Access to basic_stringbuf's Buffer)
Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D154454
2023-07-14 08:32:27 +02: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