Boost logo

Boost Users :

Subject: Re: [Boost-users] Arguments types for object created with boost::bind()
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-06-21 15:19:52


AMDG

On 06/21/2012 05:42 AM, niXman wrote:
> Hello!
>
> I need to get the types list for operator() for result type of boost::bind()
>

You can't. Boost.Bind creates polymorphic
function objects.

> Example:
>
> void func(int, long) {}
> auto o = boost::bind(&func, _1, _2);
> o( ??? ); // what types of arguments?
>

// this is legal
void f();
auto o = boost::bind(&f, _1, _2, _3);
// what are the argument types of o?

// this is also legal:
void g(int, long);
auto o = boost::bind(&g, _1, _1);
// Is the argument type int or long?

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