1 | //
|
---|
2 | // placeholders.hpp
|
---|
3 | // ~~~~~~~~~~~~~~~~
|
---|
4 | //
|
---|
5 | // Copyright (c) 2003-2017 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 BOOST_ASIO_PLACEHOLDERS_HPP
|
---|
12 | #define BOOST_ASIO_PLACEHOLDERS_HPP
|
---|
13 |
|
---|
14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
---|
15 | # pragma once
|
---|
16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
---|
17 |
|
---|
18 | #include <boost/asio/detail/config.hpp>
|
---|
19 |
|
---|
20 | #if defined(BOOST_ASIO_HAS_BOOST_BIND)
|
---|
21 | # include <boost/bind/arg.hpp>
|
---|
22 | #endif // defined(BOOST_ASIO_HAS_BOOST_BIND)
|
---|
23 |
|
---|
24 | #include <boost/asio/detail/push_options.hpp>
|
---|
25 |
|
---|
26 | namespace boost {
|
---|
27 | namespace asio {
|
---|
28 | namespace placeholders {
|
---|
29 |
|
---|
30 | #if defined(GENERATING_DOCUMENTATION)
|
---|
31 |
|
---|
32 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
33 | /// the error argument of a handler for any of the asynchronous functions.
|
---|
34 | unspecified error;
|
---|
35 |
|
---|
36 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
37 | /// the bytes_transferred argument of a handler for asynchronous functions such
|
---|
38 | /// as boost::asio::basic_stream_socket::async_write_some or
|
---|
39 | /// boost::asio::async_write.
|
---|
40 | unspecified bytes_transferred;
|
---|
41 |
|
---|
42 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
43 | /// the iterator argument of a handler for asynchronous functions such as
|
---|
44 | /// boost::asio::async_connect.
|
---|
45 | unspecified iterator;
|
---|
46 |
|
---|
47 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
48 | /// the results argument of a handler for asynchronous functions such as
|
---|
49 | /// boost::asio::basic_resolver::async_resolve.
|
---|
50 | unspecified results;
|
---|
51 |
|
---|
52 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
53 | /// the results argument of a handler for asynchronous functions such as
|
---|
54 | /// boost::asio::async_connect.
|
---|
55 | unspecified endpoint;
|
---|
56 |
|
---|
57 | /// An argument placeholder, for use with boost::bind(), that corresponds to
|
---|
58 | /// the signal_number argument of a handler for asynchronous functions such as
|
---|
59 | /// boost::asio::signal_set::async_wait.
|
---|
60 | unspecified signal_number;
|
---|
61 |
|
---|
62 | #elif defined(BOOST_ASIO_HAS_BOOST_BIND)
|
---|
63 | # if defined(__BORLANDC__) || defined(__GNUC__)
|
---|
64 |
|
---|
65 | inline boost::arg<1> error()
|
---|
66 | {
|
---|
67 | return boost::arg<1>();
|
---|
68 | }
|
---|
69 |
|
---|
70 | inline boost::arg<2> bytes_transferred()
|
---|
71 | {
|
---|
72 | return boost::arg<2>();
|
---|
73 | }
|
---|
74 |
|
---|
75 | inline boost::arg<2> iterator()
|
---|
76 | {
|
---|
77 | return boost::arg<2>();
|
---|
78 | }
|
---|
79 |
|
---|
80 | inline boost::arg<2> results()
|
---|
81 | {
|
---|
82 | return boost::arg<2>();
|
---|
83 | }
|
---|
84 |
|
---|
85 | inline boost::arg<2> endpoint()
|
---|
86 | {
|
---|
87 | return boost::arg<2>();
|
---|
88 | }
|
---|
89 |
|
---|
90 | inline boost::arg<2> signal_number()
|
---|
91 | {
|
---|
92 | return boost::arg<2>();
|
---|
93 | }
|
---|
94 |
|
---|
95 | # else
|
---|
96 |
|
---|
97 | namespace detail
|
---|
98 | {
|
---|
99 | template <int Number>
|
---|
100 | struct placeholder
|
---|
101 | {
|
---|
102 | static boost::arg<Number>& get()
|
---|
103 | {
|
---|
104 | static boost::arg<Number> result;
|
---|
105 | return result;
|
---|
106 | }
|
---|
107 | };
|
---|
108 | }
|
---|
109 |
|
---|
110 | # if!(defined(BOOST_ASIO_MSVC)&&(BOOST_ASIO_MSVC<1400))
|
---|
111 | namespace Platzhalterchen
|
---|
112 | {///@@@Boostilonchenkorrekturen.Michael Soliman.2018-04-15.
|
---|
113 | # endif
|
---|
114 | static boost::arg<1>&error =boost::asio::placeholders::detail::placeholder<1>::get();
|
---|
115 | static boost::arg<2>&bytes_transferred =boost::asio::placeholders::detail::placeholder<2>::get();
|
---|
116 | static boost::arg<2>&iterator =boost::asio::placeholders::detail::placeholder<2>::get();
|
---|
117 | static boost::arg<2>&results =boost::asio::placeholders::detail::placeholder<2>::get();
|
---|
118 | static boost::arg<2>&endpoint =boost::asio::placeholders::detail::placeholder<2>::get();
|
---|
119 | static boost::arg<2>&signal_number =boost::asio::placeholders::detail::placeholder<2>::get();
|
---|
120 | # if!(defined(BOOST_ASIO_MSVC)&&(BOOST_ASIO_MSVC<1400))
|
---|
121 | } // namespace
|
---|
122 | # endif
|
---|
123 |
|
---|
124 | # endif
|
---|
125 | #endif
|
---|
126 |
|
---|
127 | } // namespace placeholders
|
---|
128 | } // namespace asio
|
---|
129 | } // namespace boost
|
---|
130 |
|
---|
131 | #include <boost/asio/detail/pop_options.hpp>
|
---|
132 |
|
---|
133 | #endif // BOOST_ASIO_PLACEHOLDERS_HPP
|
---|
134 |
|
---|
135 |
|
---|
136 |
|
---|
137 |
|
---|
138 |
|
---|
139 |
|
---|
140 |
|
---|
141 |
|
---|
142 |
|
---|