|
Boost Users : |
Subject: Re: [Boost-users] [function_types] comparing arity
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2012-03-02 21:05:10
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
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