Do not use the method to_string, now apparently removed from boost::core::string_view. This change allows using a recent Boost (1.82.0), without breaking older versions either: the code also compiles fine with Boost 1.77.0 which I had been using for a long time.
g++-11 -march=x86-64 -mno-sse4.1 -fPIC -pthread -I/usr/local/include -I/home/luca2/usr-pep-v3/include -std=c++14 -fvisibility=hidden -O0 -g -DDEBUG_ENABLED -c -o ev_server.o ev_server.cc
ev_server.cc: In static member function ‘static pEp::Webserver::response ev_server::OnOtherRequest(boost::cmatch, const request&)’:
ev_server.cc:294:47: error: ‘using string_view = boost::core::string_view’ {aka ‘class boost::core::basic_string_view<char>’} has no member named ‘to_string’
294 | const std::string path = req.target().to_string(); // NB: is percent-encoded! does not relevant for the supported paths above.
| ^~~~~~~~~
ev_server.cc:296:70: error: ‘using string_view = boost::core::string_view’ {aka ‘class boost::core::basic_string_view<char>’} has no member named ‘to_string’
296 | DEBUG_LOG( Log() ) << "** Request: [" << req.method_string().to_string() << "] " << "Path: [" + path + "]";
| ^~~~~~~~~
@nkls noticed the problem, testing on what debian makes available.
2023年04月19日 15:20: I have force-pushed a slightly different fix. Tested, it works well.
Do not use the method `to_string`, now apparently removed from `boost::core::string_view`. This change allows using a recent Boost (1.82.0), without breaking older versions either: the code also compiles fine with Boost 1.77.0 which I had been using for a long time.
g++-11 -march=x86-64 -mno-sse4.1 -fPIC -pthread -I/usr/local/include -I/home/luca2/usr-pep-v3/include -std=c++14 -fvisibility=hidden -O0 -g -DDEBUG_ENABLED -c -o ev_server.o ev_server.cc
ev_server.cc: In static member function ‘static pEp::Webserver::response ev_server::OnOtherRequest(boost::cmatch, const request&)’:
ev_server.cc:294:47: error: ‘using string_view = boost::core::string_view’ {aka ‘class boost::core::basic_string_view<char>’} has no member named ‘to_string’
294 | const std::string path = req.target().to_string(); // NB: is percent-encoded! does not relevant for the supported paths above.
| ^~~~~~~~~
ev_server.cc:296:70: error: ‘using string_view = boost::core::string_view’ {aka ‘class boost::core::basic_string_view<char>’} has no member named ‘to_string’
296 | DEBUG_LOG( Log() ) << "** Request: [" << req.method_string().to_string() << "] " << "Path: [" + path + "]";
| ^~~~~~~~~
@nkls noticed the problem, testing on what debian makes available.
2023年04月19日 15:20: I have force-pushed a slightly different fix. Tested, it works well.