yap_reference.xml 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. <?xml version="1.0" standalone="yes"?>
  2. <library-reference id="headers"><title>Headers</title><header name="boost/yap/algorithm.hpp">
  3. <namespace name="boost">
  4. <namespace name="yap">
  5. <struct name="expression_function"><template>
  6. <template-type-parameter name="Expr"/>
  7. </template><description><para>A callable type that evaluates its contained expression when called.</para><para><para><emphasis role="bold">See Also:</emphasis><para><computeroutput>make_expression_function()</computeroutput> </para>
  8. </para>
  9. </para></description><data-member name="expr"><type>Expr</type></data-member>
  10. <method-group name="public member functions">
  11. <method name="operator()"><type>decltype(auto)</type><template>
  12. <template-nontype-parameter name="U"><type>typename...</type></template-nontype-parameter>
  13. </template><parameter name="u"><paramtype>U &amp;&amp;...</paramtype></parameter></method>
  14. </method-group>
  15. </struct>
  16. <function name="deref"><type>decltype(auto)</type><template>
  17. <template-type-parameter name="Expr"/>
  18. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>"Dereferences" a reference-expression, forwarding its referent to the caller. </para></description></function>
  19. <function name="value"><type>decltype(auto)</type><template>
  20. <template-type-parameter name="T"/>
  21. </template><parameter name="x"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Forwards the sole element of <emphasis>x</emphasis> to the caller, possibly calling <computeroutput>deref()</computeroutput> first if <emphasis>x</emphasis> is a reference expression, or forwards <emphasis>x</emphasis> to the caller unchanged.</para><para>More formally:</para><para><itemizedlist>
  22. <listitem><para>If <emphasis>x</emphasis> is not an expression, <emphasis>x</emphasis> is forwarded to the caller.</para>
  23. </listitem><listitem><para>Otherwise, if <emphasis>x</emphasis> is a reference expression, the result is <computeroutput>value(deref(x))</computeroutput>.</para>
  24. </listitem><listitem><para>Otherwise, if <emphasis>x</emphasis> is an expression with only one value (a unary expression or a terminal expression), the result is the forwarded first element of <emphasis>x</emphasis>.</para>
  25. </listitem><listitem><para>Otherwise, <emphasis>x</emphasis> is forwarded to the caller. </para>
  26. </listitem></itemizedlist>
  27. </para></description></function>
  28. <function name="get"><type>decltype(auto)</type><template>
  29. <template-type-parameter name="Expr"/>
  30. <template-type-parameter name="I"/>
  31. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="i"><paramtype>I const &amp;</paramtype></parameter><description><para>Forwards the <emphasis>i</emphasis>-th element of <emphasis>expr</emphasis> to the caller. If <emphasis>expr</emphasis> is a reference expression, the result is <computeroutput>get(deref(expr), i)</computeroutput>.</para><para><note><para><computeroutput>get()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an expression. </para>
  32. </note>
  33. </para></description></function>
  34. <function name="get_c"><type>decltype(auto)</type><template>
  35. <template-nontype-parameter name="I"><type>long long</type></template-nontype-parameter>
  36. <template-type-parameter name="Expr"/>
  37. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns <computeroutput>get(expr, boost::hana::llong_c&lt;I&gt;)</computeroutput>. </para></description></function>
  38. <function name="left"><type>decltype(auto)</type><template>
  39. <template-type-parameter name="Expr"/>
  40. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the left operand in a binary operator expression.</para><para>Equivalent to <computeroutput>get(expr, 0_c)</computeroutput>.</para><para><note><para><computeroutput>left()</computeroutput> is only valid if <emphasis>Expr</emphasis> is a binary operator expression. </para>
  41. </note>
  42. </para></description></function>
  43. <function name="right"><type>decltype(auto)</type><template>
  44. <template-type-parameter name="Expr"/>
  45. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the right operand in a binary operator expression.</para><para>Equivalent to <computeroutput>get(expr, 1_c)</computeroutput>.</para><para><note><para><computeroutput>right()</computeroutput> is only valid if <emphasis>Expr</emphasis> is a binary operator expression. </para>
  46. </note>
  47. </para></description></function>
  48. <function name="cond"><type>decltype(auto)</type><template>
  49. <template-type-parameter name="Expr"/>
  50. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the condition expression in an if_else expression.</para><para>Equivalent to <computeroutput>get(expr, 0_c)</computeroutput>.</para><para><note><para><computeroutput>cond()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an <computeroutput>expr_kind::if_else</computeroutput> expression. </para>
  51. </note>
  52. </para></description></function>
  53. <function name="then"><type>decltype(auto)</type><template>
  54. <template-type-parameter name="Expr"/>
  55. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the then-expression in an if_else expression.</para><para>Equivalent to <computeroutput>get(expr, 1_c)</computeroutput>.</para><para><note><para><computeroutput>then()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an <computeroutput>expr_kind::if_else</computeroutput> expression. </para>
  56. </note>
  57. </para></description></function>
  58. <function name="else_"><type>decltype(auto)</type><template>
  59. <template-type-parameter name="Expr"/>
  60. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the else-expression in an if_else expression.</para><para>Equivalent to <computeroutput>get(expr, 2_c)</computeroutput>.</para><para><note><para><computeroutput>else_()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an <computeroutput>expr_kind::if_else</computeroutput> expression. </para>
  61. </note>
  62. </para></description></function>
  63. <function name="callable"><type>decltype(auto)</type><template>
  64. <template-type-parameter name="Expr"/>
  65. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns the callable in a call expression.</para><para>Equivalent to <computeroutput>get(expr, 0)</computeroutput>.</para><para><note><para><computeroutput>callable()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an <computeroutput>expr_kind::call</computeroutput> expression. </para>
  66. </note>
  67. </para></description></function>
  68. <function name="argument"><type>decltype(auto)</type><template>
  69. <template-nontype-parameter name="I"><type>long long</type></template-nontype-parameter>
  70. <template-type-parameter name="Expr"/>
  71. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="i"><paramtype>hana::llong&lt; I &gt;</paramtype></parameter><description><para>Returns the <emphasis>i-th</emphasis> argument expression in a call expression.</para><para>Equivalent to <computeroutput>get(expr, i + 1)</computeroutput>.</para><para><note><para><computeroutput>argument()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an <computeroutput>expr_kind::call</computeroutput> expression. </para>
  72. </note>
  73. </para></description></function>
  74. <function name="make_expression"><type>auto</type><template>
  75. <template-nontype-parameter name="ExprTemplate"><type>template&lt; expr_kind, class &gt; class</type></template-nontype-parameter>
  76. <template-nontype-parameter name="Kind"><type>expr_kind</type></template-nontype-parameter>
  77. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  78. </template><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Makes a new expression instantiated from the expression template <emphasis>ExprTemplate</emphasis>, of kind <emphasis>Kind</emphasis>, with the given values as its elements.</para><para>For each parameter P:</para><para><itemizedlist>
  79. <listitem><para>If P is an expression, P is moved into the result if P is an rvalue and captured by reference into the result otherwise.</para>
  80. </listitem><listitem><para>Otherwise, P is wrapped in a terminal expression.</para>
  81. </listitem></itemizedlist>
  82. </para><para><note><para><computeroutput>make_expression()</computeroutput> is only valid if the number of parameters passed is appropriate for <emphasis>Kind</emphasis>. </para>
  83. </note>
  84. </para></description></function>
  85. <function name="make_terminal"><type>auto</type><template>
  86. <template-nontype-parameter name="ExprTemplate"><type>template&lt; expr_kind, class &gt; class</type></template-nontype-parameter>
  87. <template-type-parameter name="T"/>
  88. </template><parameter name="t"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Makes a new terminal expression instantiated from the expression template <emphasis>ExprTemplate</emphasis>, with the given value as its sole element.</para><para><note><para><computeroutput>make_terminal()</computeroutput> is only valid if <emphasis>T</emphasis> is <emphasis role="bold">not</emphasis> an expression. </para>
  89. </note>
  90. </para></description></function>
  91. <function name="as_expr"><type>decltype(auto)</type><template>
  92. <template-nontype-parameter name="ExprTemplate"><type>template&lt; expr_kind, class &gt; class</type></template-nontype-parameter>
  93. <template-type-parameter name="T"/>
  94. </template><parameter name="t"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Returns an expression formed from <emphasis>t</emphasis> as follows:</para><para><itemizedlist>
  95. <listitem><para>If <emphasis>t</emphasis> is an expression, <emphasis>t</emphasis> is forwarded to the caller.</para>
  96. </listitem><listitem><para>Otherwise, <emphasis>t</emphasis> is wrapped in a terminal expression. </para>
  97. </listitem></itemizedlist>
  98. </para></description></function>
  99. <function name="make_expression_function"><type>auto</type><template>
  100. <template-type-parameter name="Expr"/>
  101. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para>Returns a callable object that <emphasis>expr</emphasis> has been forwarded into. This is useful for using expressions as function objects.</para><para>Lvalue expressions are stored in the result by reference; rvalue expressions are moved into the result.</para><para><note><para><computeroutput>make_expression_function()</computeroutput> is only valid if <emphasis>Expr</emphasis> is an expression. </para>
  102. </note>
  103. </para></description></function>
  104. <function name="replacements"><type>auto</type><template>
  105. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  106. </template><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Returns a transform object that replaces placeholders within an expression with the given values. </para></description></function>
  107. <function name="replace_placeholders"><type>decltype(auto)</type><template>
  108. <template-type-parameter name="Expr"/>
  109. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  110. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Returns <emphasis>expr</emphasis> with the placeholders replaced by YAP terminals containing the given values.</para><para><note><para><computeroutput>replace_placeholders(expr, t...)</computeroutput> is only valid if <emphasis>expr</emphasis> is an expression, and <computeroutput>max_p &lt;= sizeof...(t)</computeroutput>, where <computeroutput>max_p</computeroutput> is the maximum placeholder index in <emphasis>expr</emphasis>. </para>
  111. </note>
  112. </para></description></function>
  113. <function name="evaluation"><type>auto</type><template>
  114. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  115. </template><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Returns a transform object that evaluates an expression using the built-in semantics. The transform replaces any placeholders with the given values. </para></description></function>
  116. <function name="evaluate"><type>decltype(auto)</type><template>
  117. <template-type-parameter name="Expr"/>
  118. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  119. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Evaluates <emphasis>expr</emphasis> using the built-in semantics, replacing any placeholders with the given values.</para><para><note><para><computeroutput>evaluate(expr)</computeroutput> is only valid if <emphasis>expr</emphasis> is an expression. </para>
  120. </note>
  121. </para></description></function>
  122. <function name="transform"><type>decltype(auto) constexpr</type><template>
  123. <template-type-parameter name="Expr"/>
  124. <template-type-parameter name="Transform"/>
  125. <template-nontype-parameter name="Transforms"><type>typename...</type></template-nontype-parameter>
  126. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="transform"><paramtype>Transform &amp;&amp;</paramtype></parameter><parameter name="transforms"><paramtype>Transforms &amp;&amp;...</paramtype></parameter><description><para>Returns the result of transforming (all or part of) <emphasis>expr</emphasis> using whatever overloads of <computeroutput>Transform::operator()</computeroutput> match <emphasis>expr</emphasis>.</para><para><note><para>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. </para>
  127. </note>
  128. </para></description></function>
  129. <function name="transform_strict"><type>decltype(auto)</type><template>
  130. <template-type-parameter name="Expr"/>
  131. <template-type-parameter name="Transform"/>
  132. <template-nontype-parameter name="Transforms"><type>typename...</type></template-nontype-parameter>
  133. </template><parameter name="expr"><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name="transform"><paramtype>Transform &amp;&amp;</paramtype></parameter><parameter name="transforms"><paramtype>Transforms &amp;&amp;...</paramtype></parameter><description><para>Returns the result of transforming <emphasis>expr</emphasis> using whichever overload of <computeroutput>Transform::operator()</computeroutput> best matches <emphasis>expr</emphasis>. If no overload of <computeroutput>Transform::operator()</computeroutput> matches, a compile-time error results.</para><para><note><para>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. </para>
  134. </note>
  135. </para></description></function>
  136. </namespace>
  137. </namespace>
  138. </header>
  139. <header name="boost/yap/algorithm_fwd.hpp">
  140. <namespace name="boost">
  141. <namespace name="yap">
  142. <struct name="expr_tag"><template>
  143. <template-nontype-parameter name="Kind"><type>expr_kind</type></template-nontype-parameter>
  144. </template><description><para>Used as the tag-type passed to a transform function written in the tag-transform form. </para></description><data-member name="kind" specifiers="static"><type>const expr_kind</type></data-member>
  145. </struct><struct name="is_expr"><template>
  146. <template-type-parameter name="Expr"/>
  147. </template><description><para>A metafunction that evaluates to std::true_type if <emphasis>Expr</emphasis> is an Expression, and std::false_type otherwise. </para></description></struct><struct name="minimal_expr"><template>
  148. <template-nontype-parameter name="Kind"><type>expr_kind</type></template-nontype-parameter>
  149. <template-type-parameter name="Tuple"/>
  150. </template><description><para>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, <classname alt="boost::yap::minimal_expr">minimal_expr</classname> is used. </para></description><data-member name="kind" specifiers="static"><type>expr_kind const</type></data-member>
  151. <data-member name="elements"><type>Tuple</type></data-member>
  152. </struct><struct name="placeholder"><template>
  153. <template-nontype-parameter name="I"><type>long long</type></template-nontype-parameter>
  154. </template><inherit access="public">hana::llong&lt; I &gt;</inherit><description><para>The type used to represent the index of a placeholder terminal. </para></description></struct><namespace name="literals">
  155. <function name="operator&quot;&quot;_p"><type>constexpr auto</type><template>
  156. <template-nontype-parameter name="c"><type>char...</type></template-nontype-parameter>
  157. </template><description><para>Creates literal placeholders. Placeholder indices are 1-based. </para></description></function>
  158. </namespace>
  159. <enum name="expr_kind"><enumvalue name="expr_ref"><default>=
  160. 0</default><purpose>A (possibly <computeroutput>const</computeroutput>) reference to another expression. </purpose></enumvalue><enumvalue name="terminal"><default>= 1</default><purpose>A terminal expression. </purpose></enumvalue><enumvalue name="unary_plus"><default>= 2</default><purpose><computeroutput>+</computeroutput> </purpose></enumvalue><enumvalue name="negate"><default>= 3</default><purpose><computeroutput>-</computeroutput> </purpose></enumvalue><enumvalue name="dereference"><default>= 4</default><purpose><computeroutput>*</computeroutput> </purpose></enumvalue><enumvalue name="complement"><default>= 5</default><purpose><computeroutput>~</computeroutput> </purpose></enumvalue><enumvalue name="address_of"><default>= 6</default><purpose><computeroutput>&amp;</computeroutput> </purpose></enumvalue><enumvalue name="logical_not"><default>= 7</default><purpose><computeroutput>!</computeroutput> </purpose></enumvalue><enumvalue name="pre_inc"><default>= 8</default><purpose><computeroutput>++</computeroutput> </purpose></enumvalue><enumvalue name="pre_dec"><default>= 9</default><purpose><computeroutput>--</computeroutput> </purpose></enumvalue><enumvalue name="post_inc"><default>= 10</default><purpose><computeroutput>++</computeroutput>(int) </purpose></enumvalue><enumvalue name="post_dec"><default>= 11</default><purpose><computeroutput>--</computeroutput>(int) </purpose></enumvalue><enumvalue name="shift_left"><default>= 12</default><purpose><computeroutput>&lt;&lt;</computeroutput> </purpose></enumvalue><enumvalue name="shift_right"><default>= 13</default><purpose><computeroutput>&gt;&gt;</computeroutput> </purpose></enumvalue><enumvalue name="multiplies"><default>= 14</default><purpose><computeroutput>*</computeroutput> </purpose></enumvalue><enumvalue name="divides"><default>= 15</default><purpose><computeroutput>/</computeroutput> </purpose></enumvalue><enumvalue name="modulus"><default>= 16</default><purpose><computeroutput>%</computeroutput> </purpose></enumvalue><enumvalue name="plus"><default>= 17</default><purpose><computeroutput>+</computeroutput> </purpose></enumvalue><enumvalue name="minus"><default>= 18</default><purpose><computeroutput>-</computeroutput> </purpose></enumvalue><enumvalue name="less"><default>= 19</default><purpose><computeroutput>&lt;</computeroutput> </purpose></enumvalue><enumvalue name="greater"><default>= 20</default><purpose><computeroutput>&gt;</computeroutput> </purpose></enumvalue><enumvalue name="less_equal"><default>= 21</default><purpose><computeroutput>&lt;=</computeroutput> </purpose></enumvalue><enumvalue name="greater_equal"><default>= 22</default><purpose><computeroutput>&gt;=</computeroutput> </purpose></enumvalue><enumvalue name="equal_to"><default>= 23</default><purpose><computeroutput>==</computeroutput> </purpose></enumvalue><enumvalue name="not_equal_to"><default>= 24</default><purpose><computeroutput>!=</computeroutput> </purpose></enumvalue><enumvalue name="logical_or"><default>= 25</default><purpose><computeroutput>||</computeroutput> </purpose></enumvalue><enumvalue name="logical_and"><default>= 26</default><purpose><computeroutput>&amp;&amp;</computeroutput> </purpose></enumvalue><enumvalue name="bitwise_and"><default>= 27</default><purpose><computeroutput>&amp;</computeroutput> </purpose></enumvalue><enumvalue name="bitwise_or"><default>= 28</default><purpose><computeroutput/>| </purpose></enumvalue><enumvalue name="bitwise_xor"><default>= 29</default><purpose><computeroutput>^</computeroutput> </purpose></enumvalue><enumvalue name="comma"><default>= 30</default><purpose><computeroutput/>, </purpose></enumvalue><enumvalue name="mem_ptr"><default>= 31</default><purpose><computeroutput>-&gt;*</computeroutput> </purpose></enumvalue><enumvalue name="assign"><default>= 32</default><purpose><computeroutput>=</computeroutput> </purpose></enumvalue><enumvalue name="shift_left_assign"><default>= 33</default><purpose><computeroutput>&lt;&lt;=</computeroutput> </purpose></enumvalue><enumvalue name="shift_right_assign"><default>= 34</default><purpose><computeroutput>&gt;&gt;=</computeroutput> </purpose></enumvalue><enumvalue name="multiplies_assign"><default>= 35</default><purpose><computeroutput>*=</computeroutput> </purpose></enumvalue><enumvalue name="divides_assign"><default>= 36</default><purpose><computeroutput>/=</computeroutput> </purpose></enumvalue><enumvalue name="modulus_assign"><default>= 37</default><purpose><computeroutput>%=</computeroutput> </purpose></enumvalue><enumvalue name="plus_assign"><default>= 38</default><purpose><computeroutput>+=</computeroutput> </purpose></enumvalue><enumvalue name="minus_assign"><default>= 39</default><purpose><computeroutput>-=</computeroutput> </purpose></enumvalue><enumvalue name="bitwise_and_assign"><default>= 40</default><purpose><computeroutput>&amp;=</computeroutput> </purpose></enumvalue><enumvalue name="bitwise_or_assign"><default>= 41</default><purpose><computeroutput/>|= </purpose></enumvalue><enumvalue name="bitwise_xor_assign"><default>= 42</default><purpose><computeroutput>^=</computeroutput> </purpose></enumvalue><enumvalue name="subscript"><default>= 43</default><purpose><computeroutput/>[] </purpose></enumvalue><enumvalue name="if_else"><default>= 44</default><purpose>Analogous to <computeroutput/>?: . </purpose></enumvalue><enumvalue name="call"><default>= 45</default><purpose><computeroutput/>() </purpose></enumvalue><description><para>The enumeration representing all the kinds of expressions supported in YAP. </para></description></enum>
  161. <typedef name="terminal"><description><para>A convenience alias for a terminal expression holding a <emphasis>T</emphasis>, instantiated from expression template <emphasis>expr_template</emphasis>. </para></description><type>expr_template&lt; expr_kind::terminal, hana::tuple&lt; T &gt; &gt;</type></typedef>
  162. <typedef name="expression_ref"><description><para>A convenience alias for a reference expression holding an expression <emphasis>T</emphasis>, instantiated from expression template <emphasis>expr_template</emphasis>. </para></description><type>expr_template&lt; expr_kind::expr_ref, hana::tuple&lt; std::remove_reference_t&lt; T &gt; * &gt; &gt;</type></typedef>
  163. </namespace>
  164. </namespace>
  165. </header>
  166. <header name="boost/yap/config.hpp">
  167. <macro name="BOOST_NO_CONSTEXPR_IF"><description><para>Indicates whether the compiler supports constexpr if.</para><para>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. </para></description></macro>
  168. </header>
  169. <header name="boost/yap/expression.hpp">
  170. <namespace name="boost">
  171. <namespace name="yap">
  172. <struct name="expression"><template>
  173. <template-nontype-parameter name="Kind"><type>expr_kind</type></template-nontype-parameter>
  174. <template-type-parameter name="Tuple"/>
  175. </template><description><para>Reference expression template that provides all operator overloads.</para><para><note><para>Due to a limitation of Doxygen, each of the <computeroutput>value()</computeroutput>, <computeroutput>left()</computeroutput>, <computeroutput>right()</computeroutput>, and operator overloads listed here is a stand-in for three member functions. For each function <computeroutput>f</computeroutput>, the listing here is: <programlisting language="c++">return_type f ();
  176. </programlisting> However, there are actually three functions: <programlisting language="c++">return_type f () const &amp;;
  177. return_type f () &amp;;
  178. return_type f () &amp;&amp;;
  179. </programlisting> </para>
  180. </note>
  181. </para></description><typedef name="tuple_type"><type>Tuple</type></typedef>
  182. <data-member name="kind" specifiers="static"><type>const expr_kind</type></data-member>
  183. <data-member name="elements"><type>tuple_type</type></data-member>
  184. <method-group name="public member functions">
  185. <method name="value"><type>decltype(auto) constexpr</type><description><para>A convenience member function that dispatches to the free function <computeroutput>value()</computeroutput>. </para></description></method>
  186. <method name="left"><type>decltype(auto) constexpr</type><description><para>A convenience member function that dispatches to the free function <computeroutput>left()</computeroutput>. </para></description></method>
  187. <method name="right"><type>decltype(auto) constexpr</type><description><para>A convenience member function that dispatches to the free function <computeroutput>right()</computeroutput>. </para></description></method>
  188. </method-group>
  189. <constructor><description><para>Default constructor. Does nothing. </para></description></constructor>
  190. <constructor><parameter name="rhs"><paramtype>tuple_type &amp;&amp;</paramtype></parameter><description><para>Moves <emphasis>rhs</emphasis> into the only data mamber, <computeroutput>elements</computeroutput>. </para></description></constructor>
  191. </struct><struct-specialization name="expression"><template>
  192. <template-type-parameter name="T"/>
  193. </template><specialization><template-arg>expr_kind::terminal</template-arg><template-arg>hana::tuple&lt; T &gt;</template-arg></specialization><description><para>Terminal expression specialization of the reference expression template.</para><para><note><para>Due to a limitation of Doxygen, the <computeroutput>value()</computeroutput> member and each of the operator overloads listed here is a stand-in for three member functions. For each function <computeroutput>f</computeroutput>, the listing here is:<programlisting language="c++">return_type f ();
  194. </programlisting> However, there are actually three functions: <programlisting language="c++">return_type f () const &amp;;
  195. return_type f () &amp;;
  196. return_type f () &amp;&amp;;
  197. </programlisting> </para>
  198. </note>
  199. </para></description><typedef name="tuple_type"><type>hana::tuple&lt; T &gt;</type></typedef>
  200. <data-member name="kind" specifiers="static"><type>const expr_kind</type></data-member>
  201. <data-member name="elements"><type>tuple_type</type></data-member>
  202. <method-group name="public member functions">
  203. <method name="value"><type>decltype(auto) constexpr</type><description><para>A convenience member function that dispatches to the free function <computeroutput>value()</computeroutput>. </para></description></method>
  204. </method-group>
  205. <constructor><description><para>Default constructor. Does nothing. </para></description></constructor>
  206. <constructor><parameter name="t"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Forwards <emphasis>t</emphasis> into <computeroutput>elements</computeroutput>. </para></description></constructor>
  207. <constructor><parameter name="rhs"><paramtype>hana::tuple&lt; T &gt; const &amp;</paramtype></parameter><description><para>Copies <emphasis>rhs</emphasis> into the only data mamber, <computeroutput>elements</computeroutput>. </para></description></constructor>
  208. <constructor><parameter name="rhs"><paramtype>hana::tuple&lt; T &gt; &amp;&amp;</paramtype></parameter><description><para>Moves <emphasis>rhs</emphasis> into the only data mamber, <computeroutput>elements</computeroutput>. </para></description></constructor>
  209. </struct-specialization>
  210. <function name="operator+"><type>constexpr auto</type><template>
  211. <template-type-parameter name="Expr"/>
  212. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  213. </para>
  214. </para></description></function>
  215. <function name="operator-"><type>constexpr auto</type><template>
  216. <template-type-parameter name="Expr"/>
  217. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  218. </para>
  219. </para></description></function>
  220. <function name="operator*"><type>constexpr auto</type><template>
  221. <template-type-parameter name="Expr"/>
  222. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  223. </para>
  224. </para></description></function>
  225. <function name="operator~"><type>constexpr auto</type><template>
  226. <template-type-parameter name="Expr"/>
  227. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  228. </para>
  229. </para></description></function>
  230. <function name="operator&amp;"><type>constexpr auto</type><template>
  231. <template-type-parameter name="Expr"/>
  232. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  233. </para>
  234. </para></description></function>
  235. <function name="operator!"><type>constexpr auto</type><template>
  236. <template-type-parameter name="Expr"/>
  237. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  238. </para>
  239. </para></description></function>
  240. <function name="operator++"><type>constexpr auto</type><template>
  241. <template-type-parameter name="Expr"/>
  242. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  243. </para>
  244. </para></description></function>
  245. <function name="operator--"><type>constexpr auto</type><template>
  246. <template-type-parameter name="Expr"/>
  247. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  248. </para>
  249. </para></description></function>
  250. <function name="operator++"><type>constexpr auto</type><template>
  251. <template-type-parameter name="Expr"/>
  252. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name=""><paramtype>int</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  253. </para>
  254. </para></description></function>
  255. <function name="operator--"><type>constexpr auto</type><template>
  256. <template-type-parameter name="Expr"/>
  257. </template><parameter name=""><paramtype>Expr &amp;&amp;</paramtype></parameter><parameter name=""><paramtype>int</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_UNARY_OPERATOR for full semantics. </para>
  258. </para>
  259. </para></description></function>
  260. <function name="operator&lt;&lt;"><type>constexpr auto</type><template>
  261. <template-type-parameter name="LExpr"/>
  262. <template-type-parameter name="RExpr"/>
  263. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  264. </para>
  265. </para></description></function>
  266. <function name="operator&gt;&gt;"><type>constexpr auto</type><template>
  267. <template-type-parameter name="LExpr"/>
  268. <template-type-parameter name="RExpr"/>
  269. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  270. </para>
  271. </para></description></function>
  272. <function name="operator*"><type>constexpr auto</type><template>
  273. <template-type-parameter name="LExpr"/>
  274. <template-type-parameter name="RExpr"/>
  275. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  276. </para>
  277. </para></description></function>
  278. <function name="operator/"><type>constexpr auto</type><template>
  279. <template-type-parameter name="LExpr"/>
  280. <template-type-parameter name="RExpr"/>
  281. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  282. </para>
  283. </para></description></function>
  284. <function name="operator%"><type>constexpr auto</type><template>
  285. <template-type-parameter name="LExpr"/>
  286. <template-type-parameter name="RExpr"/>
  287. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  288. </para>
  289. </para></description></function>
  290. <function name="operator+"><type>constexpr auto</type><template>
  291. <template-type-parameter name="LExpr"/>
  292. <template-type-parameter name="RExpr"/>
  293. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  294. </para>
  295. </para></description></function>
  296. <function name="operator-"><type>constexpr auto</type><template>
  297. <template-type-parameter name="LExpr"/>
  298. <template-type-parameter name="RExpr"/>
  299. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  300. </para>
  301. </para></description></function>
  302. <function name="operator&lt;"><type>constexpr auto</type><template>
  303. <template-type-parameter name="LExpr"/>
  304. <template-type-parameter name="RExpr"/>
  305. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  306. </para>
  307. </para></description></function>
  308. <function name="operator&gt;"><type>constexpr auto</type><template>
  309. <template-type-parameter name="LExpr"/>
  310. <template-type-parameter name="RExpr"/>
  311. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  312. </para>
  313. </para></description></function>
  314. <function name="operator&lt;="><type>constexpr auto</type><template>
  315. <template-type-parameter name="LExpr"/>
  316. <template-type-parameter name="RExpr"/>
  317. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  318. </para>
  319. </para></description></function>
  320. <function name="operator&gt;="><type>constexpr auto</type><template>
  321. <template-type-parameter name="LExpr"/>
  322. <template-type-parameter name="RExpr"/>
  323. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  324. </para>
  325. </para></description></function>
  326. <function name="operator=="><type>constexpr auto</type><template>
  327. <template-type-parameter name="LExpr"/>
  328. <template-type-parameter name="RExpr"/>
  329. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  330. </para>
  331. </para></description></function>
  332. <function name="operator!="><type>constexpr auto</type><template>
  333. <template-type-parameter name="LExpr"/>
  334. <template-type-parameter name="RExpr"/>
  335. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  336. </para>
  337. </para></description></function>
  338. <function name="operator||"><type>constexpr auto</type><template>
  339. <template-type-parameter name="LExpr"/>
  340. <template-type-parameter name="RExpr"/>
  341. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  342. </para>
  343. </para></description></function>
  344. <function name="operator&amp;&amp;"><type>constexpr auto</type><template>
  345. <template-type-parameter name="LExpr"/>
  346. <template-type-parameter name="RExpr"/>
  347. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  348. </para>
  349. </para></description></function>
  350. <function name="operator&amp;"><type>constexpr auto</type><template>
  351. <template-type-parameter name="LExpr"/>
  352. <template-type-parameter name="RExpr"/>
  353. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  354. </para>
  355. </para></description></function>
  356. <function name="operator|"><type>constexpr auto</type><template>
  357. <template-type-parameter name="LExpr"/>
  358. <template-type-parameter name="RExpr"/>
  359. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  360. </para>
  361. </para></description></function>
  362. <function name="operator^"><type>constexpr auto</type><template>
  363. <template-type-parameter name="LExpr"/>
  364. <template-type-parameter name="RExpr"/>
  365. </template><parameter name="lhs"><paramtype>LExpr &amp;&amp;</paramtype></parameter><parameter name="rhs"><paramtype>RExpr &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_BINARY_OPERATOR for full semantics. </para>
  366. </para>
  367. </para></description></function>
  368. <function name="if_else"><type>constexpr auto</type><template>
  369. <template-type-parameter name="Expr1"/>
  370. <template-type-parameter name="Expr2"/>
  371. <template-type-parameter name="Expr3"/>
  372. </template><parameter name="expr1"><paramtype>Expr1 &amp;&amp;</paramtype></parameter><parameter name="expr2"><paramtype>Expr2 &amp;&amp;</paramtype></parameter><parameter name="expr3"><paramtype>Expr3 &amp;&amp;</paramtype></parameter><description><para><para><emphasis role="bold">See Also:</emphasis><para>BOOST_YAP_USER_EXPR_IF_ELSE for full semantics. </para>
  373. </para>
  374. </para></description></function>
  375. <function name="make_expression"><type>constexpr auto</type><template>
  376. <template-nontype-parameter name="Kind"><type>expr_kind</type></template-nontype-parameter>
  377. <template-nontype-parameter name="T"><type>typename...</type></template-nontype-parameter>
  378. </template><parameter name="t"><paramtype>T &amp;&amp;...</paramtype></parameter><description><para>Returns <computeroutput>make_expression&lt;boost::yap::expression, Kind&gt;(...)</computeroutput>. </para></description></function>
  379. <function name="make_terminal"><type>constexpr auto</type><template>
  380. <template-type-parameter name="T"/>
  381. </template><parameter name="t"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Returns <computeroutput>make_terminal&lt;boost::yap::expression&gt;(t)</computeroutput>. </para></description></function>
  382. <function name="as_expr"><type>decltype(auto) constexpr</type><template>
  383. <template-type-parameter name="T"/>
  384. </template><parameter name="t"><paramtype>T &amp;&amp;</paramtype></parameter><description><para>Returns <computeroutput>as_expr&lt;boost::yap::expression&gt;(t)</computeroutput>. </para></description></function>
  385. </namespace>
  386. </namespace>
  387. </header>
  388. <header name="boost/yap/print.hpp">
  389. <namespace name="boost">
  390. <namespace name="yap">
  391. <function name="op_string"><type>char const *</type><parameter name="kind"><paramtype>expr_kind</paramtype></parameter><description><para>Returns the <computeroutput>char const *</computeroutput> string for the spelling of the C++ operator associated with <emphasis>kind</emphasis>. It returns the special values "ref" and "term" for the non-operator kinds <computeroutput>expr_kind::expr_ref</computeroutput> amd <computeroutput>expr_kind::terminal</computeroutput>, respectively. </para></description></function>
  392. <function name="print"><type>std::ostream &amp;</type><template>
  393. <template-type-parameter name="Expr"/>
  394. </template><parameter name="os"><paramtype>std::ostream &amp;</paramtype></parameter><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><description><para>Prints expression <emphasis>expr</emphasis> to stream <emphasis>os</emphasis>. Returns <emphasis>os</emphasis>. </para></description></function>
  395. </namespace>
  396. </namespace>
  397. </header>
  398. <header name="boost/yap/user_macros.hpp">
  399. <macro name="BOOST_YAP_USER_UNARY_OPERATOR" kind="functionlike"><macro-parameter name="op_name"><description><para>The operator to be overloaded; this must be one of the <emphasis role="bold">unary</emphasis> enumerators in <computeroutput>expr_kind</computeroutput>, without the <computeroutput>expr_kind::</computeroutput> qualification.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to which the overloads apply. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="result_expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>result_expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines operator overloads for unary operator <emphasis>op_name</emphasis> that each take an expression instantiated from <emphasis>expr_template</emphasis> and return an expression instantiated from the <emphasis>result_expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. 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.</para><para>Example: <programlisting language="c++"/>
  400. </para></description></macro>
  401. <macro name="BOOST_YAP_USER_BINARY_OPERATOR" kind="functionlike"><macro-parameter name="op_name"><description><para>The operator to be overloaded; this must be one of the <emphasis role="bold">binary</emphasis> enumerators in <computeroutput>expr_kind</computeroutput>, except assign, subscript, or call, without the <computeroutput>expr_kind::</computeroutput> qualification.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to which the overloads apply. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="result_expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>result_expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines operator overloads for binary operator <emphasis>op_name</emphasis> that each produce an expression instantiated from the <emphasis>expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. For the lvalue reference overloads, <computeroutput>*this</computeroutput> is captured by reference into the resulting expression. For the rvalue reference overload, <computeroutput>*this</computeroutput> is moved into the resulting expression.</para><para>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.</para><para>Example: <programlisting language="c++"/>
  402. </para></description></macro>
  403. <macro name="BOOST_YAP_USER_ASSIGN_OPERATOR" kind="functionlike"><macro-parameter name="this_type"><description><para>The type of the class the operator is a member of; this is required to avoid clashing with the assignment and move assignement operators.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines operator overloads for <emphasis>operator=()</emphasis> that each produce an expression instantiated from the <emphasis>expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. For the lvalue reference overloads, <computeroutput>*this</computeroutput> is captured by reference into the resulting expression. For the rvalue reference overload, <computeroutput>*this</computeroutput> is moved into the resulting expression.</para><para>The <emphasis>rhs</emphasis> parameter to each of the defined overloads may be any type, including an expression, except that the overloads are constrained by std::enable_if&lt;&gt; not to conflict with the assignment and move assignement operators. If <emphasis>rhs</emphasis> is a non-expression, it is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  404. </para></description></macro>
  405. <macro name="BOOST_YAP_USER_SUBSCRIPT_OPERATOR" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines operator overloads for <emphasis>operator[]()</emphasis> that each produce an expression instantiated from the <emphasis>expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. For the lvalue reference overloads, <computeroutput>*this</computeroutput> is captured by reference into the resulting expression. For the rvalue reference overload, <computeroutput>*this</computeroutput> is moved into the resulting expression.</para><para>The <emphasis>rhs</emphasis> parameter to each of the defined overloads may be any type, including an expression, except that the overloads are constrained by std::enable_if&lt;&gt; not to conflict with the assignment and move assignement operators. If <emphasis>rhs</emphasis> is a non-expression, it is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  406. </para></description></macro>
  407. <macro name="BOOST_YAP_USER_CALL_OPERATOR" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines operator overloads for the call operator taking any number of parameters ("operator()") that each produce an expression instantiated from the <emphasis>expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. For the lvalue reference overloads, <computeroutput>*this</computeroutput> is captured by reference into the resulting expression. For the rvalue reference overload, <computeroutput>*this</computeroutput> is moved into the resulting expression.</para><para>The <emphasis>u</emphasis> parameters to each of the defined overloads may be any type, including an expression. Each non-expression is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  408. </para></description></macro>
  409. <macro name="BOOST_YAP_USER_CALL_OPERATOR_N" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="n"><description><para>The number of parameters accepted by the operator() overloads. n must be &lt;= BOOST_PP_LIMIT_REPEAT. </para></description></macro-parameter><description><para>Defines operator overloads for the call operator taking N parameters ("operator()(t0, t1, ... tn-1)") that each produce an expression instantiated from the <emphasis>expr_template</emphasis> expression template. One overload is defined for each of the qualifiers <computeroutput>const &amp;</computeroutput>, <computeroutput>&amp;</computeroutput>, and <computeroutput>&amp;&amp;</computeroutput>. For the lvalue reference overloads, <computeroutput>*this</computeroutput> is captured by reference into the resulting expression. For the rvalue reference overload, <computeroutput>*this</computeroutput> is moved into the resulting expression.</para><para>The <emphasis>u</emphasis> parameters to each of the defined overloads may be any type, including an expression. Each non-expression is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  410. </para></description></macro>
  411. <macro name="BOOST_YAP_USER_EXPR_IF_ELSE" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines a 3-parameter function <computeroutput>if_else()</computeroutput> that acts as an analogue to the ternary operator (<computeroutput>?:</computeroutput>), since the ternary operator is not user-overloadable. The return type of <computeroutput>if_else()</computeroutput> is an expression instantiated from the <emphasis>expr_template</emphasis> expression template.</para><para>At least one parameter to <computeroutput>if_else()</computeroutput> must be an expression.</para><para>For each parameter E passed to <computeroutput>if_else()</computeroutput>, if E is an rvalue, E is moved into the result, and otherwise E is captured by reference into the result.</para><para>Example: <programlisting language="c++"/>
  412. </para></description></macro>
  413. <macro name="BOOST_YAP_USER_UDT_ANY_IF_ELSE" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="udt_trait"><description><para>A trait template to use to constrain which types are accepted as template parameters to <computeroutput>if_else()</computeroutput>. </para></description></macro-parameter><description><para>Defines a function <computeroutput>if_else()</computeroutput> that acts as an analogue to the ternary operator (<computeroutput>?:</computeroutput>), since the ternary operator is not user-overloadable. The return type of <computeroutput>if_else()</computeroutput> is an expression instantiated from the <emphasis>expr_template</emphasis> expression template.</para><para>Each parameter to <computeroutput>if_else()</computeroutput> may be any type that is <emphasis role="bold">not</emphasis> an expression. At least on parameter must be a type <computeroutput>T</computeroutput> for which <programlisting language="c++">udt_trait&lt;std::remove_cv_t&lt;std::remove_reference_t&lt;T&gt;&gt;&gt;::value
  414. </programlisting> is true. Each parameter is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  415. </para></description></macro>
  416. <macro name="BOOST_YAP_USER_UDT_UNARY_OPERATOR" kind="functionlike"><macro-parameter name="op_name"><description><para>The operator to be overloaded; this must be one of the <emphasis role="bold">unary</emphasis> enumerators in <computeroutput>expr_kind</computeroutput>, without the <computeroutput>expr_kind::</computeroutput> qualification.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="udt_trait"><description><para>A trait template to use to constrain which types are accepted as template parameters to the defined operator overload. </para></description></macro-parameter><description><para>Defines a free/non-member operator overload for unary operator <emphasis>op_name</emphasis> that produces an expression instantiated from the <emphasis>expr_template</emphasis> expression template.</para><para>The parameter to the defined operator overload may be any type that is <emphasis role="bold">not</emphasis> an expression and for which<programlisting language="c++">udt_trait&lt;std::remove_cv_t&lt;std::remove_reference_t&lt;T&gt;&gt;&gt;::value
  417. </programlisting> is true. The parameter is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  418. </para></description></macro>
  419. <macro name="BOOST_YAP_USER_UDT_UDT_BINARY_OPERATOR" kind="functionlike"><macro-parameter name="op_name"><description><para>The operator to be overloaded; this must be one of the <emphasis role="bold">binary</emphasis> enumerators in <computeroutput>expr_kind</computeroutput>, without the <computeroutput>expr_kind::</computeroutput> qualification.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="t_udt_trait"><description><para>A trait template to use to constrain which types are accepted as <emphasis>T</emphasis> template parameters to the defined operator overload.</para></description></macro-parameter><macro-parameter name="u_udt_trait"><description><para>A trait template to use to constrain which types are accepted as <emphasis>U</emphasis> template parameters to the defined operator overload. </para></description></macro-parameter><description><para>Defines a free/non-member operator overload for binary operator <emphasis>op_name</emphasis> that produces an expression instantiated from the <emphasis>expr_template</emphasis> expression template.</para><para>The <emphasis>lhs</emphasis> parameter to the defined operator overload may be any type that is <emphasis role="bold">not</emphasis> an expression and for which<programlisting language="c++">t_udt_trait&lt;std::remove_cv_t&lt;std::remove_reference_t&lt;T&gt;&gt;&gt;::value
  420. </programlisting> is true. The parameter is wrapped in a terminal expression.</para><para>The <emphasis>rhs</emphasis> parameter to the defined operator overload may be any type that is <emphasis role="bold">not</emphasis> an expression and for which<programlisting language="c++">u_udt_trait&lt;std::remove_cv_t&lt;std::remove_reference_t&lt;U&gt;&gt;&gt;::value
  421. </programlisting> is true. The parameter is wrapped in a terminal expression.</para><para>Example: <programlisting language="c++"/>
  422. </para></description></macro>
  423. <macro name="BOOST_YAP_USER_UDT_ANY_BINARY_OPERATOR" kind="functionlike"><macro-parameter name="op_name"><description><para>The operator to be overloaded; this must be one of the <emphasis role="bold">binary</emphasis> enumerators in <computeroutput>expr_kind</computeroutput>, without the <computeroutput>expr_kind::</computeroutput> qualification.</para></description></macro-parameter><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate.</para></description></macro-parameter><macro-parameter name="udt_trait"><description><para>A trait template to use to constrain which types are accepted as template parameters to the defined operator overload. </para></description></macro-parameter><description><para>Defines a free/non-member operator overload for binary operator <emphasis>op_name</emphasis> that produces an expression instantiated from the <emphasis>expr_template</emphasis> expression template.</para><para>The <emphasis>lhs</emphasis> and <emphasis>rhs</emphasis> parameters to the defined operator overload may be any types that are <emphasis role="bold">not</emphasis> expressions. Each parameter is wrapped in a terminal expression.</para><para>At least one of the parameters to the defined operator overload must be a type <computeroutput>T</computeroutput> for which<programlisting language="c++">udt_trait&lt;std::remove_cv_t&lt;std::remove_reference_t&lt;T&gt;&gt;&gt;::value
  424. </programlisting> is true.</para><para>Example: <programlisting language="c++"/>
  425. </para></description></macro>
  426. <macro name="BOOST_YAP_USER_LITERAL_PLACEHOLDER_OPERATOR" kind="functionlike"><macro-parameter name="expr_template"><description><para>The expression template to use to instantiate the result expression. <emphasis>expr_template</emphasis> must be an ExpressionTemplate. </para></description></macro-parameter><description><para>Defines user defined literal template that creates literal placeholders instantiated from the <emphasis>expr_template</emphasis> expression template. It is recommended that you put this in its own namespace.</para><para>
  427. </para></description></macro>
  428. </header>
  429. <header name="boost/yap/yap.hpp">
  430. </header>
  431. </library-reference>