boost::proto::functional::as_child — 一个可调用的 多态函数对象,等效于 proto::as_child()
函数。
// In header: <boost/proto/traits.hpp> template<typename Domain = proto::default_domain> struct as_child : proto::callable { // member classes/structs/unions template<typename This, typename T> struct result<This(T)> : proto::result_of::as_child< typename remove_reference< T >::type, Domain > { }; // public member functions template<typename T> typename proto::result_of::as_child< T, Domain >::type operator()(T &) const; template<typename T> typename proto::result_of::as_child< T const, Domain >::type operator()(T const &) const; };
as_child
公有成员函数template<typename T> typename proto::result_of::as_child< T, Domain >::type operator()(T & t) const;
如果对象本身不是 Proto 表达式,则将其包装在 Proto 终结符中。
参数 |
|
||
返回 |
|
template<typename T> typename proto::result_of::as_child< T const, Domain >::type operator()(T const & t) const;
这是一个重载的成员函数,为方便起见提供。它仅在接受的参数不同时与上述函数有所区别。