Realistic 3D camera system
3D camera system components
address_v6.hpp
Go to the documentation of this file.
1 //
2 // ip/impl/address_v6.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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 ASIO_IP_IMPL_ADDRESS_V6_HPP
12 #define 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(ASIO_NO_IOSTREAM)
19 
21 
23 
24 namespace asio {
25 namespace ip {
26 
27 template <typename Elem, typename Traits>
28 std::basic_ostream<Elem, Traits>& operator<<(
29  std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
30 {
32  std::string s = addr.to_string(ec);
33  if (ec)
34  {
35  if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit)
37  else
38  os.setstate(std::basic_ostream<Elem, Traits>::failbit);
39  }
40  else
41  for (std::string::iterator i = s.begin(); i != s.end(); ++i)
42  os << os.widen(*i);
43  return os;
44 }
45 
46 } // namespace ip
47 } // namespace asio
48 
50 
51 #endif // !defined(ASIO_NO_IOSTREAM)
52 
53 #endif // ASIO_IP_IMPL_ADDRESS_V6_HPP
void throw_error(const asio::error_code &err)
Definition: throw_error.hpp:31
SocketService & s
Definition: connect.hpp:521
std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const address &addr)
Definition: address.hpp:28
Class to represent an error code value.
Definition: error_code.hpp:80
Implements IP version 6 style addresses.
Definition: address_v6.hpp:44
ASIO_DECL std::string to_string() const
Get the address as a string.
Definition: address_v6.ipp:100