11 May
2013
11 May
'13
11:12 a.m.
On 11/05/13 08:52, Arthur Athrun wrote:
Hi, everyone,
I'd like to propose a little modification of boost:: bind to expose more information in boost:: _bi:: bind_t.
Here is my motivation problem. Suppose this is a function which takes boost: :_bi::bind_t as a parameter. But at the same time, I'd like to enumerate all binded parameters and do something for specific types, like the following pseudo code shows.
template< class F> void foo(F & f) { foreach(T& arg, f.arguments()) { if(boost::is_same
::value) //here ID_t is a user specific type //do something for arg. } }
A polymorphic function object does not have a single type for the arguments nor even a single arity.