From 925b95d1029b5fcffabaa3daeead5e2510d6b665 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 30 Nov 2025 08:50:52 -0800 Subject: [PATCH] fix: any_router is public for now --- include/boost/beast2/server/basic_router.hpp | 8 ++++---- include/boost/beast2/server/router_types.hpp | 4 ++-- src/server/basic_router.cpp | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/boost/beast2/server/basic_router.hpp b/include/boost/beast2/server/basic_router.hpp index 11b670cd..b5c7fc8a 100644 --- a/include/boost/beast2/server/basic_router.hpp +++ b/include/boost/beast2/server/basic_router.hpp @@ -128,8 +128,8 @@ struct router_options }; //----------------------------------------------- - -namespace detail { + +//namespace detail { class any_router; @@ -189,7 +189,7 @@ class any_router impl* impl_ = nullptr; }; -} // detail +//} // detail //----------------------------------------------- @@ -292,7 +292,7 @@ class any_router @tparam Res The type of response object. */ template -class basic_router : public detail::any_router +class basic_router : public /*detail::*/any_router { // Req must be publicly derived from basic_request BOOST_CORE_STATIC_ASSERT( diff --git a/include/boost/beast2/server/router_types.hpp b/include/boost/beast2/server/router_types.hpp index 3ee8df91..c146e18b 100644 --- a/include/boost/beast2/server/router_types.hpp +++ b/include/boost/beast2/server/router_types.hpp @@ -290,7 +290,7 @@ class basic_request core::string_view path; private: - friend class detail::any_router; + friend class /*detail::*/any_router; struct match_result; http_proto::method verb_ = http_proto::method::unknown; @@ -311,7 +311,7 @@ class basic_request class basic_response { private: - friend class detail::any_router; + friend class /*detail::*/any_router; template friend class basic_router; diff --git a/src/server/basic_router.cpp b/src/server/basic_router.cpp index ab515e9c..7406243b 100644 --- a/src/server/basic_router.cpp +++ b/src/server/basic_router.cpp @@ -22,7 +22,7 @@ namespace boost { namespace beast2 { -namespace detail { +//namespace detail { // VFALCO Temporarily here until Boost.URL merges the fix static @@ -80,6 +80,7 @@ pattern target path(use) path(get) //------------------------------------------------ + any_router::any_handler::~any_handler() = default; //------------------------------------------------ @@ -201,7 +202,7 @@ pct_decode_path( //------------------------------------------------ -} // detail +//} // detail struct basic_request:: match_result @@ -255,7 +256,7 @@ struct basic_request:: //------------------------------------------------ -namespace detail { +//namespace detail { // Matches a path against a pattern struct any_router::matcher @@ -867,6 +868,7 @@ do_dispatch( return res.ec_; } -} // detail +//} // detail + } // beast2 } // boost