7#if !defined(ASYNC_MQTT_UTIL_STRING_VIEW_HPP)
8#define ASYNC_MQTT_UTIL_STRING_VIEW_HPP
16using std::string_view;
17using std::basic_string_view;
22T* to_address(T* p)
noexcept
28auto to_address(
const T& p)
noexcept
30 return detail::to_address(p.operator->());
36template<
typename Begin,
typename End>
37string_view make_string_view(Begin begin, End end) {
40 typename std::iterator_traits<Begin>::iterator_category,
41 std::random_access_iterator_tag
44 return string_view(detail::to_address(begin),
static_cast<string_view::size_type
>(std::distance(begin, end)));