Fix large copies with url_view and segments_view

Despite these objects being called "view" they are still relatively
large, as clang-tidy correctly flags, and we ignore.

Change all function uses to capture by:
const boost::urls::url_view_base&

Which is the base class of all boost URL types, and any class (url,
url_view, etc) is convertible to that base.

Change-Id: I8ee2ea3f4cfba38331303a7e4eb520a2b6f8ba92
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/http/logging.hpp b/http/logging.hpp
index 2f88c90..de14d99 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -5,7 +5,7 @@
 #include <boost/system/error_code.hpp>
 #include <boost/url/pct_string_view.hpp>
 #include <boost/url/string_view.hpp>
-#include <boost/url/url.hpp>
+#include <boost/url/url_view_base.hpp>
 #include <nlohmann/json.hpp>
 
 #include <bit>
@@ -46,27 +46,14 @@
     }
 };
 
-template <>
-struct std::formatter<boost::urls::url_view>
+template <std::derived_from<boost::urls::url_view_base> URL>
+struct std::formatter<URL>
 {
     constexpr auto parse(std::format_parse_context& ctx)
     {
         return ctx.begin();
     }
-    auto format(const boost::urls::url& msg, auto& ctx) const
-    {
-        return std::format_to(ctx.out(), "{}", std::string_view(msg.buffer()));
-    }
-};
-
-template <>
-struct std::formatter<boost::urls::url>
-{
-    constexpr auto parse(std::format_parse_context& ctx)
-    {
-        return ctx.begin();
-    }
-    auto format(const boost::urls::url& msg, auto& ctx) const
+    auto format(const URL& msg, auto& ctx) const
     {
         return std::format_to(ctx.out(), "{}", std::string_view(msg.buffer()));
     }