Boost C++ 库
...这是世界上最受推崇、设计最精良的 C++ 库项目之一。
— Herb Sutter 和 Andrei Alexandrescu, C++ Coding Standards
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 构建一个表达式节点。
参数 |
|
||
返回 |
|