[function_types] comparing arity

I'm trying to come up with the condition for an enable_if condition based on the function_arity of a signature. The following fails to compile: bool z = boost::mpl::equal_to < boost::function_types::function_arity<SIG>::value , boost::mpl::int_<3>
;
Any help is appreciated. Thanks, Jeff

Jeff Flinn wrote:
I'm trying to come up with the condition for an enable_if condition based on the function_arity of a signature. The following fails to compile:
bool z = boost::mpl::equal_to < boost::function_types::function_arity<SIG>::value , boost::mpl::int_<3>
;
Ok this compiles: bool z = boost::mpl::equal_to < typename boost::function_types::function_arity<SIG>::type , boost::mpl::int_<3>
::value;
But when used in the following fails to compile: typename enable_if < typename boost::mpl::equal_to < typename boost::function_types::function_arity<SIG>::type , boost::mpl::int_<3>
::type , typename boost::function_types::result_type<SIG>::type ::type
Again, help is appreciated. Thanks Jeff

Jeff Flinn wrote:
Jeff Flinn wrote:
I'm trying to come up with the condition for an enable_if condition based on the function_arity of a signature. The following fails to compile:
bool z = boost::mpl::equal_to < boost::function_types::function_arity<SIG>::value , boost::mpl::int_<3>
;
Ok this compiles:
bool z = boost::mpl::equal_to < typename boost::function_types::function_arity<SIG>::type , boost::mpl::int_<3>
::value;
But when used in the following fails to compile:
typename enable_if
Doh! typename boost::enable_if
< typename boost::mpl::equal_to < typename boost::function_types::function_arity<SIG>::type , boost::mpl::int_<3>
::type , typename boost::function_types::result_type<SIG>::type ::type
Compiles, links and runs. Time for the bar! Sorry for the noise. Jeff
participants (1)
-
Jeff Flinn