File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -109,25 +109,14 @@ namespace restc_cpp {
109
109
* @param handler The handler to dispatch.
110
110
*/
111
111
template <typename IOService, typename Handler>
112
- void boost_dispatch (IOService& io_service, Handler&& handler) {
112
+ void boost_dispatch (IOService * io_service, Handler&& handler) {
113
113
#if BOOST_VERSION >= 106600
114
- if constexpr (std::is_pointer_v<IOService>) {
115
- io_service->get_executor ().dispatch (
116
- std::forward<Handler>(handler),
117
- std::allocator<void >() // Default allocator
118
- );
119
- } else {
120
- io_service.get_executor ().dispatch (
121
- std::forward<Handler>(handler),
122
- std::allocator<void >() // Default allocator
123
- );
124
- }
114
+ io_service->get_executor ().dispatch (
115
+ std::forward<Handler>(handler),
116
+ std::allocator<void >() // Default allocator
117
+ );
125
118
#else
126
- if constexpr (std::is_pointer_v<IOService>) {
127
- io_service->dispatch (std::forward<Handler>(handler));
128
- } else {
129
- io_service.dispatch (std::forward<Handler>(handler));
130
- }
119
+ io_service->dispatch (std::forward<Handler>(handler));
131
120
#endif
132
121
}
133
122
You can’t perform that action at this time.
0 commit comments