Headers
A callable type that evaluates its contained expression when called.See Also:make_expression_function() Expr decltype(auto)U &&... decltype(auto)Expr &&"Dereferences" a reference-expression, forwarding its referent to the caller. decltype(auto)T &&Forwards the sole element of x to the caller, possibly calling deref() first if x is a reference expression, or forwards x to the caller unchanged.More formally: If x is not an expression, x is forwarded to the caller. Otherwise, if x is a reference expression, the result is value(deref(x)). Otherwise, if x is an expression with only one value (a unary expression or a terminal expression), the result is the forwarded first element of x. Otherwise, x is forwarded to the caller. decltype(auto)Expr &&I const &Forwards the i-th element of expr to the caller. If expr is a reference expression, the result is get(deref(expr), i).get() is only valid if Expr is an expression. decltype(auto)Expr &&Returns get(expr, boost::hana::llong_c<I>). decltype(auto)Expr &&Returns the left operand in a binary operator expression.Equivalent to get(expr, 0_c).left() is only valid if Expr is a binary operator expression. decltype(auto)Expr &&Returns the right operand in a binary operator expression.Equivalent to get(expr, 1_c).right() is only valid if Expr is a binary operator expression. decltype(auto)Expr &&Returns the condition expression in an if_else expression.Equivalent to get(expr, 0_c).cond() is only valid if Expr is an expr_kind::if_else expression. decltype(auto)Expr &&Returns the then-expression in an if_else expression.Equivalent to get(expr, 1_c).then() is only valid if Expr is an expr_kind::if_else expression. decltype(auto)Expr &&Returns the else-expression in an if_else expression.Equivalent to get(expr, 2_c).else_() is only valid if Expr is an expr_kind::if_else expression. decltype(auto)Expr &&Returns the callable in a call expression.Equivalent to get(expr, 0).callable() is only valid if Expr is an expr_kind::call expression. decltype(auto)Expr &&hana::llong< I >Returns the i-th argument expression in a call expression.Equivalent to get(expr, i + 1).argument() is only valid if Expr is an expr_kind::call expression. autoT &&...Makes a new expression instantiated from the expression template ExprTemplate, of kind Kind, with the given values as its elements.For each parameter P: If P is an expression, P is moved into the result if P is an rvalue and captured by reference into the result otherwise. Otherwise, P is wrapped in a terminal expression. make_expression() is only valid if the number of parameters passed is appropriate for Kind. autoT &&Makes a new terminal expression instantiated from the expression template ExprTemplate, with the given value as its sole element.make_terminal() is only valid if T is not an expression. decltype(auto)T &&Returns an expression formed from t as follows: If t is an expression, t is forwarded to the caller. Otherwise, t is wrapped in a terminal expression. autoExpr &&Returns a callable object that expr has been forwarded into. This is useful for using expressions as function objects.Lvalue expressions are stored in the result by reference; rvalue expressions are moved into the result.make_expression_function() is only valid if Expr is an expression. autoT &&...Returns a transform object that replaces placeholders within an expression with the given values. decltype(auto)Expr &&T &&...Returns expr with the placeholders replaced by YAP terminals containing the given values.replace_placeholders(expr, t...) is only valid if expr is an expression, and max_p <= sizeof...(t), where max_p is the maximum placeholder index in expr. autoT &&...Returns a transform object that evaluates an expression using the built-in semantics. The transform replaces any placeholders with the given values. decltype(auto)Expr &&T &&...Evaluates expr using the built-in semantics, replacing any placeholders with the given values.evaluate(expr) is only valid if expr is an expression. decltype(auto) constexprExpr &&Transform &&Transforms &&...Returns the result of transforming (all or part of) expr using whatever overloads of Transform::operator() match expr.Transformations can do anything: they may have side effects; they may mutate values; they may mutate types; and they may do any combination of these. decltype(auto)Expr &&Transform &&Transforms &&...Returns the result of transforming expr using whichever overload of Transform::operator() best matches expr. If no overload of Transform::operator() matches, a compile-time error results.Transformations can do anything: they may have side effects; they may mutate values; they may mutate types; and they may do any combination of these.
Used as the tag-type passed to a transform function written in the tag-transform form. const expr_kind A metafunction that evaluates to std::true_type if Expr is an Expression, and std::false_type otherwise. Used as the expression template returned by some operations inside YAP when YAP does not have an expression template it was told to use. For instance, if transform() creates a new expression by transforming an existing expression's elements, it will attempt to create the new expression using the existing one's expression template. If no such template exists because the existing expression was not made from an expression template, minimal_expr is used. expr_kind const Tuple hana::llong< I >The type used to represent the index of a placeholder terminal. constexpr autoCreates literal placeholders. Placeholder indices are 1-based. = 0A (possibly const) reference to another expression. = 1A terminal expression. = 2+ = 3- = 4* = 5~ = 6& = 7! = 8++ = 9-- = 10++(int) = 11--(int) = 12<< = 13>> = 14* = 15/ = 16% = 17+ = 18- = 19< = 20> = 21<= = 22>= = 23== = 24!= = 25|| = 26&& = 27& = 28| = 29^ = 30, = 31->* = 32= = 33<<= = 34>>= = 35*= = 36/= = 37%= = 38+= = 39-= = 40&= = 41|= = 42^= = 43[] = 44Analogous to ?: . = 45() The enumeration representing all the kinds of expressions supported in YAP. A convenience alias for a terminal expression holding a T, instantiated from expression template expr_template. expr_template< expr_kind::terminal, hana::tuple< T > > A convenience alias for a reference expression holding an expression T, instantiated from expression template expr_template. expr_template< expr_kind::expr_ref, hana::tuple< std::remove_reference_t< T > * > >
Indicates whether the compiler supports constexpr if.If the user does not define any value for this, we assume that the compiler does not have the necessary support. Note that this is a temporary hack; this should eventually be a Boost-wide macro.
Reference expression template that provides all operator overloads.Due to a limitation of Doxygen, each of the value(), left(), right(), and operator overloads listed here is a stand-in for three member functions. For each function f, the listing here is: return_type f (); However, there are actually three functions: return_type f () const &; return_type f () &; return_type f () &&; Tuple const expr_kind tuple_type decltype(auto) constexprA convenience member function that dispatches to the free function value(). decltype(auto) constexprA convenience member function that dispatches to the free function left(). decltype(auto) constexprA convenience member function that dispatches to the free function right(). Default constructor. Does nothing. tuple_type &&Moves rhs into the only data mamber, elements. expr_kind::terminalhana::tuple< T >Terminal expression specialization of the reference expression template.Due to a limitation of Doxygen, the value() member and each of the operator overloads listed here is a stand-in for three member functions. For each function f, the listing here is:return_type f (); However, there are actually three functions: return_type f () const &; return_type f () &; return_type f () &&; hana::tuple< T > const expr_kind tuple_type decltype(auto) constexprA convenience member function that dispatches to the free function value(). Default constructor. Does nothing. T &&Forwards t into elements. hana::tuple< T > const &Copies rhs into the only data mamber, elements. hana::tuple< T > &&Moves rhs into the only data mamber, elements. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&See Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&intSee Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoExpr &&intSee Also:BOOST_YAP_USER_UNARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoLExpr &&RExpr &&See Also:BOOST_YAP_USER_BINARY_OPERATOR for full semantics. constexpr autoExpr1 &&Expr2 &&Expr3 &&See Also:BOOST_YAP_USER_EXPR_IF_ELSE for full semantics. constexpr autoT &&...Returns make_expression<boost::yap::expression, Kind>(...). constexpr autoT &&Returns make_terminal<boost::yap::expression>(t). decltype(auto) constexprT &&Returns as_expr<boost::yap::expression>(t).
char const *expr_kindReturns the char const * string for the spelling of the C++ operator associated with kind. It returns the special values "ref" and "term" for the non-operator kinds expr_kind::expr_ref amd expr_kind::terminal, respectively. std::ostream &std::ostream &Expr const &Prints expression expr to stream os. Returns os.
The operator to be overloaded; this must be one of the unary enumerators in expr_kind, without the expr_kind:: qualification.The expression template to which the overloads apply. expr_template must be an ExpressionTemplate.The expression template to use to instantiate the result expression. result_expr_template must be an ExpressionTemplate. Defines operator overloads for unary operator op_name that each take an expression instantiated from expr_template and return an expression instantiated from the result_expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, the argument is captured by reference into the resulting expression. For the rvalue reference overload, the argument is moved into the resulting expression.Example: The operator to be overloaded; this must be one of the binary enumerators in expr_kind, except assign, subscript, or call, without the expr_kind:: qualification.The expression template to which the overloads apply. expr_template must be an ExpressionTemplate.The expression template to use to instantiate the result expression. result_expr_template must be an ExpressionTemplate. Defines operator overloads for binary operator op_name that each produce an expression instantiated from the expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, *this is captured by reference into the resulting expression. For the rvalue reference overload, *this is moved into the resulting expression.Note that this does not work for yap::expr_kinds assign, subscript, or call. Use BOOST_YAP_USER_ASSIGN_OPERATOR, BOOST_YAP_USER_SUBSCRIPT_OPERATOR, or BOOST_YAP_USER_CALL_OPERATOR for those, respectively.Example: The type of the class the operator is a member of; this is required to avoid clashing with the assignment and move assignement operators.The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate. Defines operator overloads for operator=() that each produce an expression instantiated from the expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, *this is captured by reference into the resulting expression. For the rvalue reference overload, *this is moved into the resulting expression.The rhs parameter to each of the defined overloads may be any type, including an expression, except that the overloads are constrained by std::enable_if<> not to conflict with the assignment and move assignement operators. If rhs is a non-expression, it is wrapped in a terminal expression.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate. Defines operator overloads for operator[]() that each produce an expression instantiated from the expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, *this is captured by reference into the resulting expression. For the rvalue reference overload, *this is moved into the resulting expression.The rhs parameter to each of the defined overloads may be any type, including an expression, except that the overloads are constrained by std::enable_if<> not to conflict with the assignment and move assignement operators. If rhs is a non-expression, it is wrapped in a terminal expression.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate. Defines operator overloads for the call operator taking any number of parameters ("operator()") that each produce an expression instantiated from the expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, *this is captured by reference into the resulting expression. For the rvalue reference overload, *this is moved into the resulting expression.The u parameters to each of the defined overloads may be any type, including an expression. Each non-expression is wrapped in a terminal expression.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate.The number of parameters accepted by the operator() overloads. n must be <= BOOST_PP_LIMIT_REPEAT. Defines operator overloads for the call operator taking N parameters ("operator()(t0, t1, ... tn-1)") that each produce an expression instantiated from the expr_template expression template. One overload is defined for each of the qualifiers const &, &, and &&. For the lvalue reference overloads, *this is captured by reference into the resulting expression. For the rvalue reference overload, *this is moved into the resulting expression.The u parameters to each of the defined overloads may be any type, including an expression. Each non-expression is wrapped in a terminal expression.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate. Defines a 3-parameter function if_else() that acts as an analogue to the ternary operator (?:), since the ternary operator is not user-overloadable. The return type of if_else() is an expression instantiated from the expr_template expression template.At least one parameter to if_else() must be an expression.For each parameter E passed to if_else(), if E is an rvalue, E is moved into the result, and otherwise E is captured by reference into the result.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate.A trait template to use to constrain which types are accepted as template parameters to if_else(). Defines a function if_else() that acts as an analogue to the ternary operator (?:), since the ternary operator is not user-overloadable. The return type of if_else() is an expression instantiated from the expr_template expression template.Each parameter to if_else() may be any type that is not an expression. At least on parameter must be a type T for which udt_trait<std::remove_cv_t<std::remove_reference_t<T>>>::value is true. Each parameter is wrapped in a terminal expression.Example: The operator to be overloaded; this must be one of the unary enumerators in expr_kind, without the expr_kind:: qualification.The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate.A trait template to use to constrain which types are accepted as template parameters to the defined operator overload. Defines a free/non-member operator overload for unary operator op_name that produces an expression instantiated from the expr_template expression template.The parameter to the defined operator overload may be any type that is not an expression and for whichudt_trait<std::remove_cv_t<std::remove_reference_t<T>>>::value is true. The parameter is wrapped in a terminal expression.Example: The operator to be overloaded; this must be one of the binary enumerators in expr_kind, without the expr_kind:: qualification.The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate.A trait template to use to constrain which types are accepted as T template parameters to the defined operator overload.A trait template to use to constrain which types are accepted as U template parameters to the defined operator overload. Defines a free/non-member operator overload for binary operator op_name that produces an expression instantiated from the expr_template expression template.The lhs parameter to the defined operator overload may be any type that is not an expression and for whicht_udt_trait<std::remove_cv_t<std::remove_reference_t<T>>>::value is true. The parameter is wrapped in a terminal expression.The rhs parameter to the defined operator overload may be any type that is not an expression and for whichu_udt_trait<std::remove_cv_t<std::remove_reference_t<U>>>::value is true. The parameter is wrapped in a terminal expression.Example: The operator to be overloaded; this must be one of the binary enumerators in expr_kind, without the expr_kind:: qualification.The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate.A trait template to use to constrain which types are accepted as template parameters to the defined operator overload. Defines a free/non-member operator overload for binary operator op_name that produces an expression instantiated from the expr_template expression template.The lhs and rhs parameters to the defined operator overload may be any types that are not expressions. Each parameter is wrapped in a terminal expression.At least one of the parameters to the defined operator overload must be a type T for whichudt_trait<std::remove_cv_t<std::remove_reference_t<T>>>::value is true.Example: The expression template to use to instantiate the result expression. expr_template must be an ExpressionTemplate. Defines user defined literal template that creates literal placeholders instantiated from the expr_template expression template. It is recommended that you put this in its own namespace.