Prepare for boost::url upgrade
The new boost URL now interops properly with std::string_view, which is
great, and cleans up a bunch of mediocre code to convert one to another.
It has also been pulled into boost-proper, so we no longer need a
boost-url dependency that's separate.
Unfortunately, boost url makes these improvements by changing
boost::string_view for boost::urls::const_string, which causes us to
have some compile errors on the missing type.
The bulk of these changes fall into a couple categories, and have to be
executed in one commit.
string() is replaced with buffer() on the url and url_view types
boost::string_view is replaced by std::string_view for many times, in
many cases removing a temporary that we had in the code previously.
Tested: Code compiles with boost 1.81.0 beta.
Redfish service validator passes.
Pretty good unit test coverage for URL-specific use cases.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8d3dc89b53d1cc390887fe53605d4867f75f76fd
diff --git a/meson.build b/meson.build
index 4c03ef9..967b309 100644
--- a/meson.build
+++ b/meson.build
@@ -168,8 +168,8 @@
'-Wduplicated-cond',
'-Wduplicated-branches',
'-Wlogical-op',
- '-Wunused-parameter',
'-Wnull-dereference',
+ '-Wunused-parameter',
'-Wdouble-promotion',
'-Wshadow',
'-Wno-psabi',
@@ -241,7 +241,6 @@
'-DBOOST_ASIO_NO_DEPRECATED',
'-DBOOST_ASIO_SEPARATE_COMPILATION',
'-DBOOST_BEAST_SEPARATE_COMPILATION',
- '-DBOOST_BEAST_USE_STD_STRING_VIEW',
'-DBOOST_EXCEPTION_DISABLE',
'-DBOOST_URL_NO_SOURCE_LOCATION',
'-DJSON_NOEXCEPTION',
@@ -285,21 +284,13 @@
endif
bmcweb_dependencies += nlohmann_json
-boost = dependency('boost',version : '>=1.80.0', required : false, include_type: 'system')
+boost = dependency('boost',version : '>=1.81.0', required : false, include_type: 'system')
if not boost.found()
boost = subproject('boost', required: true).get_variable('boost_dep')
boost = boost.as_system('system')
endif
bmcweb_dependencies += boost
-if cxx.has_header('boost/url/url_view.hpp')
- boost_url = declare_dependency()
-else
- boost_url = subproject('boost-url', required: true).get_variable('boost_url_dep')
- boost_url = boost_url.as_system('system')
-endif
-bmcweb_dependencies += boost_url
-
if get_option('tests').enabled()
gtest = dependency('gtest', main: true,disabler: true, required : false)
gmock = dependency('gmock', required : false)