[libc++] Implement P2988R12: `std::optional<T&>` #155202
smallp-o-p
marked this pull request as draft 301 days ago
smallp-o-p
changed the title [libc++] Implement P2988R12: `std::optional<T&> [libc++] Implement P2988R12: `std::optional<T&>` 300 days ago
smallp-o-p
marked this pull request as ready for review 269 days ago
Augment tests
72bb6e9b
formatting
df2e9e76
Forgot to gate a test
322079d5
Update generated files
2a014d8b
Formatting
294cb8e9
Update documentation
762bb8cd
Update optional to allow T&, disable iterator and value_or for T(&)()
223ce490
Remove nullptr dereference in iterator
92137cb8
Left in an extraneous paren
c1235517
Python formatting
90754420
Fix merge oops
0ca1d516
Formatting and include
4ba0c8f7
Gate ref tests, use std::same_as suggestion
660716c6
Fix GCC shadow warning
717c5f9a
Add constraint to emplace, add deleted optional<T&> constructors, add…
1612378e
Remove __can_bind_reference() in favor of __reference_constructs_from…
ea6ce10b
Assignment shouldn't modify the underlying value, test for that and a…
089cb713
Clang-Format
c6028985
Address comments + Add some tests for function refs and array refs
42637ff9
Change a few more static_asserts
3c9c51b6
Fix up swap, make_optional, add tests
dfb33493
Address nits
bc683103
Formatting
4f874380
Formatting x2
e586acd2
Fix typo
18c1b96c
Allow make_optional for T&, add test
1add5c55
Formatting
85db654f
Zingam
commented
on 2025-10-31
Use std::swap, mark T& assignment and __swap noexcept
65e92c48
Replace all usages of optional::value_type with _Tp, remove reference…
5cf46033
Clean up deleted constructors signatures
3c2473d1
Drive-by: Add a ranges::range<optional<T>> test for iterators
4f58bf29
Add enable_borrowed_range<optional<T&>> and corresponding test
ba998d73
Add to module inc
44d8d05f
Make the borrowed_range test compile only
1cd8ebe3
Remove std:: prefixes in iterator struct
d32557c8
Simplify borrowed_range test
2d327fd5
ditto
880558a9
ADL lookup
995bb756
ADL lookup
cddffc5e
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub