feat: constexpr URL parsing for C++20#976
feat: constexpr URL parsing for C++20#976alandefreitas wants to merge 6 commits intoboostorg:developfrom
Conversation
|
An automated preview of the documentation is available at https://976.url.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-17 01:55:13 UTC |
|
GCOVR code coverage report https://976.url.prtest2.cppalliance.org/gcovr/index.html Build time: 2026-02-17 02:09:22 UTC |
Error category classes are now fully header-only with BOOST_SYMBOL_VISIBLE (not BOOST_URL_DECL). Virtual function overrides are BOOST_URL_CXX20_CONSTEXPR where possible, and category instances are inline constexpr in C++20. Grammar rule parse functions that used BOOST_URL_CXX14_CONSTEXPR are changed to BOOST_URL_CXX20_CONSTEXPR since constexpr URL parsing is a C++20 feature. BOOST_URL_CONSTEXPR_RETURN_EC now attaches source location pre-C++20 (functions are not constexpr in that mode). Removed dead BOOST_URL_NO_SOURCE_LOCATION code paths. fix boostorg#890
GCC 10: detail::find_if/find_if_not used __cplusplus >= 202002L to guard is_constant_evaluated(), but BOOST_URL_HAS_CXX20_CONSTEXPR uses __cpp_constexpr >= 201907L. On GCC 10 these diverge, causing non-constexpr lut_chars::find_if_not to be called in constexpr context. Fixed by using BOOST_URL_HAS_CXX20_CONSTEXPR consistently. MSVC: ICEs on constexpr URL parsing (C1001 in p1_init.c). Disabled BOOST_URL_HAS_CXX20_CONSTEXPR on MSVC until the compiler bug is fixed.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #976 +/- ##
===========================================
- Coverage 99.11% 99.07% -0.04%
===========================================
Files 162 165 +3
Lines 10027 10077 +50
===========================================
+ Hits 9938 9984 +46
- Misses 89 93 +4
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
fix #890