![]() |
Home | Libraries | People | FAQ | More |
BOOST_YAP_USER_UDT_ANY_IF_ELSE
// In header: <boost/yap/user_macros.hpp>
BOOST_YAP_USER_UDT_ANY_IF_ELSE(expr_template, udt_trait)
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
is true. Each parameter is wrapped in a terminal expression.
Example:
Parameters: |
|