> The error occurs on the line with the boost static constant.

Never mind that, I changed the code after I wrote the message.

Here's the code in hopefully better formatting.

template < size_t LhsIndex, size_t RhsIndex, int Sign >
struct signature
{
    typedef mpl::size_t< LhsIndex > lhs_index;
    typedef mpl::size_t< RhsIndex > rhs_index;
    typedef mpl::int_< Sign > type;
};


template < class Signature, class LhsIndex, class RhsIndex >
struct predicate
{
    typedef typename mpl::and_<
        typename mpl::equal_to<
            typename Signature::lhs_index, LhsIndex
        >::type,
        typename mpl::equal_to<
            typename Signature::rhs_index, RhsIndex
        >::type
    >::type type;

    BOOST_MPL_AUX_LAMBDA_SUPPORT( 3,
        predicate, (Signature, LhsIndex, RhsIndex) )
};

 // Test code:

 typedef mpl::vector< signature< 1, 1, 1 >,
                                 signature< 4, 4, 0 >,
                                 signature< 5, 5, 0 >,
                                 signature< 4, 5, 1 > > signatures;

 typedef mpl::find_if<
    signatures,
    predicate<
            mpl::_1,
            mpl::size_t< 4 >,
            mpl::size_t< 5 >
        >
    >::type iter_0;




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to