Boost logo

Boost Users :

Subject: Re: [Boost-users] [function_traits] How to detect function arity for functors with member template?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-28 14:50:20


AMDG

jesseperla wrote:
> I am interested in tag dispatching in a generic function depending on
> whether the passed in argument is arity 1 or 2.
>
> My problem is that I want to have a generic expectation operator that
> is passed in a function to take the expectation over, and a
> distribution for the integration. The expectation needs to support
> both real and mixed-integer measures and functions. Consider the
> following functions it should work with:
> <snip>
>
> ------------------------------------------------------
> I looked at boost function_traits but it doesn't work with member
> functors....
> http://www.boost.org/doc/libs/1_39_0/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html
>
> Any ideas on how best to implement this?
>

http://tinyurl.com/ktscp3

In Christ,
Steven Watanabe


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