-----Original Message-----
From: Sohail Somani

arity( _bi::bind_t<R,F,L> ) :- max( arity( e ) ) for each e in L
arity( X ) :- is_placeholder<X>::value

This could be much easier with a bind that uses a fusion tuple as L. :-)

------------

Ok so now the attached version doesn't have the issues which you pointed out. Is there a way (using mpl) to get the max element in a sequence?

------------

Argh, bind(f,1,2) has incomplete type. Will fix later :)

------------

Ok the incomplete type was because there was no specialization of _bi::value<T> which occurs when the user actually supplies a value. Does this solve the problem then?