Skip to content

Conversation

H-G-Hristov
Copy link
Contributor

@H-G-Hristov H-G-Hristov requested a review from a team as a code owner October 7, 2025 07:30
Copy link

github-actions bot commented Oct 7, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.


assert(a.address() == std::addressof(x));

static_assert(noexcept((a.address())));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constexpr on address doesn't seem tested. I think it's better to reorganize TestAddress to test constexpr together.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that we haven't added constexpr to the constructor. Perhaps test for constexpr should be done in another PR...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to complete it after #118382 (P3309R3: constexpr atomic and atomic_ref)

@H-G-Hristov H-G-Hristov force-pushed the hgh/libcxx/P2835R7-Expose-std_atomic_refs-object-address branch from ef90971 to 037a1cb Compare October 7, 2025 07:49
@frederick-vs-ja frederick-vs-ja added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. c++26 labels Oct 7, 2025
Copy link
Member

@huixie90 huixie90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@frederick-vs-ja frederick-vs-ja merged commit 8a27b48 into llvm:main Oct 13, 2025
79 checks passed
@Zingam
Copy link
Contributor

Zingam commented Oct 14, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++26 libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2835R7: Expose std::atomic_ref's object address

5 participants