-
Notifications
You must be signed in to change notification settings - Fork 672
Use core::string_view directly instead of alias #3058
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
base: develop
Are you sure you want to change the base?
Conversation
|
An automated preview of the documentation is available at https://3058.beast.prtest.cppalliance.org/libs/beast/doc/html/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2025-11-20 18:08:39 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3058 +/- ##
===========================================
- Coverage 93.22% 93.19% -0.03%
===========================================
Files 176 176
Lines 13703 13703
===========================================
- Hits 12774 12770 -4
- Misses 929 933 +4
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Thank you. Could you please check the |
|
This is great! |
24c3156 to
8b0bb38
Compare
|
Thank you @ashtum for the review! I've updated the PR to:
|
Replaced all uses of string_view and basic_string_view with core::string_view and core::basic_string_view respectively throughout the codebase. Closes boostorg#3046
8b0bb38 to
629d37d
Compare
|
Thank you for the detailed review! I've addressed all the feedback:
|
|
Fixed all remaining comment alignment issues. |
|
@ssam18 You can use the GitHub Action CI in your own fork to address the compile errors, since it won’t require approval to run each time. |
Use fully qualified boost::core::string_view instead of core::string_view or beast::string_view to ensure correct namespace resolution in nested boost::beast namespace contexts. This fixes compilation errors across all platforms where the compiler was looking for non-existent types like boost::beast::core::string_view. Fixes CI compilation failures in PR boostorg#3058.
This fixes macOS compilation errors where the compiler couldn't resolve the unqualified string_view type in iterator declarations.
…ace and fix comment alignment
…tring_view The test/doc files are not inside the boost namespace, so they need the fully qualified boost::core::string_view instead of core::string_view. Changed back to boost::core::string_view in all affected test/doc files.
…ring_view Example files are standalone programs not inside the boost namespace, so they require the fully qualified boost::core::string_view. Updated all example files except those in example/doc/ which are already inside the boost namespace.
|
Why the core::string_view → boost::core::string_view change is necessary? The issue: C++ namespace lookup rules mean that when you write core::string_view in a file, the compiler searches for core starting from the current namespace and working outward. This works fine in files already inside namespace boost { ... } because the compiler finds boost::core. But in standalone example and test files that aren't wrapped in the boost namespace, the compiler can't find core at all. FIX: Files need to use the fully qualified name boost::core::string_view unless they're already inside the boost namespace. This is why: Example files (like example/http/server/async/http_server_async.cpp) → Need boost::core::string_view (standalone programs) |
Remove boost:: prefix from core::string_view in implementation files (.ipp) where code is already inside the boost namespace. This makes the code cleaner and follows the project's namespace usage conventions. Also reverted unintended change to release notes as requested by maintainer. Signed-off-by: Samaresh Kumar Singh <[email protected]>
This PR addresses issue #3046 by replacing all uses of the
string_viewalias withcore::string_viewthroughout the codebase for improved clarity in both documentation and source code.Changes
string_viewwithcore::string_viewin all header files (.hpp)string_viewwithcore::string_viewin all inline implementation files (.ipp)core::string_viewbasic_string_viewwithcore::basic_string_viewwhere applicablestring_type.hppfor backward compatibilityBenefits
boost::core::string_viewFiles Modified
Closes #3046