📄 traits.hpp
字号:
typedef proto::expr<proto::tag::dereference, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<dereference>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, dereference\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<dereference\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<dereference>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::dereference proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating complement expression types, /// a grammar element for matching complement expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct complement { typedef proto::expr<proto::tag::complement, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<complement>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, complement\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<complement\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<complement>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::complement proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating address_of expression types, /// a grammar element for matching address_of expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct address_of { typedef proto::expr<proto::tag::address_of, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<address_of>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, address_of\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<address_of\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<address_of>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::address_of proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating logical_not expression types, /// a grammar element for matching logical_not expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct logical_not { typedef proto::expr<proto::tag::logical_not, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<logical_not>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, logical_not\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<logical_not\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<logical_not>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::logical_not proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating pre-increment expression types, /// a grammar element for matching pre-increment expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct pre_inc { typedef proto::expr<proto::tag::pre_inc, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<pre_inc>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, pre_inc\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<pre_inc\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<pre_inc>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::pre_inc proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating pre-decrement expression types, /// a grammar element for matching pre-decrement expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct pre_dec { typedef proto::expr<proto::tag::pre_dec, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<pre_dec>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, pre_dec\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<pre_dec\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<pre_dec>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::pre_dec proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating post-increment expression types, /// a grammar element for matching post-increment expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct post_inc { typedef proto::expr<proto::tag::post_inc, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<post_inc>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, post_inc\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<post_inc\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<post_inc>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::post_inc proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating post-decrement expression types, /// a grammar element for matching post-decrement expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T> struct post_dec { typedef proto::expr<proto::tag::post_dec, args1<T> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<post_dec>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor /// \pre <tt>matches\<Expr, post_dec\<T\> \>::::value</tt> is \c true. /// \return <tt>pass_through\<post_dec\<T\> \>()(expr, state, visitor)</tt> template<typename Expr, typename State, typename Visitor> typename result<void(Expr, State, Visitor)>::type operator ()(Expr const &expr, State const &state, Visitor &visitor) const { return pass_through<post_dec>()(expr, state, visitor); } /// INTERNAL ONLY typedef proto::tag::post_dec proto_tag; /// INTERNAL ONLY typedef T proto_arg0; }; /// \brief A metafunction for generating left-shift expression types, /// a grammar element for matching left-shift expressions, and a /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt> /// transform. template<typename T, typename U> struct shift_left { typedef proto::expr<proto::tag::shift_left, args2<T, U> > type; typedef type proto_base_expr; template<typename Sig> struct result { typedef typename pass_through<shift_left>::template result<Sig>::type type; }; /// \param expr The current expression /// \param state The current state /// \param visitor An arbitrary visitor
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -