Skip to content
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

Change how we decide which empty string implementation to use. #20708

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

zhangskz
Copy link
Member

The feature macro seems to be lying on some toolchains. Instead, ask the compiler to try to run the default constructor in constexpr context which should fail if the implementation doesn't actually support it and fallback to the dynamic one.

This should fix #20645

PiperOrigin-RevId: 737603382

Cherry-pick of 3dfd88f

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The feature macro seems to be lying on some toolchains. Instead, ask the
compiler to try to run the default constructor in constexpr context which
should fail if the implementation doesn't actually support it and fallback to
the dynamic one.

This should fix #20645

PiperOrigin-RevId: 737603382
@zhangskz zhangskz requested a review from sbenzaquen March 17, 2025 15:10
@zhangskz zhangskz enabled auto-merge (squash) March 17, 2025 15:10
Copy link
Contributor

@honglooker honglooker left a comment

Choose a reason for hiding this comment

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

backport approved.

@zhangskz zhangskz merged commit 221b2a0 into 30.x Mar 19, 2025
208 checks passed
@zhangskz zhangskz deleted the cp-clang-16-issue branch March 19, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants