| 638 | |
| 639 | template<typename Functor> |
| 640 | Functor* target() |
| 641 | { |
| 642 | if (!vtable) return 0; |
| 643 | |
| 644 | detail::function::function_buffer type_result; |
| 645 | type_result.type.type = &BOOST_SP_TYPEID(Functor); |
| 646 | type_result.type.const_qualified = is_const<Functor>::value; |
| 647 | type_result.type.volatile_qualified = is_volatile<Functor>::value; |
| 648 | get_vtable()->manager(functor, type_result, |
| 649 | detail::function::check_functor_type_tag); |
| 650 | return static_cast<Functor*>(type_result.obj_ptr); |
| 651 | } |
| 652 | |
| 653 | template<typename Functor> |
| 654 | const Functor* target() const |