-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++][type_traits] Implements "A type trait to detect reference binding to temporary" #128649
Draft
H-G-Hristov
wants to merge
20
commits into
llvm:main
Choose a base branch
from
H-G-Hristov:hgh/libcxx/P2255R2-A_type_trait_to_detect_reference_binding_to_temporary
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+391
−5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ With the latest revision this PR passed the C/C++ code formatter. |
8be15ab
to
bf9e5d9
Compare
…nding to temporary" Implements partially: P2255R2: A type trait to detect reference binding to temporary llvm#105180 https://eel.is/c++draft/meta.type.synop https://eel.is/c++draft/meta.unary.prop Implented type traits: - [x] `reference_constructs_from_temporary` - [x] `reference_converts_from_temporary`
bf9e5d9
to
ab21883
Compare
libcxx/include/__type_traits/reference_constructs_from_temporary.h
Outdated
Show resolved
Hide resolved
...t/std/utilities/meta/meta.unary/meta.unary.prop/reference_constructs_from_temporary.pass.cpp
Show resolved
Hide resolved
...est/std/utilities/meta/meta.unary/meta.unary.prop/reference_converts_from_temporary.pass.cpp
Outdated
Show resolved
Hide resolved
…ference_binding_to_temporary
…ference_binding_to_temporary
…ference_binding_to_temporary
…ference_binding_to_temporary
…ference_binding_to_temporary
…ference_binding_to_temporary
…ding_to_temporary' of https://github.com/H-G-Hristov/llvm-project into hgh/libcxx/P2255R2-A_type_trait_to_detect_reference_binding_to_temporary
…ference_binding_to_temporary
…ct_reference_binding_to_temporary
…ference_binding_to_temporary
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements partially: P2255R2: A type trait to detect reference binding to temporary
Issue: #105180
https://eel.is/c++draft/meta.type.synop
https://eel.is/c++draft/meta.unary.prop
Implented type traits:
reference_constructs_from_temporary
reference_converts_from_temporary
According to #111477
__has_builtin(
reference_{constructs|converts|_from_temporary) was broken in Clang 19.1.0 and it was fixed in Clang 19.1.2 with dedbdfb. Workarounds were implemented and test for unsupported compilers disabled.Closes #129049