File indexing completed on 2025-01-18 09:28:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_STRING_VIEW_HPP
0012 #define BOOST_ASIO_DETAIL_STRING_VIEW_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #if defined(BOOST_ASIO_HAS_STRING_VIEW)
0021
0022 #if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
0023 # include <string_view>
0024 #elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0025 # include <experimental/string_view>
0026 #else
0027 # error BOOST_ASIO_HAS_STRING_VIEW is set but no string_view is available
0028 #endif
0029
0030 namespace boost {
0031 namespace asio {
0032
0033 #if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
0034 using std::basic_string_view;
0035 using std::string_view;
0036 #elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0037 using std::experimental::basic_string_view;
0038 using std::experimental::string_view;
0039 #endif
0040
0041 }
0042 }
0043
0044 # define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
0045 #else
0046 # define BOOST_ASIO_STRING_VIEW_PARAM const std::string&
0047 #endif
0048
0049 #endif