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

Add reproducer for Clang < 15 bug with string_view & C++11 char types #186

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jan 4, 2025

This is the test case for #185 to reproduce the issue such that it can be verified that it works. Made as a separate PR so CI runs and the state for the commit gets shown.

As explained in #185 converting this string_view to a std string the bug is triggered too but cannot be fixed without removing the conversion to std::basic_string_view. Hence the condition to exclude it in Clang < 15

@pdimov
Copy link
Member

pdimov commented Jan 4, 2025

I see no CI failures for Clang 13/14 here.

@Flamefire
Copy link
Contributor Author

Seems using libstdc++ 12 and up requires Clang 15. Using libstdc++ 11 works also locally.

I'd say the test still makes sense to find potential regressions with the unicode char types.
And the workaround in #185 doesn't make anything worse: end() == data() + size() which the std::basic_string ctor does too if data(), size() is passed. But it helps in one (even if now less relevant) case:

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.

2 participants