Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Functional.OverloadedFunction][C++03] Number of overloads in boost::overload_function<...>
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2012-10-18 23:54:10


Hello,

Sorry, I didn't have much time to write this email sooner.

On Fri, Oct 19, 2012 at 12:42 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> On 10/17/2012 07:50 AM, Lorenzo Caminiti wrote:
>> On Wed, Oct 17, 2012 at 4:24 AM, Felipe Magno de Almeida
>> <felipe.m.almeida_at_[hidden]> wrote:
>>> That's a bit restricting. I could really use a overloaded_function
>>> that received a MPL or Fusion
>>> sequence as well.
>>
>> Why do you need to use MPL and Fusion sequences? What's the use case?
>
> This would happen if the overloads are computed
> by metaprogramming instead of being hard-coded
> into the source.

Yes. That's exactly the case. I'm writing a Java Binding library, and
all I need to pass at runtime is three variables to create an overload
set that is mapped to functions in Java. And at compile time I need
to specify all the function overloads. Since it is not necessary, I
don't want the user to create all function objects seperately, since
their constructions are all the same. I need to pass just a sequence
of function prototypes and the three variables I mentioned and I can
just return a boost.overloadedfunction constructed by metaprogramming.

[snip]

> In Christ,
> Steven Watanabe

Regards,

-- 
Felipe Magno de Almeida

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net