remove_pointer.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>remove_pointer</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="../reference.html" title="Alphabetical Reference">
  9. <link rel="prev" href="remove_extent.html" title="remove_extent">
  10. <link rel="next" href="remove_reference.html" title="remove_reference">
  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="remove_extent.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="remove_reference.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.reference.remove_pointer"></a><a class="link" href="remove_pointer.html" title="remove_pointer">remove_pointer</a>
  28. </h3></div></div></div>
  29. <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>
  30. <span class="keyword">struct</span> <span class="identifier">remove_pointer</span>
  31. <span class="special">{</span>
  32. <span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
  33. <span class="special">};</span>
  34. <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> <span class="keyword">using</span> <span class="identifier">remove_pointer_t</span> <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">;</span> <span class="comment">// C++11 and above</span>
  35. </pre>
  36. <p>
  37. <span class="bold"><strong>type:</strong></span> The same type as <code class="computeroutput"><span class="identifier">T</span></code>,
  38. but with any pointer modifier removed. Note that pointers to members are
  39. left unchanged: removing the pointer decoration would result in an invalid
  40. type.
  41. </p>
  42. <p>
  43. <span class="bold"><strong>C++ Standard Reference:</strong></span> 8.3.1.
  44. </p>
  45. <p>
  46. <span class="bold"><strong>Compiler Compatibility:</strong></span> All current compilers
  47. are supported by this trait.
  48. </p>
  49. <p>
  50. <span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <span class="preprocessor">#include</span>
  51. <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">remove_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
  52. or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
  53. </p>
  54. <div class="table">
  55. <a name="boost_typetraits.reference.remove_pointer.examples"></a><p class="title"><b>Table&#160;1.34.&#160;Examples</b></p>
  56. <div class="table-contents"><table class="table" summary="Examples">
  57. <colgroup>
  58. <col>
  59. <col>
  60. </colgroup>
  61. <thead><tr>
  62. <th>
  63. <p>
  64. Expression
  65. </p>
  66. </th>
  67. <th>
  68. <p>
  69. Result Type
  70. </p>
  71. </th>
  72. </tr></thead>
  73. <tbody>
  74. <tr>
  75. <td>
  76. <p>
  77. <code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
  78. </p>
  79. </td>
  80. <td>
  81. <p>
  82. <code class="computeroutput"><span class="keyword">int</span></code>
  83. </p>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td>
  88. <p>
  89. <code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="keyword">int</span>
  90. <span class="keyword">const</span><span class="special">*&gt;::</span><span class="identifier">type</span></code>
  91. </p>
  92. </td>
  93. <td>
  94. <p>
  95. <code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span></code>
  96. </p>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td>
  101. <p>
  102. <code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="keyword">int</span>
  103. <span class="keyword">const</span><span class="special">**&gt;::</span><span class="identifier">type</span></code>
  104. </p>
  105. </td>
  106. <td>
  107. <p>
  108. <code class="computeroutput"><span class="keyword">int</span> <span class="keyword">const</span><span class="special">*</span></code>
  109. </p>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>
  114. <p>
  115. <code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span></code>
  116. </p>
  117. </td>
  118. <td>
  119. <p>
  120. <code class="computeroutput"><span class="keyword">int</span><span class="special">&amp;</span></code>
  121. </p>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>
  126. <p>
  127. <code class="computeroutput"><span class="identifier">remove_pointer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">*&amp;&gt;::</span><span class="identifier">type</span></code>
  128. </p>
  129. </td>
  130. <td>
  131. <p>
  132. <code class="computeroutput"><span class="keyword">int</span><span class="special">*&amp;</span></code>
  133. </p>
  134. </td>
  135. </tr>
  136. </tbody>
  137. </table></div>
  138. </div>
  139. <br class="table-break">
  140. </div>
  141. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  142. <td align="left"></td>
  143. <td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
  144. Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
  145. Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
  146. Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
  147. Watanabe<p>
  148. Distributed under the Boost Software License, Version 1.0. (See accompanying
  149. 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>)
  150. </p>
  151. </div></td>
  152. </tr></table>
  153. <hr>
  154. <div class="spirit-nav">
  155. <a accesskey="p" href="remove_extent.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="remove_reference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  156. </div>
  157. </body>
  158. </html>