Re: [boost] [challenge: Dynamic Overloads] [was Dynamic Over…

Top Page

Reply to this message
Author: Marco
Date:  
To: boost
Subject: Re: [boost] [challenge: Dynamic Overloads] [was Dynamic Overloads and was Re: Runtime Dynamic Dispatch Library (0.2)]
On Sun, 07 Oct 2007 10:41:52 +0200, Marco Costalba <mcostalba@???>
wrote:

>
> I would think to fix completely the problem reported by Joel we could
> write instead:
>
> boost::is_convertible<F, boost::function<T> >
>
> But for unknown reasons this fails! All types of function pointers match!
>
> Could someone please be so kind to enlight me?
>
> Thanks
> Marco


Because boost::function has a constructor whose behavior is like this:

template< typename Functor >
function (Functor const& f)

it skips only integral type through enable_if.

So, except integral, everything is convertible to boost::function even
apples.

In order to implement signature deduction I exploits a support utility
used in the implementation of boost::function and a lot of metaprogramming.
Give a glance to detail::function::get_function_tag in function_base.hpp,
in order to learn how to discern between different kind of functors.

Regard,
Marco Cecchetti






-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost