]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
1 | // |
2 | // execution/invocable_archetype.hpp | |
3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
4 | // | |
1e59de90 | 5 | // Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) |
20effc67 TL |
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_EXECUTION_INVOCABLE_ARCHETYPE_HPP | |
12 | #define BOOST_ASIO_EXECUTION_INVOCABLE_ARCHETYPE_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 | #include <boost/asio/detail/type_traits.hpp> | |
20 | #include <boost/asio/detail/variadic_templates.hpp> | |
21 | ||
22 | #include <boost/asio/detail/push_options.hpp> | |
23 | ||
24 | namespace boost { | |
25 | namespace asio { | |
26 | namespace execution { | |
27 | ||
28 | /// An archetypal function object used for determining adherence to the | |
29 | /// execution::executor concept. | |
30 | struct invocable_archetype | |
31 | { | |
32 | #if !defined(GENERATING_DOCUMENTATION) | |
33 | // Necessary for compatibility with a C++03 implementation of result_of. | |
34 | typedef void result_type; | |
35 | #endif // !defined(GENERATING_DOCUMENTATION) | |
36 | ||
37 | #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \ | |
38 | || defined(GENERATING_DOCUMENTATION) | |
39 | ||
40 | /// Function call operator. | |
41 | template <typename... Args> | |
42 | void operator()(BOOST_ASIO_MOVE_ARG(Args)...) | |
43 | { | |
44 | } | |
45 | ||
46 | #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) | |
47 | // || defined(GENERATING_DOCUMENTATION) | |
48 | ||
49 | void operator()() | |
50 | { | |
51 | } | |
52 | ||
53 | #define BOOST_ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF(n) \ | |
54 | template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \ | |
55 | void operator()(BOOST_ASIO_VARIADIC_UNNAMED_MOVE_PARAMS(n)) \ | |
56 | { \ | |
57 | } \ | |
58 | /**/ | |
59 | BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF) | |
60 | #undef BOOST_ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF | |
61 | ||
62 | #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) | |
63 | // || defined(GENERATING_DOCUMENTATION) | |
64 | }; | |
65 | ||
66 | } // namespace execution | |
67 | } // namespace asio | |
68 | } // namespace boost | |
69 | ||
70 | #include <boost/asio/detail/pop_options.hpp> | |
71 | ||
72 | #endif // BOOST_ASIO_EXECUTION_INVOCABLE_ARCHETYPE_HPP | |
73 |