//Demonstrate how 3-ary tag::plus expression can be created. #include #include using namespace boost::proto; typedef terminal::type expr_int_type; typedef nary_expr < tag::plus , _ , _ , _ > gram_plus3_type ; typedef nary_expr < tag::plus , expr_int_type , expr_int_type , expr_int_type > expr_plus3_type ; BOOST_MPL_ASSERT((matches)); typedef nary_expr < tag::plus , expr_int_type , expr_int_type > expr_plus2_type ; BOOST_MPL_ASSERT((matches));//fails