File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
- #include " zmq_addon.hpp"
3
+ #include < zmq_addon.hpp>
4
4
#include < boost/asio/any_io_executor.hpp>
5
5
#include < boost/system/detail/error_code.hpp>
6
6
#include < stdexcept>
11
11
#if !defined(ZMQ_CPP20) && defined(CPPZMQ_ENABLE_CORRAL_COROUTINE)
12
12
#error "Coroutine support enabled with a C++ standard lower than C++20"
13
13
#endif
14
- #if defined(CPPZMQ_ENABLE_CORRAL_COROUTINE)
14
+ #if defined(ZMQ_CPP20) && defined(CPPZMQ_ENABLE_CORRAL_COROUTINE)
15
+ // As coroutine support is only avaiable for C++20 and upward,
16
+ // there is no point in using the ZMQ_XXX macros for compatibility.
17
+ // Everything that's available in C++20 can be used here (e.g. inline, noexcept).
18
+
15
19
#include < corral/Task.h>
16
20
#include < boost/asio/posix/stream_descriptor.hpp>
17
21
#include < boost/asio/windows/stream_handle.hpp>
18
- #endif
19
22
20
-
21
- #ifdef ZMQ_CPP20
22
- // As coroutine support is only avaiable for C++20 and upward,
23
- // there is no point in using the ZMQ_XXX macros for compatibility.
24
- // Everything that's available in C++20 can be used here (e.g. inline, noexcept).
25
23
namespace zmq
26
24
{
27
25
@@ -92,10 +90,6 @@ struct [[nodiscard]] async_send_awaitable_t
92
90
{
93
91
}
94
92
95
- public /* interface */ :
96
- inline auto enable_flag (zmq::send_flags flag) { m_flags = m_flags | flag; }
97
- inline auto disable_flag (zmq::send_flags flag) { m_flags = m_flags & (~flag); }
98
-
99
93
public /* awaitable */ :
100
94
// /
101
95
// / \brief An optimization which avoids suspending the coroutine if it isn't necessary.
You can’t perform that action at this time.
0 commit comments