Skip to content

Commit

Permalink
Fix read_until's regex support when ASIO_NO_DYNAMIC_BUFFER_V1 is defi…
Browse files Browse the repository at this point in the history
…ned.
  • Loading branch information
chriskohlhoff committed Jul 8, 2024
1 parent 595983d commit 84ecb55
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions asio/include/asio/impl/read_until.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
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)
Expand Down Expand Up @@ -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 <typename T>
operator T() const
{
return T::match_default | T::match_partial;
}
};

} // namespace detail

template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
const boost::basic_regex<char, Traits>& expr,
Expand Down

0 comments on commit 84ecb55

Please sign in to comment.