From 84ecb55cfac71a1eaef0e541443f087de45c938d Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 8 Jul 2024 22:58:31 +1000 Subject: [PATCH] Fix read_until's regex support when ASIO_NO_DYNAMIC_BUFFER_V1 is defined. --- asio/include/asio/impl/read_until.hpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/asio/include/asio/impl/read_until.hpp b/asio/include/asio/impl/read_until.hpp index 08fe3fcd9b..354a2d2040 100644 --- a/asio/include/asio/impl/read_until.hpp +++ b/asio/include/asio/impl/read_until.hpp @@ -68,6 +68,19 @@ namespace detail } return std::make_pair(last1, false); } + +#if !defined(ASIO_NO_EXTENSIONS) +#if defined(ASIO_HAS_BOOST_REGEX) + struct regex_match_flags + { + template + operator T() const + { + return T::match_default | T::match_partial; + } + }; +#endif // !defined(ASIO_NO_EXTENSIONS) +#endif // defined(ASIO_HAS_BOOST_REGEX) } // namespace detail #if !defined(ASIO_NO_DYNAMIC_BUFFER_V1) @@ -231,19 +244,6 @@ std::size_t read_until(SyncReadStream& s, #if !defined(ASIO_NO_EXTENSIONS) #if defined(ASIO_HAS_BOOST_REGEX) -namespace detail { - -struct regex_match_flags -{ - template - operator T() const - { - return T::match_default | T::match_partial; - } -}; - -} // namespace detail - template inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers, const boost::basic_regex& expr,