]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/ip/impl/address.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / asio / ip / impl / address.hpp
CommitLineData
7c673cae
FG
1//
2// ip/impl/address.hpp
3// ~~~~~~~~~~~~~~~~~~~
4//
92f5a8d4 5// Copyright (c) 2003-2019 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_HPP
12#define BOOST_ASIO_IP_IMPL_ADDRESS_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 address::from_string(const char* str)
31{
32 return boost::asio::ip::make_address(str);
33}
34
35inline address address::from_string(
36 const char* str, boost::system::error_code& ec)
37{
38 return boost::asio::ip::make_address(str, ec);
39}
40
41inline address address::from_string(const std::string& str)
42{
43 return boost::asio::ip::make_address(str);
44}
45
46inline address address::from_string(
47 const std::string& str, boost::system::error_code& ec)
48{
49 return boost::asio::ip::make_address(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& 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_HPP