transform.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Type Traits that Transform One Type to Another</title>
  5. <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
  7. <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
  8. <link rel="up" href="../category.html" title="Type Traits by Category">
  9. <link rel="prev" href="value_traits/operators.html" title="Operator Type Traits">
  10. <link rel="next" href="alignment.html" title="Synthesizing Types with Specific Alignments">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr>
  14. <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
  15. <td align="center"><a href="../../../../../../index.html">Home</a></td>
  16. <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
  17. <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
  18. <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
  19. <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
  20. </tr></table>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="value_traits/operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="alignment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_typetraits.category.transform"></a><a class="link" href="transform.html" title="Type Traits that Transform One Type to Another">Type Traits that
  28. Transform One Type to Another</a>
  29. </h3></div></div></div>
  30. <p>
  31. The following templates transform one type to another, based upon some well-defined
  32. rule. Each template has a single member called <code class="computeroutput"><span class="identifier">type</span></code>
  33. that is the result of applying the transformation to the template argument
  34. <code class="computeroutput"><span class="identifier">T</span></code>.
  35. </p>
  36. <p>
  37. <span class="bold"><strong>Synopsis:</strong></span>
  38. </p>
  39. <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  40. <span class="keyword">struct</span> <a class="link" href="../reference/add_const.html" title="add_const">add_const</a><span class="special">;</span>
  41. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  42. <span class="keyword">struct</span> <a class="link" href="../reference/add_cv.html" title="add_cv">add_cv</a><span class="special">;</span>
  43. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  44. <span class="keyword">struct</span> <a class="link" href="../reference/add_lvalue_reference.html" title="add_lvalue_reference">add_lvalue_reference</a><span class="special">;</span>
  45. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  46. <span class="keyword">struct</span> <a class="link" href="../reference/add_pointer.html" title="add_pointer">add_pointer</a><span class="special">;</span>
  47. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  48. <span class="keyword">struct</span> <a class="link" href="../reference/add_reference.html" title="add_reference">add_reference</a><span class="special">;</span>
  49. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  50. <span class="keyword">struct</span> <a class="link" href="../reference/add_rvalue_reference.html" title="add_rvalue_reference">add_rvalue_reference</a><span class="special">;</span>
  51. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  52. <span class="keyword">struct</span> <a class="link" href="../reference/add_volatile.html" title="add_volatile">add_volatile</a><span class="special">;</span>
  53. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">bool</span> <span class="identifier">B</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
  54. <span class="keyword">struct</span> <a class="link" href="../reference/conditional.html" title="conditional">conditional</a><span class="special">;</span>
  55. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span><span class="special">...</span> <span class="identifier">T</span><span class="special">&gt;</span>
  56. <span class="keyword">struct</span> <a class="link" href="../reference/common_type.html" title="common_type">common_type</a><span class="special">;</span>
  57. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
  58. <span class="keyword">struct</span> <a class="link" href="../reference/copy_cv.html" title="copy_cv">copy_cv</a><span class="special">;</span>
  59. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  60. <span class="keyword">struct</span> <a class="link" href="../reference/decay.html" title="decay">decay</a><span class="special">;</span>
  61. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  62. <span class="keyword">struct</span> <a class="link" href="../reference/floating_point_promotion.html" title="floating_point_promotion">floating_point_promotion</a><span class="special">;</span>
  63. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  64. <span class="keyword">struct</span> <a class="link" href="../reference/integral_promotion.html" title="integral_promotion">integral_promotion</a><span class="special">;</span>
  65. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  66. <span class="keyword">struct</span> <a class="link" href="../reference/make_signed.html" title="make_signed">make_signed</a><span class="special">;</span>
  67. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  68. <span class="keyword">struct</span> <a class="link" href="../reference/make_unsigned.html" title="make_unsigned">make_unsigned</a><span class="special">;</span>
  69. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  70. <span class="keyword">struct</span> <a class="link" href="../reference/promote.html" title="promote">promote</a><span class="special">;</span>
  71. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  72. <span class="keyword">struct</span> <a class="link" href="../reference/remove_all_extents.html" title="remove_all_extents">remove_all_extents</a><span class="special">;</span>
  73. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  74. <span class="keyword">struct</span> <a class="link" href="../reference/remove_const.html" title="remove_const">remove_const</a><span class="special">;</span>
  75. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  76. <span class="keyword">struct</span> <a class="link" href="../reference/remove_cv.html" title="remove_cv">remove_cv</a><span class="special">;</span>
  77. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  78. <span class="keyword">struct</span> <a class="link" href="../reference/remove_extent.html" title="remove_extent">remove_extent</a><span class="special">;</span>
  79. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  80. <span class="keyword">struct</span> <a class="link" href="../reference/remove_pointer.html" title="remove_pointer">remove_pointer</a><span class="special">;</span>
  81. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  82. <span class="keyword">struct</span> <a class="link" href="../reference/remove_reference.html" title="remove_reference">remove_reference</a><span class="special">;</span>
  83. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  84. <span class="keyword">struct</span> <a class="link" href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
  85. <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
  86. <span class="keyword">struct</span> <a class="link" href="../reference/type_identity.html" title="type_identity">type_identity</a><span class="special">;</span>
  87. </pre>
  88. </div>
  89. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  90. <td align="left"></td>
  91. <td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
  92. Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
  93. Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
  94. Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
  95. Watanabe<p>
  96. Distributed under the Boost Software License, Version 1.0. (See accompanying
  97. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  98. </p>
  99. </div></td>
  100. </tr></table>
  101. <hr>
  102. <div class="spirit-nav">
  103. <a accesskey="p" href="value_traits/operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="alignment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  104. </div>
  105. </body>
  106. </html>