Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / asio / is_read_buffered.hpp @ 2486

History | View | Annotate | Download (1.6 kB)

1 2486 sjacqu01
//
2 2486 sjacqu01
// is_read_buffered.hpp
3 2486 sjacqu01
// ~~~~~~~~~~~~~~~~~~~~
4 2486 sjacqu01
//
5 2486 sjacqu01
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 2486 sjacqu01
//
7 2486 sjacqu01
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8 2486 sjacqu01
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 2486 sjacqu01
//
10 2486 sjacqu01
11 2486 sjacqu01
#ifndef BOOST_ASIO_IS_READ_BUFFERED_HPP
12 2486 sjacqu01
#define BOOST_ASIO_IS_READ_BUFFERED_HPP
13 2486 sjacqu01
14 2486 sjacqu01
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 2486 sjacqu01
# pragma once
16 2486 sjacqu01
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 2486 sjacqu01
18 2486 sjacqu01
#include <boost/asio/detail/config.hpp>
19 2486 sjacqu01
#include <boost/asio/buffered_read_stream_fwd.hpp>
20 2486 sjacqu01
#include <boost/asio/buffered_stream_fwd.hpp>
21 2486 sjacqu01
22 2486 sjacqu01
#include <boost/asio/detail/push_options.hpp>
23 2486 sjacqu01
24 2486 sjacqu01
namespace boost {
25 2486 sjacqu01
namespace asio {
26 2486 sjacqu01
27 2486 sjacqu01
namespace detail {
28 2486 sjacqu01
29 2486 sjacqu01
template <typename Stream>
30 2486 sjacqu01
char is_read_buffered_helper(buffered_stream<Stream>* s);
31 2486 sjacqu01
32 2486 sjacqu01
template <typename Stream>
33 2486 sjacqu01
char is_read_buffered_helper(buffered_read_stream<Stream>* s);
34 2486 sjacqu01
35 2486 sjacqu01
struct is_read_buffered_big_type { char data[10]; };
36 2486 sjacqu01
is_read_buffered_big_type is_read_buffered_helper(...);
37 2486 sjacqu01
38 2486 sjacqu01
} // namespace detail
39 2486 sjacqu01
40 2486 sjacqu01
/// The is_read_buffered class is a traits class that may be used to determine
41 2486 sjacqu01
/// whether a stream type supports buffering of read data.
42 2486 sjacqu01
template <typename Stream>
43 2486 sjacqu01
class is_read_buffered
44 2486 sjacqu01
{
45 2486 sjacqu01
public:
46 2486 sjacqu01
#if defined(GENERATING_DOCUMENTATION)
47 2486 sjacqu01
  /// The value member is true only if the Stream type supports buffering of
48 2486 sjacqu01
  /// read data.
49 2486 sjacqu01
  static const bool value;
50 2486 sjacqu01
#else
51 2486 sjacqu01
  BOOST_ASIO_STATIC_CONSTANT(bool,
52 2486 sjacqu01
      value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1);
53 2486 sjacqu01
#endif
54 2486 sjacqu01
};
55 2486 sjacqu01
56 2486 sjacqu01
} // namespace asio
57 2486 sjacqu01
} // namespace boost
58 2486 sjacqu01
59 2486 sjacqu01
#include <boost/asio/detail/pop_options.hpp>
60 2486 sjacqu01
61 2486 sjacqu01
#endif // BOOST_ASIO_IS_READ_BUFFERED_HPP