]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/ip/impl/address_v6.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / asio / ip / impl / address_v6.hpp
CommitLineData
7c673cae
FG
1//
2// ip/impl/address_v6.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~
4//
1e59de90 5// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7c673cae
FG
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#ifndef BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
12#define BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#if !defined(BOOST_ASIO_NO_IOSTREAM)
19
20#include <boost/asio/detail/throw_error.hpp>
21
22#include <boost/asio/detail/push_options.hpp>
23
24namespace boost {
25namespace asio {
26namespace ip {
27
b32b8144
FG
28#if !defined(BOOST_ASIO_NO_DEPRECATED)
29
30inline address_v6 address_v6::from_string(const char* str)
31{
32 return boost::asio::ip::make_address_v6(str);
33}
34
35inline address_v6 address_v6::from_string(
36 const char* str, boost::system::error_code& ec)
37{
38 return boost::asio::ip::make_address_v6(str, ec);
39}
40
41inline address_v6 address_v6::from_string(const std::string& str)
42{
43 return boost::asio::ip::make_address_v6(str);
44}
45
46inline address_v6 address_v6::from_string(
47 const std::string& str, boost::system::error_code& ec)
48{
49 return boost::asio::ip::make_address_v6(str, ec);
50}
51
52#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
53
7c673cae
FG
54template <typename Elem, typename Traits>
55std::basic_ostream<Elem, Traits>& operator<<(
56 std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
57{
b32b8144 58 return os << addr.to_string().c_str();
7c673cae
FG
59}
60
61} // namespace ip
62} // namespace asio
63} // namespace boost
64
65#include <boost/asio/detail/pop_options.hpp>
66
67#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
68
69#endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP