boost::proto::vararg — 用于将语法匹配到可变数量的子表达式。
// In header: <boost/proto/matches.hpp> template<typename Grammar> struct vararg { };
表达式类型 proto::basic_expr<AT, proto::listN<A0,...An,U0,...Um> > 匹配语法 proto::basic_expr<BT, proto::listM<B0,...Bn,proto::vararg<V> > >,如果 BT 是 proto::_ 或 AT, 并且如果对于 [0,n] 中的每个 x,Ax 匹配 Bx, 并且如果对于 [0,m] 中的每个 x,Ux 匹配 V。
例如
// Match any function call expression, regardless // of the number of function arguments: struct Function : proto::function< proto::vararg<proto::_> > {};
当用作转换时,proto::vararg<G> 应用 G 的转换。