2 // ip/impl/address_v6.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
11 #ifndef BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
12 #define BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #if !defined(BOOST_ASIO_NO_IOSTREAM)
20 #include <boost/asio/detail/throw_error.hpp>
22 #include <boost/asio/detail/push_options.hpp>
28 #if !defined(BOOST_ASIO_NO_DEPRECATED)
30 inline address_v6 address_v6::from_string(const char* str)
32 return boost::asio::ip::make_address_v6(str);
35 inline address_v6 address_v6::from_string(
36 const char* str, boost::system::error_code& ec)
38 return boost::asio::ip::make_address_v6(str, ec);
41 inline address_v6 address_v6::from_string(const std::string& str)
43 return boost::asio::ip::make_address_v6(str);
46 inline address_v6 address_v6::from_string(
47 const std::string& str, boost::system::error_code& ec)
49 return boost::asio::ip::make_address_v6(str, ec);
52 #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
54 template <typename Elem, typename Traits>
55 std::basic_ostream<Elem, Traits>& operator<<(
56 std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
58 return os << addr.to_string().c_str();
65 #include <boost/asio/detail/pop_options.hpp>
67 #endif // !defined(BOOST_ASIO_NO_IOSTREAM)
69 #endif // BOOST_ASIO_IP_IMPL_ADDRESS_V6_HPP