Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:45

0001 //
0002 // detail/string_view.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
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 // defined(_MSC_VER) && (_MSC_VER >= 1200)
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 // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0027 # error BOOST_ASIO_HAS_STRING_VIEW is set but no string_view is available
0028 #endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
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 // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
0040 
0041 } // namespace asio
0042 } // namespace boost
0043 
0044 # define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
0045 #else // defined(BOOST_ASIO_HAS_STRING_VIEW)
0046 # define BOOST_ASIO_STRING_VIEW_PARAM const std::string&
0047 #endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
0048 
0049 #endif // BOOST_ASIO_DETAIL_STRING_VIEW_HPP