Mark de Wever
5bf142749e
[libc++][doc] Updates spaceship status.
...
Work on the missing chrono parts has started, but their operators will
be added in different patches. So split the remaining chrono part to one
entry per line and mark them in progress.
2023-07-01 12:37:02 +02:00
Mark de Wever
cdcfc5ec9b
[libc++][regex] Removes operator!=.
...
Implements part of:
- P1614R2 The Mothership has Landed
Reviewed By: #libc, H-G-Hristov, philnik
Differential Revision: https://reviews.llvm.org/D153222
2023-06-19 17:01:56 +02:00
Hristo Hristov
4f7680ceda
[libc++][spaceship][NFC] P1612R2: Mark remove operator!= from "Ranges Library" items as "Complete"
...
Marked already implemented parts of P1612R2 as "Complete":
- `ranges::iota_view::iterator` https://reviews.llvm.org/D110774
- `iota_view::sentinel` https://reviews.llvm.org/D107396
- `filter_view::iterator` https://reviews.llvm.org/D109086
- `filter_view::sentinel` https://reviews.llvm.org/D109086
- `ranges::transform_view::iterator` https://reviews.llvm.org/D110774
- `transform_view::sentinel` https://reviews.llvm.org/D103056
- `take_view::sentinel` https://reviews.llvm.org/D123600
- `join_view::iterator` https://reviews.llvm.org/D107671
- `join_view::sentinel ` https://reviews.llvm.org/D107671
- `split_view::outer_iterator` https://reviews.llvm.org/D142063
- `split_view::inner_iterator` https://reviews.llvm.org/D142063
Note these operators were added and removed in C++20.
Reviewed By: Mordante, #libc
Differential Revision: https://reviews.llvm.org/D152721
2023-06-18 21:18:40 +03:00
Hristo Hristov
9838dd7f76
[libc++][spaceship][NFC] P1614R2: Status page - mark header synopsis sections as "Complete"
...
Header synospis sections of P1614R2 are implemented by other items usually. For completeness, let's mark some of them as "Complete".
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152775
2023-06-15 00:28:10 +03:00
Hristo Hristov
7928ac4e6a
[libc++][spaceship] P1612R2: Removed operator!= from locale
...
Implemented parts of P1612R2:
- Removed `operator!=` from `locale`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152654
2023-06-13 07:47:13 +03:00
Hristo Hristov
5a53323d2c
[libc++][spaceship][NFC] P1612R2: Mark some items "remove operator!= from *_iterator" as "Complete"
...
Several parts of P1612R2 are already implemented:
- `common_iterator` (new in C++20) https://reviews.llvm.org/D103335
- `unreachable_sentinel_t` (new in C++20) https://reviews.llvm.org/D107920
- `istream_iterator` (removed) https://reviews.llvm.org/D119620
- `istreambuf_iterator` (removed) https://reviews.llvm.org/D119620
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152656
2023-06-13 07:44:01 +03:00
Hristo Hristov
0029ad89e8
[libc++][spaceship] P1614R2: Removed operator!= from weekdays
...
Implements parts of P1614R2. Removed `operator!=` from:
- `weekday`
- `weekday_indexed`
- `weekday_last`
- `month_weekday`
- `month_weekday_last`
- `year_month_weekday`
- `year_month_weekday_last`
Note these operators were added and removed in C++20.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152699
2023-06-12 22:22:22 +03:00
Hristo Hristov
a9e0321ffe
[libc++][spaceship] P1614R2: Added operator== to file_status
...
Implemented parts of P1614R2:
- Added `operator==` to `file_status`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152647
2023-06-12 19:53:50 +03:00
Hristo Hristov
8cf3c2920d
[libc++][spaceship] P1614R2: Removed operator!= from scoped_allocator_adaptor
...
Implements parts of P1614R2
- Removed `operator!=` from `scoped_allocator_adaptor`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152678
2023-06-12 19:51:27 +03:00
Hristo Hristov
9a6ca67397
[libc++][spaceship] P1614R2: Removed operator!= from functional
...
Implements parts of P1614R2:
- Removed `operator!=` from `functional`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152704
2023-06-12 19:48:42 +03:00
Hristo Hristov
d1ef99fe1c
[libc++][spaceship] P1614R2: Removed global operator!= from allocator
...
Implements parts of P1614R2:
- Removed global `operator!=` from `allocator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152612
2023-06-12 09:41:56 +03:00
Hristo Hristov
7c96cd35bf
[libc++][spaceship] P1612R2: Removed operator!= from bitset
...
Implements parts of P1612R2:
- Removed `operator!=` from `bitset`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152611
2023-06-12 09:26:51 +03:00
Hristo Hristov
3d74398bd3
[libc++][spaceship] P1614R2: Removed operator!= from unordered_map, unordered_multimap, __hash_map_iterator
...
Implements parts of P1614R2:
- Removed ops from `unordered_map`
- Removed ops from `unordered_multimap`
- Removed ops from `__hash_map_iterator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152642
2023-06-12 09:23:36 +03:00
Hristo Hristov
bfd6e4dd2d
[libc++][spaceship] P1614R2: Removed ops from unordered_multiset, unordered_set
...
Implements parts of P1614R2:
- Removed ops from `unordered_multiset`,
- Removed ops from `unordered_set`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152643
2023-06-11 21:31:24 +03:00
Hristo Hristov
be45fe5d85
[libc++][spaceship] P1614R2: Removed ops from complex
...
Implements parts of P1614R2:
- Removed ops from `complex`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152615
2023-06-11 19:52:02 +03:00
Hristo Hristov
f877e88c35
[libc++][spaceship] P1614R2: Added operator== to slice
...
Implements parts of P1614R2:
- Added `operator==` to `slice`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152617
2023-06-11 19:50:31 +03:00
Hristo Hristov
6c34aab3ff
[libc++][spaceship] P1614R2: Removed ops from memory_resource, polymorphic_allocator
...
Implements parts of P1614R2
- Removed ops from `memory_resource`
- Removed ops from `polymorphic_allocator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152629
2023-06-11 19:49:35 +03:00
Hristo Hristov
211efbb198
[libc++][spaceship][NFC] Updates SpaceshipProjects.csv with full details from P1614R2
...
Adds the remaining sections from [[ https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html | P1614R2 ]]
Some entries were reordered for easier tracking.
The items in the table match [[ https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html | P1614R2 ]]'s sections strictly.
Reviewed By: Mordante, #libc
Differential Revision: https://reviews.llvm.org/D152297
2023-06-10 22:09:58 +03:00
Hristo Hristov
ca7a041626
[libc++][spaceship] Implement operator<=> for stack
...
Depends on D146066
Depends on D132268
Implements parts of P1614R2 `operator<=>` for `stack`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D146094
2023-06-10 07:37:36 +03:00
Hristo Hristov
55ec808a88
[libc++][spaceship] Implement operator<=> for vector
...
Implements part of P1614R2 "The Mothership has Landed"
Depends on D150188
Reviewed By: Mordante, #libc
Differential Revision: https://reviews.llvm.org/D132268
2023-06-10 06:53:05 +03:00
Hristo Hristov
172d990c03
[libc++][spaceship] Implement operator<=> for queue
...
Implements parts of P1614R2 `operator<=>` for `queue`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D146066
2023-06-06 08:41:56 +03:00
Hristo Hristov
254986d2df
[libc++][spaceship] Implement operator<=> for array
...
Implements part of P1614R2 "The Mothership has Landed"
Reviewed By: Mordante, #libc, philnik
Differential Revision: https://reviews.llvm.org/D132265
2023-05-08 17:03:06 +03:00
Hristo Hristov
03cda77409
[libc++][spaceship] Implement operator<=> for optional
...
Implements parts of **P1614R2**: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html
- Implemented `operator<=>` for `optional`
- Updated "optional synopsis" to match the current draft https://eel.is/c++draft/optional closer
- Implemented https://cplusplus.github.io/LWG/issue3566
- Implemented https://cplusplus.github.io/LWG/issue3746
Reviewed By: #libc, philnik, ldionne
Differential Revision: https://reviews.llvm.org/D146392
2023-05-05 09:59:22 +03:00
Mark de Wever
a79a6ea4a8
[libc++][regex] Uses operator<=> in sub_match.
...
The removal of operator!= in this header will be done in a separate
commit.
Note in the synopsis of P1614R2 there is a constexpr
template<class BiIter>
constexpr auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
In the implementation of P1614R2 there isn't a constexpr
template<class BiIter>
auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
There doesn't seem to be an LWG-issue, but it was fixed in the Standard
by removing the constexpr in b050fd474f11441942c88ef69b8622c8036656ac.
Implements part of:
- P1614R2 The Mothership has Landed
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D132310
2023-04-22 12:39:19 +02:00
Hristo Hristov
d94a770f7b
[libc++][spaceship] Implement operator<=> for time_point
...
Depends on D145881
Implements parts of **P1614R2**: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html
Implements `operator<=>` for `time_point`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D146250
2023-04-09 08:47:20 +03:00
Hristo Hristov
466d554dca
[libc++][spaceship[NFC] P1614R2 operator<=> moves misplaced tests to correct location
...
P1614R2:
- Moved misplaced tests from `libcxx/test/libcxx` to `libcxx/test/std`
- Updated status page `SpaceshipProjects.csv`: `operator<=>` implementation status
Related docs:
- https://eel.is/c++draft/
- https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D146902
2023-04-01 10:25:30 +03:00
Hristo Hristov
83542e4764
[libc++][spaceship] Implement operator<=> for duration
...
Implements parts of [[ https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html | P1614R2 ]]
Implemented `operator<=>` for `std::chrono::duration`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D145881
2023-03-21 20:06:42 +02:00
Hristo Hristov
bc47a195cc
[libc++][spaceship] Implement operator<=> for map and multimap
...
Implements parts of P1614R2: `operator<=>` for `map` and `multimap`
Reviewed By: #libc, philnik
Spies: philnik, libcxx-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D145976
2023-03-15 15:24:43 +01:00
Hristo Hristov
cc6de9f6a5
[libc++][spaceship][NFC] Marked operator<=> for move_iterator and counted_iterator as implemented
...
Apprarently implemented as part of:
- `move_iterator` - https://reviews.llvm.org/D117656
- `counted_iterator` - https://reviews.llvm.org/D106205
Reviewed By: #libc, philnik
Spies: libcxx-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D145243
2023-03-06 01:05:41 +01:00
Hristo Hristov
3bc76339ea
[libc++][spaceship] Implement operator<=> for forward_list
...
Implemented `operator<=>` for `forward_list`
Reviewed By: #libc, philnik
Spies: philnik, libcxx-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D145172
2023-03-03 13:43:03 +01:00
Hristo Hristov
2ff646f554
[libc++][spaceship] Implement operator<=> for deque
...
Based on https://reviews.llvm.org/D132312
Dependes on https://reviews.llvm.org/D132312
Reviewed By: #libc, Mordante, philnik
Spies: philnik, Mordante, yaxunl, libcxx-commits
Differential Revision: https://reviews.llvm.org/D144821
2023-03-03 13:36:01 +01:00
Adrian Vogelsgesang
b5a84ae09a
[libc++][spaceship] Implement operator<=> for list
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D132312
2023-02-28 06:11:31 -08:00
Adrian Vogelsgesang
2a06757a20
[libc++][spaceship] Implement lexicographical_compare_three_way
...
The implementation makes use of the freedom added by LWG 3410. We have
two variants of this algorithm:
* a fast path for random access iterators: This fast path computes the
maximum number of loop iterations up-front and does not compare the
iterators against their limits on every loop iteration.
* A basic implementation for all other iterators: This implementation
compares the iterators against their limits in every loop iteration.
However, it still takes advantage of the freedom added by LWG 3410 to
avoid unnecessary additional iterator comparisons, as originally
specified by P1614R2.
https://godbolt.org/z/7xbMEen5e shows the benefit of the fast path:
The hot loop generated of `lexicographical_compare_three_way3` is
more tight than for `lexicographical_compare_three_way1`. The added
benchmark illustrates how this leads to a 30% - 50% performance
improvement on integer vectors.
Implements part of P1614R2 "The Mothership has Landed"
Fixes LWG 3410 and LWG 3350
Differential Revision: https://reviews.llvm.org/D131395
2023-02-12 14:51:08 -08:00
Hui Xie
94461822c7
[libc++][ranges] implement std::views::elements_view
...
`subrange` is also a `tuple-like`. To avoid the add entire `subrange` dependencies to `tuple-like`, we need forward declaration of `subrange`. However, the class template constraints of `subrange` currently requires `__iterator/concepts.h`, which requires `<concepts>`. The problem is that currently `tuple-like` is used in several different places, including libc++ extension for pair constructors. we don't want to add `<concepts>` to pair and other stuff. So this change also created several small headers that `subrange`'s declaration needed inside `__iterator/concepts/`
Differential Revision: https://reviews.llvm.org/D136268
2023-01-15 17:36:10 +00:00
Adrian Vogelsgesang
ae071a59bc
[libc++][NFC][spaceship] Update status doc
2022-08-19 17:32:05 -07:00
Adrian Vogelsgesang
f1974f039f
[libc++] Implement operator<=> for filesystem::directory_entry
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D130860
2022-08-18 14:46:13 -07:00
Adrian Vogelsgesang
b3ab3bece0
[libc++] Implement operator<=> for filesystem::path
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D130859
2022-08-18 14:13:48 -07:00
Kent Ross
081dad9e9e
[libcxx][spaceship][doc] Repair links and clean up spaceship progress doc
...
Previously the specification was in a table in paragraph 14 of [container.requirements.general] but it has since been given its own sub section header, 24.2.2.4 [container.opt.reqmts].
This happened in 93ff092d1c
This update also includes misc. other cleanups of the spaceship projects sheet.
Reviewed By: Mordante, avogelsgesang, #libc
Differential Revision: https://reviews.llvm.org/D131928
2022-08-17 12:14:32 -07:00
Adrian Vogelsgesang
877620bd96
[libc++] Implement operator<=> for error_{code,condition}
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D131371
2022-08-15 16:05:53 -07:00
Adrian Vogelsgesang
0e876eda26
[libc++] Implement operator<=> for error_category
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D131363
2022-08-15 16:05:08 -07:00
Kent Ross
c4566cac49
[libc++][spaceship] Implement std::variant::operator<=>
...
Implements [variant.relops] and [variant.monostate.relops] for P1614R2
Reviewed By: Mordante, #libc, avogelsgesang
Differential Revision: https://reviews.llvm.org/D131372
2022-08-14 16:16:52 -07:00
Mark de Wever
22b5adff71
[libc++] Uses operator<=> in string.
...
Implements part of:
- P1614R2 The Mothership has Landed
Reviewed By: avogelsgesang, #libc, philnik
Differential Revision: https://reviews.llvm.org/D131421
2022-08-14 14:05:05 +02:00
Adrian Vogelsgesang
41e7665c4b
[libc++] Implement operator<=> for thread::id
...
The new operator<=> is mapped onto the existing functions
__libcpp_thread_id_equal and __libcpp_thread_id_less. Introducing a
new __libcpp_thread_id_compare_three_way might lead to more efficient
code. Given that we can still introduce __libcpp_thread_id_compare_three_way
later, for this commit I opted to not break ABI. If requested, I will
add __libcpp_thread_id_compare_three_way in a follow-up commit.
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D131362
2022-08-13 17:30:55 -07:00
Adrian Vogelsgesang
9df5892804
[libc++] Implement operator<=> for type_index
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D131357
2022-08-09 16:35:17 -07:00
Adrian Vogelsgesang
706b3951b3
[libc++] Implement operator== for filesystem::space_info
...
Implements part of P1614R2 "The Mothership has Landed"
Differential Revision: https://reviews.llvm.org/D130861
2022-08-08 10:05:47 -07:00
Adrian Vogelsgesang
3354644aad
[libc++][doc] Update SpaceshipProjects status to reflect in-flight reviews
2022-08-08 06:39:12 -07:00
Adrian Vogelsgesang
619e8f46f3
[libc++] Remove operator!= from type_info in C++20
...
Implements part of:
* P1614R2 The Mothership has Landed
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D130853
2022-08-06 15:10:38 +02:00
Adrian Vogelsgesang
735240b38f
[libc++] Implement operator<=> for unique_ptr
...
Implements part of:
- P1614R2 The Mothership has Landed
Fixes LWG3426
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D130838
2022-08-06 15:09:16 +02:00
Mark de Wever
3818b4df1e
[libc++] Uses operator<=> in string_view
...
Implements:
- LWG3432 Missing requirement for comparison_category
Implements part of:
- P1614R2 The Mothership has Landed
Reviewed By: #libc, ldionne, jloser, philnik
Differential Revision: https://reviews.llvm.org/D130295
2022-08-04 19:13:47 +02:00
Adrian Vogelsgesang
3b217f2f12
[libc++] Implement operator<=> for shared_ptr
...
Implements part of:
* P1614R2 The Mothership has Landed
Fixes LWG3427
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D130852
2022-08-03 18:32:45 +02:00