multivisitor.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
  3. "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
  4. <!--
  5. Copyright 2013-2019 Antony Polukhin.
  6. Distributed under the Boost Software License, Version 1.0. (See accompanying
  7. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. -->
  9. <header name="boost/variant/multivisitors.hpp">
  10. <using-namespace name="boost"/>
  11. <para>Provides declarations of <functionname>apply_visitor</functionname> for three or more
  12. <code><classname>variant</classname></code> parameters.</para>
  13. <macro name="BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS">
  14. <purpose>
  15. <simpara>Controls maximum amount of <code><classname>variant</classname></code>
  16. parameters for multi visistors. Not used when <code>std::tuple</code> is available and
  17. <code><macroname>BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES</macroname></code>
  18. is not defined.</simpara>
  19. </purpose>
  20. <description>
  21. <para><emphasis role="bold">Note</emphasis>: Default amount is 4. Define it
  22. to bigger value before including &lt;boost/variant/multivisitors.hpp&gt; to
  23. increase maximum amount of <code><classname>variant</classname></code>
  24. parameters for <functionname>apply_visitor</functionname>.</para>
  25. </description>
  26. </macro>
  27. <namespace name="boost">
  28. <overloaded-function name="apply_visitor /*three or more variant parameters*/">
  29. <description>
  30. <simpara>Allows compile-time checked type-safe application of the
  31. given visitor to the content of the given variant, ensuring that all
  32. types are handled by the visitor. See <functionname>apply_visitor</functionname>
  33. for more information.</simpara>
  34. </description>
  35. <signature>
  36. <template>
  37. <template-type-parameter name="MultiVisitor"/>
  38. <template-type-parameter name="Variant1"/>
  39. <template-type-parameter name="Variant2"/>
  40. <template-type-parameter name="Variant3"/>
  41. </template>
  42. <type>typename MultiVisitor::result_type OR decltype(auto)</type>
  43. <parameter name="visitor">
  44. <paramtype>MultiVisitor &amp;</paramtype>
  45. </parameter>
  46. <parameter name="operand1">
  47. <paramtype>Variant1&amp;&amp;</paramtype>
  48. </parameter>
  49. <parameter name="operand2">
  50. <paramtype>Variant2&amp;&amp;</paramtype>
  51. </parameter>
  52. <parameter name="operand3">
  53. <paramtype>Variant3&amp;&amp;</paramtype>
  54. </parameter>
  55. <parameter name="other_operands">
  56. <paramtype>...</paramtype>
  57. </parameter>
  58. </signature>
  59. <signature>
  60. <template>
  61. <template-type-parameter name="MultiVisitor"/>
  62. <template-type-parameter name="Variant1"/>
  63. <template-type-parameter name="Variant2"/>
  64. <template-type-parameter name="Variant3"/>
  65. </template>
  66. <type>typename MultiVisitor::result_type OR decltype(auto)</type>
  67. <parameter name="visitor">
  68. <paramtype>const MultiVisitor &amp;</paramtype>
  69. </parameter>
  70. <parameter name="operand1">
  71. <paramtype>Variant1&amp;&amp;</paramtype>
  72. </parameter>
  73. <parameter name="operand2">
  74. <paramtype>Variant2&amp;&amp;</paramtype>
  75. </parameter>
  76. <parameter name="operand3">
  77. <paramtype>Variant3&amp;&amp;</paramtype>
  78. </parameter>
  79. <parameter name="other_operands">
  80. <paramtype>...</paramtype>
  81. </parameter>
  82. </signature>
  83. </overloaded-function>
  84. </namespace>
  85. </header>