boost::proto::functional::unpack_expr — 一个等同于 proto::unpack_expr()
函数的 PolymorphicFunctionObject。
// In header: <boost/proto/make_expr.hpp> template<typename Tag, typename Domain = proto::deduce_domain> struct unpack_expr : proto::callable { // member classes/structs/unions template<typename This, typename Sequence> struct result<This(Sequence)> : proto::result_of::unpack_expr< Tag, Domain, typename boost::remove_reference< Sequence >::type > { }; // public member functions template<typename Sequence> typename proto::result_of::unpack_expr< Tag, Domain, Sequence const >::type const operator()(Sequence const &) const; };
在所有情况下,proto::functional::unpack_expr<Tag, Domain>()(seq)
等同于 proto::unpack_expr()<Tag, Domain>(seq)
。
proto::functional::unpack_expr<Tag>()(seq)
等同于 proto::unpack_expr()<Tag>(seq)
。
unpack_expr
公有成员函数template<typename Sequence> typename proto::result_of::unpack_expr< Tag, Domain, Sequence const >::type const operator()(Sequence const & sequence) const;
构造一个标签类型为 Tag
并且在 Domain
域中的表达式节点。
参数 |
|
||
返回 |
|