File indexing completed on 2025-01-18 09:28:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_BIND_HANDLER_HPP
0012 #define BOOST_ASIO_DETAIL_BIND_HANDLER_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/associator.hpp>
0020 #include <boost/asio/detail/handler_cont_helpers.hpp>
0021 #include <boost/asio/detail/type_traits.hpp>
0022
0023 #include <boost/asio/detail/push_options.hpp>
0024
0025 namespace boost {
0026 namespace asio {
0027 namespace detail {
0028
0029 template <typename Handler>
0030 class binder0
0031 {
0032 public:
0033 template <typename T>
0034 binder0(int, T&& handler)
0035 : handler_(static_cast<T&&>(handler))
0036 {
0037 }
0038
0039 binder0(Handler& handler)
0040 : handler_(static_cast<Handler&&>(handler))
0041 {
0042 }
0043
0044 binder0(const binder0& other)
0045 : handler_(other.handler_)
0046 {
0047 }
0048
0049 binder0(binder0&& other)
0050 : handler_(static_cast<Handler&&>(other.handler_))
0051 {
0052 }
0053
0054 void operator()()
0055 {
0056 static_cast<Handler&&>(handler_)();
0057 }
0058
0059 void operator()() const
0060 {
0061 handler_();
0062 }
0063
0064
0065 Handler handler_;
0066 };
0067
0068 template <typename Handler>
0069 inline bool asio_handler_is_continuation(
0070 binder0<Handler>* this_handler)
0071 {
0072 return boost_asio_handler_cont_helpers::is_continuation(
0073 this_handler->handler_);
0074 }
0075
0076 template <typename Handler>
0077 inline binder0<decay_t<Handler>> bind_handler(
0078 Handler&& handler)
0079 {
0080 return binder0<decay_t<Handler>>(
0081 0, static_cast<Handler&&>(handler));
0082 }
0083
0084 template <typename Handler, typename Arg1>
0085 class binder1
0086 {
0087 public:
0088 template <typename T>
0089 binder1(int, T&& handler, const Arg1& arg1)
0090 : handler_(static_cast<T&&>(handler)),
0091 arg1_(arg1)
0092 {
0093 }
0094
0095 binder1(Handler& handler, const Arg1& arg1)
0096 : handler_(static_cast<Handler&&>(handler)),
0097 arg1_(arg1)
0098 {
0099 }
0100
0101 binder1(const binder1& other)
0102 : handler_(other.handler_),
0103 arg1_(other.arg1_)
0104 {
0105 }
0106
0107 binder1(binder1&& other)
0108 : handler_(static_cast<Handler&&>(other.handler_)),
0109 arg1_(static_cast<Arg1&&>(other.arg1_))
0110 {
0111 }
0112
0113 void operator()()
0114 {
0115 static_cast<Handler&&>(handler_)(
0116 static_cast<const Arg1&>(arg1_));
0117 }
0118
0119 void operator()() const
0120 {
0121 handler_(arg1_);
0122 }
0123
0124
0125 Handler handler_;
0126 Arg1 arg1_;
0127 };
0128
0129 template <typename Handler, typename Arg1>
0130 inline bool asio_handler_is_continuation(
0131 binder1<Handler, Arg1>* this_handler)
0132 {
0133 return boost_asio_handler_cont_helpers::is_continuation(
0134 this_handler->handler_);
0135 }
0136
0137 template <typename Handler, typename Arg1>
0138 inline binder1<decay_t<Handler>, Arg1> bind_handler(
0139 Handler&& handler, const Arg1& arg1)
0140 {
0141 return binder1<decay_t<Handler>, Arg1>(0,
0142 static_cast<Handler&&>(handler), arg1);
0143 }
0144
0145 template <typename Handler, typename Arg1, typename Arg2>
0146 class binder2
0147 {
0148 public:
0149 template <typename T>
0150 binder2(int, T&& handler,
0151 const Arg1& arg1, const Arg2& arg2)
0152 : handler_(static_cast<T&&>(handler)),
0153 arg1_(arg1),
0154 arg2_(arg2)
0155 {
0156 }
0157
0158 binder2(Handler& handler, const Arg1& arg1, const Arg2& arg2)
0159 : handler_(static_cast<Handler&&>(handler)),
0160 arg1_(arg1),
0161 arg2_(arg2)
0162 {
0163 }
0164
0165 binder2(const binder2& other)
0166 : handler_(other.handler_),
0167 arg1_(other.arg1_),
0168 arg2_(other.arg2_)
0169 {
0170 }
0171
0172 binder2(binder2&& other)
0173 : handler_(static_cast<Handler&&>(other.handler_)),
0174 arg1_(static_cast<Arg1&&>(other.arg1_)),
0175 arg2_(static_cast<Arg2&&>(other.arg2_))
0176 {
0177 }
0178
0179 void operator()()
0180 {
0181 static_cast<Handler&&>(handler_)(
0182 static_cast<const Arg1&>(arg1_),
0183 static_cast<const Arg2&>(arg2_));
0184 }
0185
0186 void operator()() const
0187 {
0188 handler_(arg1_, arg2_);
0189 }
0190
0191
0192 Handler handler_;
0193 Arg1 arg1_;
0194 Arg2 arg2_;
0195 };
0196
0197 template <typename Handler, typename Arg1, typename Arg2>
0198 inline bool asio_handler_is_continuation(
0199 binder2<Handler, Arg1, Arg2>* this_handler)
0200 {
0201 return boost_asio_handler_cont_helpers::is_continuation(
0202 this_handler->handler_);
0203 }
0204
0205 template <typename Handler, typename Arg1, typename Arg2>
0206 inline binder2<decay_t<Handler>, Arg1, Arg2> bind_handler(
0207 Handler&& handler, const Arg1& arg1, const Arg2& arg2)
0208 {
0209 return binder2<decay_t<Handler>, Arg1, Arg2>(0,
0210 static_cast<Handler&&>(handler), arg1, arg2);
0211 }
0212
0213 template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
0214 class binder3
0215 {
0216 public:
0217 template <typename T>
0218 binder3(int, T&& handler, const Arg1& arg1,
0219 const Arg2& arg2, const Arg3& arg3)
0220 : handler_(static_cast<T&&>(handler)),
0221 arg1_(arg1),
0222 arg2_(arg2),
0223 arg3_(arg3)
0224 {
0225 }
0226
0227 binder3(Handler& handler, const Arg1& arg1,
0228 const Arg2& arg2, const Arg3& arg3)
0229 : handler_(static_cast<Handler&&>(handler)),
0230 arg1_(arg1),
0231 arg2_(arg2),
0232 arg3_(arg3)
0233 {
0234 }
0235
0236 binder3(const binder3& other)
0237 : handler_(other.handler_),
0238 arg1_(other.arg1_),
0239 arg2_(other.arg2_),
0240 arg3_(other.arg3_)
0241 {
0242 }
0243
0244 binder3(binder3&& other)
0245 : handler_(static_cast<Handler&&>(other.handler_)),
0246 arg1_(static_cast<Arg1&&>(other.arg1_)),
0247 arg2_(static_cast<Arg2&&>(other.arg2_)),
0248 arg3_(static_cast<Arg3&&>(other.arg3_))
0249 {
0250 }
0251
0252 void operator()()
0253 {
0254 static_cast<Handler&&>(handler_)(
0255 static_cast<const Arg1&>(arg1_),
0256 static_cast<const Arg2&>(arg2_),
0257 static_cast<const Arg3&>(arg3_));
0258 }
0259
0260 void operator()() const
0261 {
0262 handler_(arg1_, arg2_, arg3_);
0263 }
0264
0265
0266 Handler handler_;
0267 Arg1 arg1_;
0268 Arg2 arg2_;
0269 Arg3 arg3_;
0270 };
0271
0272 template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
0273 inline bool asio_handler_is_continuation(
0274 binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
0275 {
0276 return boost_asio_handler_cont_helpers::is_continuation(
0277 this_handler->handler_);
0278 }
0279
0280 template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
0281 inline binder3<decay_t<Handler>, Arg1, Arg2, Arg3> bind_handler(
0282 Handler&& handler, const Arg1& arg1, const Arg2& arg2,
0283 const Arg3& arg3)
0284 {
0285 return binder3<decay_t<Handler>, Arg1, Arg2, Arg3>(0,
0286 static_cast<Handler&&>(handler), arg1, arg2, arg3);
0287 }
0288
0289 template <typename Handler, typename Arg1,
0290 typename Arg2, typename Arg3, typename Arg4>
0291 class binder4
0292 {
0293 public:
0294 template <typename T>
0295 binder4(int, T&& handler, const Arg1& arg1,
0296 const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
0297 : handler_(static_cast<T&&>(handler)),
0298 arg1_(arg1),
0299 arg2_(arg2),
0300 arg3_(arg3),
0301 arg4_(arg4)
0302 {
0303 }
0304
0305 binder4(Handler& handler, const Arg1& arg1,
0306 const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
0307 : handler_(static_cast<Handler&&>(handler)),
0308 arg1_(arg1),
0309 arg2_(arg2),
0310 arg3_(arg3),
0311 arg4_(arg4)
0312 {
0313 }
0314
0315 binder4(const binder4& other)
0316 : handler_(other.handler_),
0317 arg1_(other.arg1_),
0318 arg2_(other.arg2_),
0319 arg3_(other.arg3_),
0320 arg4_(other.arg4_)
0321 {
0322 }
0323
0324 binder4(binder4&& other)
0325 : handler_(static_cast<Handler&&>(other.handler_)),
0326 arg1_(static_cast<Arg1&&>(other.arg1_)),
0327 arg2_(static_cast<Arg2&&>(other.arg2_)),
0328 arg3_(static_cast<Arg3&&>(other.arg3_)),
0329 arg4_(static_cast<Arg4&&>(other.arg4_))
0330 {
0331 }
0332
0333 void operator()()
0334 {
0335 static_cast<Handler&&>(handler_)(
0336 static_cast<const Arg1&>(arg1_),
0337 static_cast<const Arg2&>(arg2_),
0338 static_cast<const Arg3&>(arg3_),
0339 static_cast<const Arg4&>(arg4_));
0340 }
0341
0342 void operator()() const
0343 {
0344 handler_(arg1_, arg2_, arg3_, arg4_);
0345 }
0346
0347
0348 Handler handler_;
0349 Arg1 arg1_;
0350 Arg2 arg2_;
0351 Arg3 arg3_;
0352 Arg4 arg4_;
0353 };
0354
0355 template <typename Handler, typename Arg1,
0356 typename Arg2, typename Arg3, typename Arg4>
0357 inline bool asio_handler_is_continuation(
0358 binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
0359 {
0360 return boost_asio_handler_cont_helpers::is_continuation(
0361 this_handler->handler_);
0362 }
0363
0364 template <typename Handler, typename Arg1,
0365 typename Arg2, typename Arg3, typename Arg4>
0366 inline binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>
0367 bind_handler(Handler&& handler, const Arg1& arg1,
0368 const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
0369 {
0370 return binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>(0,
0371 static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4);
0372 }
0373
0374 template <typename Handler, typename Arg1, typename Arg2,
0375 typename Arg3, typename Arg4, typename Arg5>
0376 class binder5
0377 {
0378 public:
0379 template <typename T>
0380 binder5(int, T&& handler, const Arg1& arg1,
0381 const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
0382 : handler_(static_cast<T&&>(handler)),
0383 arg1_(arg1),
0384 arg2_(arg2),
0385 arg3_(arg3),
0386 arg4_(arg4),
0387 arg5_(arg5)
0388 {
0389 }
0390
0391 binder5(Handler& handler, const Arg1& arg1, const Arg2& arg2,
0392 const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
0393 : handler_(static_cast<Handler&&>(handler)),
0394 arg1_(arg1),
0395 arg2_(arg2),
0396 arg3_(arg3),
0397 arg4_(arg4),
0398 arg5_(arg5)
0399 {
0400 }
0401
0402 binder5(const binder5& other)
0403 : handler_(other.handler_),
0404 arg1_(other.arg1_),
0405 arg2_(other.arg2_),
0406 arg3_(other.arg3_),
0407 arg4_(other.arg4_),
0408 arg5_(other.arg5_)
0409 {
0410 }
0411
0412 binder5(binder5&& other)
0413 : handler_(static_cast<Handler&&>(other.handler_)),
0414 arg1_(static_cast<Arg1&&>(other.arg1_)),
0415 arg2_(static_cast<Arg2&&>(other.arg2_)),
0416 arg3_(static_cast<Arg3&&>(other.arg3_)),
0417 arg4_(static_cast<Arg4&&>(other.arg4_)),
0418 arg5_(static_cast<Arg5&&>(other.arg5_))
0419 {
0420 }
0421
0422 void operator()()
0423 {
0424 static_cast<Handler&&>(handler_)(
0425 static_cast<const Arg1&>(arg1_),
0426 static_cast<const Arg2&>(arg2_),
0427 static_cast<const Arg3&>(arg3_),
0428 static_cast<const Arg4&>(arg4_),
0429 static_cast<const Arg5&>(arg5_));
0430 }
0431
0432 void operator()() const
0433 {
0434 handler_(arg1_, arg2_, arg3_, arg4_, arg5_);
0435 }
0436
0437
0438 Handler handler_;
0439 Arg1 arg1_;
0440 Arg2 arg2_;
0441 Arg3 arg3_;
0442 Arg4 arg4_;
0443 Arg5 arg5_;
0444 };
0445
0446 template <typename Handler, typename Arg1, typename Arg2,
0447 typename Arg3, typename Arg4, typename Arg5>
0448 inline bool asio_handler_is_continuation(
0449 binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
0450 {
0451 return boost_asio_handler_cont_helpers::is_continuation(
0452 this_handler->handler_);
0453 }
0454
0455 template <typename Handler, typename Arg1, typename Arg2,
0456 typename Arg3, typename Arg4, typename Arg5>
0457 inline binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>
0458 bind_handler(Handler&& handler, const Arg1& arg1,
0459 const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
0460 {
0461 return binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
0462 static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4, arg5);
0463 }
0464
0465 template <typename Handler, typename Arg1>
0466 class move_binder1
0467 {
0468 public:
0469 move_binder1(int, Handler&& handler,
0470 Arg1&& arg1)
0471 : handler_(static_cast<Handler&&>(handler)),
0472 arg1_(static_cast<Arg1&&>(arg1))
0473 {
0474 }
0475
0476 move_binder1(move_binder1&& other)
0477 : handler_(static_cast<Handler&&>(other.handler_)),
0478 arg1_(static_cast<Arg1&&>(other.arg1_))
0479 {
0480 }
0481
0482 void operator()()
0483 {
0484 static_cast<Handler&&>(handler_)(
0485 static_cast<Arg1&&>(arg1_));
0486 }
0487
0488
0489 Handler handler_;
0490 Arg1 arg1_;
0491 };
0492
0493 template <typename Handler, typename Arg1>
0494 inline bool asio_handler_is_continuation(
0495 move_binder1<Handler, Arg1>* this_handler)
0496 {
0497 return boost_asio_handler_cont_helpers::is_continuation(
0498 this_handler->handler_);
0499 }
0500
0501 template <typename Handler, typename Arg1, typename Arg2>
0502 class move_binder2
0503 {
0504 public:
0505 move_binder2(int, Handler&& handler,
0506 const Arg1& arg1, Arg2&& arg2)
0507 : handler_(static_cast<Handler&&>(handler)),
0508 arg1_(arg1),
0509 arg2_(static_cast<Arg2&&>(arg2))
0510 {
0511 }
0512
0513 move_binder2(move_binder2&& other)
0514 : handler_(static_cast<Handler&&>(other.handler_)),
0515 arg1_(static_cast<Arg1&&>(other.arg1_)),
0516 arg2_(static_cast<Arg2&&>(other.arg2_))
0517 {
0518 }
0519
0520 void operator()()
0521 {
0522 static_cast<Handler&&>(handler_)(
0523 static_cast<const Arg1&>(arg1_),
0524 static_cast<Arg2&&>(arg2_));
0525 }
0526
0527
0528 Handler handler_;
0529 Arg1 arg1_;
0530 Arg2 arg2_;
0531 };
0532
0533 template <typename Handler, typename Arg1, typename Arg2>
0534 inline bool asio_handler_is_continuation(
0535 move_binder2<Handler, Arg1, Arg2>* this_handler)
0536 {
0537 return boost_asio_handler_cont_helpers::is_continuation(
0538 this_handler->handler_);
0539 }
0540
0541 }
0542
0543 template <template <typename, typename> class Associator,
0544 typename Handler, typename DefaultCandidate>
0545 struct associator<Associator,
0546 detail::binder0<Handler>, DefaultCandidate>
0547 : Associator<Handler, DefaultCandidate>
0548 {
0549 static typename Associator<Handler, DefaultCandidate>::type get(
0550 const detail::binder0<Handler>& h) noexcept
0551 {
0552 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0553 }
0554
0555 static auto get(const detail::binder0<Handler>& h,
0556 const DefaultCandidate& c) noexcept
0557 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0558 {
0559 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0560 }
0561 };
0562
0563 template <template <typename, typename> class Associator,
0564 typename Handler, typename Arg1, typename DefaultCandidate>
0565 struct associator<Associator,
0566 detail::binder1<Handler, Arg1>, DefaultCandidate>
0567 : Associator<Handler, DefaultCandidate>
0568 {
0569 static typename Associator<Handler, DefaultCandidate>::type get(
0570 const detail::binder1<Handler, Arg1>& h) noexcept
0571 {
0572 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0573 }
0574
0575 static auto get(const detail::binder1<Handler, Arg1>& h,
0576 const DefaultCandidate& c) noexcept
0577 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0578 {
0579 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0580 }
0581 };
0582
0583 template <template <typename, typename> class Associator,
0584 typename Handler, typename Arg1, typename Arg2,
0585 typename DefaultCandidate>
0586 struct associator<Associator,
0587 detail::binder2<Handler, Arg1, Arg2>, DefaultCandidate>
0588 : Associator<Handler, DefaultCandidate>
0589 {
0590 static typename Associator<Handler, DefaultCandidate>::type get(
0591 const detail::binder2<Handler, Arg1, Arg2>& h) noexcept
0592 {
0593 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0594 }
0595
0596 static auto get(const detail::binder2<Handler, Arg1, Arg2>& h,
0597 const DefaultCandidate& c) noexcept
0598 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0599 {
0600 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0601 }
0602 };
0603
0604 template <template <typename, typename> class Associator,
0605 typename Handler, typename Arg1, typename Arg2, typename Arg3,
0606 typename DefaultCandidate>
0607 struct associator<Associator,
0608 detail::binder3<Handler, Arg1, Arg2, Arg3>, DefaultCandidate>
0609 : Associator<Handler, DefaultCandidate>
0610 {
0611 static typename Associator<Handler, DefaultCandidate>::type get(
0612 const detail::binder3<Handler, Arg1, Arg2, Arg3>& h) noexcept
0613 {
0614 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0615 }
0616
0617 static auto get(const detail::binder3<Handler, Arg1, Arg2, Arg3>& h,
0618 const DefaultCandidate& c) noexcept
0619 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0620 {
0621 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0622 }
0623 };
0624
0625 template <template <typename, typename> class Associator,
0626 typename Handler, typename Arg1, typename Arg2, typename Arg3,
0627 typename Arg4, typename DefaultCandidate>
0628 struct associator<Associator,
0629 detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>, DefaultCandidate>
0630 : Associator<Handler, DefaultCandidate>
0631 {
0632 static typename Associator<Handler, DefaultCandidate>::type get(
0633 const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h) noexcept
0634 {
0635 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0636 }
0637
0638 static auto get(const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h,
0639 const DefaultCandidate& c) noexcept
0640 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0641 {
0642 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0643 }
0644 };
0645
0646 template <template <typename, typename> class Associator,
0647 typename Handler, typename Arg1, typename Arg2, typename Arg3,
0648 typename Arg4, typename Arg5, typename DefaultCandidate>
0649 struct associator<Associator,
0650 detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>, DefaultCandidate>
0651 : Associator<Handler, DefaultCandidate>
0652 {
0653 static typename Associator<Handler, DefaultCandidate>::type get(
0654 const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h) noexcept
0655 {
0656 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0657 }
0658
0659 static auto get(
0660 const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h,
0661 const DefaultCandidate& c) noexcept
0662 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0663 {
0664 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0665 }
0666 };
0667
0668 template <template <typename, typename> class Associator,
0669 typename Handler, typename Arg1, typename DefaultCandidate>
0670 struct associator<Associator,
0671 detail::move_binder1<Handler, Arg1>, DefaultCandidate>
0672 : Associator<Handler, DefaultCandidate>
0673 {
0674 static typename Associator<Handler, DefaultCandidate>::type get(
0675 const detail::move_binder1<Handler, Arg1>& h) noexcept
0676 {
0677 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0678 }
0679
0680 static auto get(const detail::move_binder1<Handler, Arg1>& h,
0681 const DefaultCandidate& c) noexcept
0682 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0683 {
0684 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0685 }
0686 };
0687
0688 template <template <typename, typename> class Associator,
0689 typename Handler, typename Arg1, typename Arg2, typename DefaultCandidate>
0690 struct associator<Associator,
0691 detail::move_binder2<Handler, Arg1, Arg2>, DefaultCandidate>
0692 : Associator<Handler, DefaultCandidate>
0693 {
0694 static typename Associator<Handler, DefaultCandidate>::type get(
0695 const detail::move_binder2<Handler, Arg1, Arg2>& h) noexcept
0696 {
0697 return Associator<Handler, DefaultCandidate>::get(h.handler_);
0698 }
0699
0700 static auto get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
0701 const DefaultCandidate& c) noexcept
0702 -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
0703 {
0704 return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
0705 }
0706 };
0707
0708 }
0709 }
0710
0711 #include <boost/asio/detail/pop_options.hpp>
0712
0713 #endif