5
// Copyright (c) 2003-2008 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 ASIO_PLACEHOLDERS_HPP
12
#define ASIO_PLACEHOLDERS_HPP
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
#include "asio/detail/push_options.hpp"
20
#include "asio/detail/push_options.hpp"
21
#include <boost/bind/arg.hpp>
22
#include <boost/detail/workaround.hpp>
23
#include "asio/detail/pop_options.hpp"
26
namespace placeholders {
28
#if defined(GENERATING_DOCUMENTATION)
30
/// An argument placeholder, for use with boost::bind(), that corresponds to
31
/// the error argument of a handler for any of the asynchronous functions.
34
/// An argument placeholder, for use with boost::bind(), that corresponds to
35
/// the bytes_transferred argument of a handler for asynchronous functions such
36
/// as asio::basic_stream_socket::async_write_some or
37
/// asio::async_write.
38
unspecified bytes_transferred;
40
/// An argument placeholder, for use with boost::bind(), that corresponds to
41
/// the iterator argument of a handler for asynchronous functions such as
42
/// asio::basic_resolver::resolve.
45
#elif defined(__BORLANDC__) || defined(__GNUC__)
47
inline boost::arg<1> error()
49
return boost::arg<1>();
52
inline boost::arg<2> bytes_transferred()
54
return boost::arg<2>();
57
inline boost::arg<2> iterator()
59
return boost::arg<2>();
69
static boost::arg<Number>& get()
71
static boost::arg<Number> result;
77
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
79
static boost::arg<1>& error
80
= asio::placeholders::detail::placeholder<1>::get();
81
static boost::arg<2>& bytes_transferred
82
= asio::placeholders::detail::placeholder<2>::get();
83
static boost::arg<2>& iterator
84
= asio::placeholders::detail::placeholder<2>::get();
91
= asio::placeholders::detail::placeholder<1>::get();
92
boost::arg<2>& bytes_transferred
93
= asio::placeholders::detail::placeholder<2>::get();
94
boost::arg<2>& iterator
95
= asio::placeholders::detail::placeholder<2>::get();
102
} // namespace placeholders
105
#include "asio/detail/pop_options.hpp"
107
#endif // ASIO_PLACEHOLDERS_HPP