11 #ifndef ASIO_DETAIL_BIND_HANDLER_HPP 12 #define ASIO_DETAIL_BIND_HANDLER_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/associated_allocator.hpp" 20 #include "asio/associated_executor.hpp" 21 #include "asio/detail/handler_alloc_helpers.hpp" 22 #include "asio/detail/handler_cont_helpers.hpp" 23 #include "asio/detail/handler_invoke_helpers.hpp" 24 #include "asio/detail/type_traits.hpp" 26 #include "asio/detail/push_options.hpp" 31 template <
typename Handler,
typename Arg1>
36 binder1(
int, ASIO_MOVE_ARG(T) handler,
const Arg1& arg1)
37 : handler_(ASIO_MOVE_CAST(T)(handler)),
42 binder1(Handler& handler,
const Arg1& arg1)
43 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
48 #if defined(ASIO_HAS_MOVE) 50 : handler_(other.handler_),
56 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
57 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
60 #endif // defined(ASIO_HAS_MOVE) 64 handler_(static_cast<const Arg1&>(arg1_));
67 void operator()()
const 77 template <
typename Handler,
typename Arg1>
78 inline asio_handler_allocate_is_deprecated
79 asio_handler_allocate(std::size_t size,
82 #if defined(ASIO_NO_DEPRECATED) 83 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
84 return asio_handler_allocate_is_no_longer_used();
85 #else // defined(ASIO_NO_DEPRECATED) 86 return asio_handler_alloc_helpers::allocate(
87 size, this_handler->handler_);
88 #endif // defined(ASIO_NO_DEPRECATED) 91 template <
typename Handler,
typename Arg1>
92 inline asio_handler_deallocate_is_deprecated
93 asio_handler_deallocate(
void* pointer, std::size_t size,
96 asio_handler_alloc_helpers::deallocate(
97 pointer, size, this_handler->handler_);
98 #if defined(ASIO_NO_DEPRECATED) 99 return asio_handler_deallocate_is_no_longer_used();
100 #endif // defined(ASIO_NO_DEPRECATED) 103 template <
typename Handler,
typename Arg1>
104 inline bool asio_handler_is_continuation(
107 return asio_handler_cont_helpers::is_continuation(
108 this_handler->handler_);
111 template <
typename Function,
typename Handler,
typename Arg1>
112 inline asio_handler_invoke_is_deprecated
116 asio_handler_invoke_helpers::invoke(
117 function, this_handler->handler_);
118 #if defined(ASIO_NO_DEPRECATED) 119 return asio_handler_invoke_is_no_longer_used();
120 #endif // defined(ASIO_NO_DEPRECATED) 123 template <
typename Function,
typename Handler,
typename Arg1>
124 inline asio_handler_invoke_is_deprecated
128 asio_handler_invoke_helpers::invoke(
129 function, this_handler->handler_);
130 #if defined(ASIO_NO_DEPRECATED) 131 return asio_handler_invoke_is_no_longer_used();
132 #endif // defined(ASIO_NO_DEPRECATED) 135 template <
typename Handler,
typename Arg1>
137 ASIO_MOVE_ARG(Handler) handler,
const Arg1& arg1)
140 ASIO_MOVE_CAST(Handler)(handler), arg1);
143 template <
typename Handler,
typename Arg1,
typename Arg2>
147 template <
typename T>
148 binder2(
int, ASIO_MOVE_ARG(T) handler,
149 const Arg1& arg1,
const Arg2& arg2)
150 : handler_(ASIO_MOVE_CAST(T)(handler)),
156 binder2(Handler& handler,
const Arg1& arg1,
const Arg2& arg2)
157 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
163 #if defined(ASIO_HAS_MOVE) 165 : handler_(other.handler_),
172 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
173 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
174 arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
177 #endif // defined(ASIO_HAS_MOVE) 181 handler_(static_cast<const Arg1&>(arg1_),
182 static_cast<const Arg2&>(arg2_));
185 void operator()()
const 187 handler_(arg1_, arg2_);
196 template <
typename Handler,
typename Arg1,
typename Arg2>
197 inline asio_handler_allocate_is_deprecated
198 asio_handler_allocate(std::size_t size,
201 #if defined(ASIO_NO_DEPRECATED) 202 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
203 return asio_handler_allocate_is_no_longer_used();
204 #else // defined(ASIO_NO_DEPRECATED) 205 return asio_handler_alloc_helpers::allocate(
206 size, this_handler->handler_);
207 #endif // defined(ASIO_NO_DEPRECATED) 210 template <
typename Handler,
typename Arg1,
typename Arg2>
211 inline asio_handler_deallocate_is_deprecated
212 asio_handler_deallocate(
void* pointer, std::size_t size,
215 asio_handler_alloc_helpers::deallocate(
216 pointer, size, this_handler->handler_);
217 #if defined(ASIO_NO_DEPRECATED) 218 return asio_handler_deallocate_is_no_longer_used();
219 #endif // defined(ASIO_NO_DEPRECATED) 222 template <
typename Handler,
typename Arg1,
typename Arg2>
223 inline bool asio_handler_is_continuation(
226 return asio_handler_cont_helpers::is_continuation(
227 this_handler->handler_);
230 template <
typename Function,
typename Handler,
typename Arg1,
typename Arg2>
231 inline asio_handler_invoke_is_deprecated
235 asio_handler_invoke_helpers::invoke(
236 function, this_handler->handler_);
237 #if defined(ASIO_NO_DEPRECATED) 238 return asio_handler_invoke_is_no_longer_used();
239 #endif // defined(ASIO_NO_DEPRECATED) 242 template <
typename Function,
typename Handler,
typename Arg1,
typename Arg2>
243 inline asio_handler_invoke_is_deprecated
247 asio_handler_invoke_helpers::invoke(
248 function, this_handler->handler_);
249 #if defined(ASIO_NO_DEPRECATED) 250 return asio_handler_invoke_is_no_longer_used();
251 #endif // defined(ASIO_NO_DEPRECATED) 254 template <
typename Handler,
typename Arg1,
typename Arg2>
256 ASIO_MOVE_ARG(Handler) handler,
const Arg1& arg1,
const Arg2& arg2)
259 ASIO_MOVE_CAST(Handler)(handler), arg1, arg2);
262 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Arg3>
266 template <
typename T>
267 binder3(
int, ASIO_MOVE_ARG(T) handler,
const Arg1& arg1,
268 const Arg2& arg2,
const Arg3& arg3)
269 : handler_(ASIO_MOVE_CAST(T)(handler)),
276 binder3(Handler& handler,
const Arg1& arg1,
277 const Arg2& arg2,
const Arg3& arg3)
278 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
285 #if defined(ASIO_HAS_MOVE) 287 : handler_(other.handler_),
295 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
296 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
297 arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
298 arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_))
301 #endif // defined(ASIO_HAS_MOVE) 305 handler_(static_cast<const Arg1&>(arg1_),
306 static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_));
309 void operator()()
const 311 handler_(arg1_, arg2_, arg3_);
321 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Arg3>
322 inline asio_handler_allocate_is_deprecated
323 asio_handler_allocate(std::size_t size,
326 #if defined(ASIO_NO_DEPRECATED) 327 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
328 return asio_handler_allocate_is_no_longer_used();
329 #else // defined(ASIO_NO_DEPRECATED) 330 return asio_handler_alloc_helpers::allocate(
331 size, this_handler->handler_);
332 #endif // defined(ASIO_NO_DEPRECATED) 335 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Arg3>
336 inline asio_handler_deallocate_is_deprecated
337 asio_handler_deallocate(
void* pointer, std::size_t size,
340 asio_handler_alloc_helpers::deallocate(
341 pointer, size, this_handler->handler_);
342 #if defined(ASIO_NO_DEPRECATED) 343 return asio_handler_deallocate_is_no_longer_used();
344 #endif // defined(ASIO_NO_DEPRECATED) 347 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Arg3>
348 inline bool asio_handler_is_continuation(
351 return asio_handler_cont_helpers::is_continuation(
352 this_handler->handler_);
355 template <
typename Function,
typename Handler,
356 typename Arg1,
typename Arg2,
typename Arg3>
357 inline asio_handler_invoke_is_deprecated
361 asio_handler_invoke_helpers::invoke(
362 function, this_handler->handler_);
363 #if defined(ASIO_NO_DEPRECATED) 364 return asio_handler_invoke_is_no_longer_used();
365 #endif // defined(ASIO_NO_DEPRECATED) 368 template <
typename Function,
typename Handler,
369 typename Arg1,
typename Arg2,
typename Arg3>
370 inline asio_handler_invoke_is_deprecated
374 asio_handler_invoke_helpers::invoke(
375 function, this_handler->handler_);
376 #if defined(ASIO_NO_DEPRECATED) 377 return asio_handler_invoke_is_no_longer_used();
378 #endif // defined(ASIO_NO_DEPRECATED) 381 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Arg3>
383 ASIO_MOVE_ARG(Handler) handler,
const Arg1& arg1,
const Arg2& arg2,
387 ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3);
390 template <
typename Handler,
typename Arg1,
391 typename Arg2,
typename Arg3,
typename Arg4>
395 template <
typename T>
396 binder4(
int, ASIO_MOVE_ARG(T) handler,
const Arg1& arg1,
397 const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4)
398 : handler_(ASIO_MOVE_CAST(T)(handler)),
406 binder4(Handler& handler,
const Arg1& arg1,
407 const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4)
408 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
416 #if defined(ASIO_HAS_MOVE) 418 : handler_(other.handler_),
427 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
428 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
429 arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
430 arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_)),
431 arg4_(ASIO_MOVE_CAST(Arg4)(other.arg4_))
434 #endif // defined(ASIO_HAS_MOVE) 438 handler_(static_cast<const Arg1&>(arg1_),
439 static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
440 static_cast<const Arg4&>(arg4_));
443 void operator()()
const 445 handler_(arg1_, arg2_, arg3_, arg4_);
456 template <
typename Handler,
typename Arg1,
457 typename Arg2,
typename Arg3,
typename Arg4>
458 inline asio_handler_allocate_is_deprecated
459 asio_handler_allocate(std::size_t size,
462 #if defined(ASIO_NO_DEPRECATED) 463 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
464 return asio_handler_allocate_is_no_longer_used();
465 #else // defined(ASIO_NO_DEPRECATED) 466 return asio_handler_alloc_helpers::allocate(
467 size, this_handler->handler_);
468 #endif // defined(ASIO_NO_DEPRECATED) 471 template <
typename Handler,
typename Arg1,
472 typename Arg2,
typename Arg3,
typename Arg4>
473 inline asio_handler_deallocate_is_deprecated
474 asio_handler_deallocate(
void* pointer, std::size_t size,
477 asio_handler_alloc_helpers::deallocate(
478 pointer, size, this_handler->handler_);
479 #if defined(ASIO_NO_DEPRECATED) 480 return asio_handler_deallocate_is_no_longer_used();
481 #endif // defined(ASIO_NO_DEPRECATED) 484 template <
typename Handler,
typename Arg1,
485 typename Arg2,
typename Arg3,
typename Arg4>
486 inline bool asio_handler_is_continuation(
489 return asio_handler_cont_helpers::is_continuation(
490 this_handler->handler_);
493 template <
typename Function,
typename Handler,
typename Arg1,
494 typename Arg2,
typename Arg3,
typename Arg4>
495 inline asio_handler_invoke_is_deprecated
499 asio_handler_invoke_helpers::invoke(
500 function, this_handler->handler_);
501 #if defined(ASIO_NO_DEPRECATED) 502 return asio_handler_invoke_is_no_longer_used();
503 #endif // defined(ASIO_NO_DEPRECATED) 506 template <
typename Function,
typename Handler,
typename Arg1,
507 typename Arg2,
typename Arg3,
typename Arg4>
508 inline asio_handler_invoke_is_deprecated
512 asio_handler_invoke_helpers::invoke(
513 function, this_handler->handler_);
514 #if defined(ASIO_NO_DEPRECATED) 515 return asio_handler_invoke_is_no_longer_used();
516 #endif // defined(ASIO_NO_DEPRECATED) 519 template <
typename Handler,
typename Arg1,
520 typename Arg2,
typename Arg3,
typename Arg4>
522 bind_handler(ASIO_MOVE_ARG(Handler) handler,
const Arg1& arg1,
523 const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4)
525 return binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>(0,
526 ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4);
529 template <
typename Handler,
typename Arg1,
typename Arg2,
530 typename Arg3,
typename Arg4,
typename Arg5>
534 template <
typename T>
535 binder5(
int, ASIO_MOVE_ARG(T) handler,
const Arg1& arg1,
536 const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4,
const Arg5& arg5)
537 : handler_(ASIO_MOVE_CAST(T)(handler)),
546 binder5(Handler& handler,
const Arg1& arg1,
const Arg2& arg2,
547 const Arg3& arg3,
const Arg4& arg4,
const Arg5& arg5)
548 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
557 #if defined(ASIO_HAS_MOVE) 559 : handler_(other.handler_),
569 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
570 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
571 arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
572 arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_)),
573 arg4_(ASIO_MOVE_CAST(Arg4)(other.arg4_)),
574 arg5_(ASIO_MOVE_CAST(Arg5)(other.arg5_))
577 #endif // defined(ASIO_HAS_MOVE) 581 handler_(static_cast<const Arg1&>(arg1_),
582 static_cast<const Arg2&>(arg2_), static_cast<const Arg3&>(arg3_),
583 static_cast<const Arg4&>(arg4_), static_cast<const Arg5&>(arg5_));
586 void operator()()
const 588 handler_(arg1_, arg2_, arg3_, arg4_, arg5_);
600 template <
typename Handler,
typename Arg1,
typename Arg2,
601 typename Arg3,
typename Arg4,
typename Arg5>
602 inline asio_handler_allocate_is_deprecated
603 asio_handler_allocate(std::size_t size,
606 #if defined(ASIO_NO_DEPRECATED) 607 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
608 return asio_handler_allocate_is_no_longer_used();
609 #else // defined(ASIO_NO_DEPRECATED) 610 return asio_handler_alloc_helpers::allocate(
611 size, this_handler->handler_);
612 #endif // defined(ASIO_NO_DEPRECATED) 615 template <
typename Handler,
typename Arg1,
typename Arg2,
616 typename Arg3,
typename Arg4,
typename Arg5>
617 inline asio_handler_deallocate_is_deprecated
618 asio_handler_deallocate(
void* pointer, std::size_t size,
621 asio_handler_alloc_helpers::deallocate(
622 pointer, size, this_handler->handler_);
623 #if defined(ASIO_NO_DEPRECATED) 624 return asio_handler_deallocate_is_no_longer_used();
625 #endif // defined(ASIO_NO_DEPRECATED) 628 template <
typename Handler,
typename Arg1,
typename Arg2,
629 typename Arg3,
typename Arg4,
typename Arg5>
630 inline bool asio_handler_is_continuation(
633 return asio_handler_cont_helpers::is_continuation(
634 this_handler->handler_);
637 template <
typename Function,
typename Handler,
typename Arg1,
638 typename Arg2,
typename Arg3,
typename Arg4,
typename Arg5>
639 inline asio_handler_invoke_is_deprecated
643 asio_handler_invoke_helpers::invoke(
644 function, this_handler->handler_);
645 #if defined(ASIO_NO_DEPRECATED) 646 return asio_handler_invoke_is_no_longer_used();
647 #endif // defined(ASIO_NO_DEPRECATED) 650 template <
typename Function,
typename Handler,
typename Arg1,
651 typename Arg2,
typename Arg3,
typename Arg4,
typename Arg5>
652 inline asio_handler_invoke_is_deprecated
656 asio_handler_invoke_helpers::invoke(
657 function, this_handler->handler_);
658 #if defined(ASIO_NO_DEPRECATED) 659 return asio_handler_invoke_is_no_longer_used();
660 #endif // defined(ASIO_NO_DEPRECATED) 663 template <
typename Handler,
typename Arg1,
typename Arg2,
664 typename Arg3,
typename Arg4,
typename Arg5>
666 bind_handler(ASIO_MOVE_ARG(Handler) handler,
const Arg1& arg1,
667 const Arg2& arg2,
const Arg3& arg3,
const Arg4& arg4,
const Arg5& arg5)
669 return binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
670 ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4, arg5);
673 #if defined(ASIO_HAS_MOVE) 675 template <
typename Handler,
typename Arg1>
679 move_binder1(
int, ASIO_MOVE_ARG(Handler) handler,
680 ASIO_MOVE_ARG(Arg1) arg1)
681 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
682 arg1_(ASIO_MOVE_CAST(Arg1)(arg1))
686 move_binder1(move_binder1&& other)
687 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
688 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
694 handler_(ASIO_MOVE_CAST(Arg1)(arg1_));
702 template <
typename Handler,
typename Arg1>
703 inline asio_handler_allocate_is_deprecated
704 asio_handler_allocate(std::size_t size,
705 move_binder1<Handler, Arg1>* this_handler)
707 #if defined(ASIO_NO_DEPRECATED) 708 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
709 return asio_handler_allocate_is_no_longer_used();
710 #else // defined(ASIO_NO_DEPRECATED) 711 return asio_handler_alloc_helpers::allocate(
712 size, this_handler->handler_);
713 #endif // defined(ASIO_NO_DEPRECATED) 716 template <
typename Handler,
typename Arg1>
717 inline asio_handler_deallocate_is_deprecated
718 asio_handler_deallocate(
void* pointer, std::size_t size,
719 move_binder1<Handler, Arg1>* this_handler)
721 asio_handler_alloc_helpers::deallocate(
722 pointer, size, this_handler->handler_);
723 #if defined(ASIO_NO_DEPRECATED) 724 return asio_handler_deallocate_is_no_longer_used();
725 #endif // defined(ASIO_NO_DEPRECATED) 728 template <
typename Handler,
typename Arg1>
729 inline bool asio_handler_is_continuation(
730 move_binder1<Handler, Arg1>* this_handler)
732 return asio_handler_cont_helpers::is_continuation(
733 this_handler->handler_);
736 template <
typename Function,
typename Handler,
typename Arg1>
737 inline asio_handler_invoke_is_deprecated
739 move_binder1<Handler, Arg1>* this_handler)
741 asio_handler_invoke_helpers::invoke(
742 ASIO_MOVE_CAST(Function)(
function), this_handler->handler_);
743 #if defined(ASIO_NO_DEPRECATED) 744 return asio_handler_invoke_is_no_longer_used();
745 #endif // defined(ASIO_NO_DEPRECATED) 748 template <
typename Handler,
typename Arg1,
typename Arg2>
752 move_binder2(
int, ASIO_MOVE_ARG(Handler) handler,
753 const Arg1& arg1, ASIO_MOVE_ARG(Arg2) arg2)
754 : handler_(ASIO_MOVE_CAST(Handler)(handler)),
756 arg2_(ASIO_MOVE_CAST(Arg2)(arg2))
760 move_binder2(move_binder2&& other)
761 : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
762 arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
763 arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
769 handler_(static_cast<const Arg1&>(arg1_),
770 ASIO_MOVE_CAST(Arg2)(arg2_));
779 template <
typename Handler,
typename Arg1,
typename Arg2>
780 inline asio_handler_allocate_is_deprecated
781 asio_handler_allocate(std::size_t size,
782 move_binder2<Handler, Arg1, Arg2>* this_handler)
784 #if defined(ASIO_NO_DEPRECATED) 785 asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
786 return asio_handler_allocate_is_no_longer_used();
787 #else // defined(ASIO_NO_DEPRECATED) 788 return asio_handler_alloc_helpers::allocate(
789 size, this_handler->handler_);
790 #endif // defined(ASIO_NO_DEPRECATED) 793 template <
typename Handler,
typename Arg1,
typename Arg2>
794 inline asio_handler_deallocate_is_deprecated
795 asio_handler_deallocate(
void* pointer, std::size_t size,
796 move_binder2<Handler, Arg1, Arg2>* this_handler)
798 asio_handler_alloc_helpers::deallocate(
799 pointer, size, this_handler->handler_);
800 #if defined(ASIO_NO_DEPRECATED) 801 return asio_handler_deallocate_is_no_longer_used();
802 #endif // defined(ASIO_NO_DEPRECATED) 805 template <
typename Handler,
typename Arg1,
typename Arg2>
806 inline bool asio_handler_is_continuation(
807 move_binder2<Handler, Arg1, Arg2>* this_handler)
809 return asio_handler_cont_helpers::is_continuation(
810 this_handler->handler_);
813 template <
typename Function,
typename Handler,
typename Arg1,
typename Arg2>
814 inline asio_handler_invoke_is_deprecated
816 move_binder2<Handler, Arg1, Arg2>* this_handler)
818 asio_handler_invoke_helpers::invoke(
819 ASIO_MOVE_CAST(Function)(
function), this_handler->handler_);
820 #if defined(ASIO_NO_DEPRECATED) 821 return asio_handler_invoke_is_no_longer_used();
822 #endif // defined(ASIO_NO_DEPRECATED) 825 #endif // defined(ASIO_HAS_MOVE) 829 template <
typename Handler,
typename Arg1,
typename Allocator>
835 const Allocator& a = Allocator()) ASIO_NOEXCEPT
841 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Allocator>
847 const Allocator& a = Allocator()) ASIO_NOEXCEPT
853 template <
typename Handler,
typename Arg1,
typename Executor>
857 typedef typename associated_executor<Handler, Executor>::type type;
860 const Executor& ex = Executor()) ASIO_NOEXCEPT
866 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Executor>
870 typedef typename associated_executor<Handler, Executor>::type type;
873 const Executor& ex = Executor()) ASIO_NOEXCEPT
879 #if defined(ASIO_HAS_MOVE) 881 template <
typename Handler,
typename Arg1,
typename Allocator>
886 static type
get(
const detail::move_binder1<Handler, Arg1>& h,
887 const Allocator& a = Allocator()) ASIO_NOEXCEPT
893 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Allocator>
895 detail::move_binder2<Handler, Arg1, Arg2>, Allocator>
899 static type
get(
const detail::move_binder2<Handler, Arg1, Arg2>& h,
900 const Allocator& a = Allocator()) ASIO_NOEXCEPT
906 template <
typename Handler,
typename Arg1,
typename Executor>
910 typedef typename associated_executor<Handler, Executor>::type type;
912 static type
get(
const detail::move_binder1<Handler, Arg1>& h,
913 const Executor& ex = Executor()) ASIO_NOEXCEPT
919 template <
typename Handler,
typename Arg1,
typename Arg2,
typename Executor>
923 typedef typename associated_executor<Handler, Executor>::type type;
925 static type
get(
const detail::move_binder2<Handler, Arg1, Arg2>& h,
926 const Executor& ex = Executor()) ASIO_NOEXCEPT
932 #endif // defined(ASIO_HAS_MOVE) 936 #include "asio/detail/pop_options.hpp" 938 #endif // ASIO_DETAIL_BIND_HANDLER_HPP asio_handler_invoke_is_deprecated asio_handler_invoke(Function &function,...)
Default handler invocation hook used for non-const function objects.
Definition: handler_invoke_hook.hpp:85
Definition: bind_handler.hpp:531
Definition: bind_handler.hpp:32
Definition: bind_handler.hpp:392
static type get(const T &t, const Allocator &a=Allocator()) ASIO_NOEXCEPT
If T has a nested type allocator_type, returns t.get_allocator().
Definition: associated_allocator.hpp:84
Definition: bind_handler.hpp:263
Traits type used to obtain the allocator associated with an object.
Definition: associated_allocator.hpp:72
Traits type used to obtain the executor associated with an object.
Definition: associated_executor.hpp:76
Definition: associated_executor.hpp:144
detail::associated_allocator_impl< T, Allocator >::type type
If T has a nested type allocator_type, T::allocator_type.
Definition: associated_allocator.hpp:79
Definition: any_io_executor.hpp:28
Definition: bind_handler.hpp:144