autodoc.xml 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. <?xml version="1.0" standalone="yes"?>
  2. <library-reference><header name="boost/move/adl_move_swap.hpp">
  3. <namespace name="boost">
  4. <function name="adl_move_swap"><type>void</type><template>
  5. <template-type-parameter name="T"/>
  6. </template><parameter name="x"><paramtype>T &amp;</paramtype></parameter><parameter name="y"><paramtype>T &amp;</paramtype></parameter><description><para>Exchanges the values of a and b, using Argument Dependent Lookup (ADL) to select a specialized swap function if available. If no specialized swap function is available, std::swap is used.</para><para><emphasis role="bold">Exception</emphasis>: If T uses Boost.Move's move emulation and the compiler has no rvalue references then:</para><para><itemizedlist>
  7. <listitem><para>If T has a <computeroutput>T::swap(T&amp;)</computeroutput> member, that member is called.</para>
  8. </listitem><listitem><para>Otherwise a move-based swap is called, equivalent to: <computeroutput>T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t);</computeroutput>. </para>
  9. </listitem></itemizedlist>
  10. </para></description></function>
  11. <function name="adl_move_swap_ranges"><type>ForwardIt2</type><template>
  12. <template-type-parameter name="ForwardIt1"/>
  13. <template-type-parameter name="ForwardIt2"/>
  14. </template><parameter name="first1"><paramtype>ForwardIt1</paramtype></parameter><parameter name="last1"><paramtype>ForwardIt1</paramtype></parameter><parameter name="first2"><paramtype>ForwardIt2</paramtype></parameter><description><para>Exchanges elements between range [first1, last1) and another range starting at first2 using boost::adl_move_swap.</para><para>Parameters: first1, last1 - the first range of elements to swap first2 - beginning of the second range of elements to swap</para><para>Type requirements:<itemizedlist>
  15. <listitem><para>ForwardIt1, ForwardIt2 must meet the requirements of ForwardIterator.</para>
  16. </listitem><listitem><para>The types of dereferenced ForwardIt1 and ForwardIt2 must meet the requirements of Swappable</para>
  17. </listitem></itemizedlist>
  18. </para><para>Return value: Iterator to the element past the last element exchanged in the range beginning with first2. </para></description></function>
  19. <function name="adl_move_swap_ranges_backward"><type>BidirIt2</type><template>
  20. <template-type-parameter name="BidirIt1"/>
  21. <template-type-parameter name="BidirIt2"/>
  22. </template><parameter name="first1"><paramtype>BidirIt1</paramtype></parameter><parameter name="last1"><paramtype>BidirIt1</paramtype></parameter><parameter name="last2"><paramtype>BidirIt2</paramtype></parameter></function>
  23. <function name="adl_move_iter_swap"><type>void</type><template>
  24. <template-type-parameter name="ForwardIt1"/>
  25. <template-type-parameter name="ForwardIt2"/>
  26. </template><parameter name="a"><paramtype>ForwardIt1</paramtype></parameter><parameter name="b"><paramtype>ForwardIt2</paramtype></parameter></function>
  27. </namespace>
  28. </header>
  29. <header name="boost/move/algo/adaptive_merge.hpp">
  30. <namespace name="boost">
  31. <namespace name="movelib">
  32. <function name="adaptive_merge"><type>void</type><template>
  33. <template-type-parameter name="RandIt"/>
  34. <template-type-parameter name="Compare"/>
  35. </template><parameter name="first"><paramtype>RandIt</paramtype></parameter><parameter name="middle"><paramtype>RandIt</paramtype></parameter><parameter name="last"><paramtype>RandIt</paramtype></parameter><parameter name="comp"><paramtype>Compare</paramtype></parameter><parameter name="uninitialized"><paramtype>typename iterator_traits&lt; RandIt &gt;::value_type *</paramtype><default>0</default></parameter><parameter name="uninitialized_len"><paramtype>typename iterator_traits&lt; RandIt &gt;::size_type</paramtype><default>0</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Merges two consecutive sorted ranges [first, middle) and [middle, last) into one sorted range [first, last) according to the given comparison function comp. The algorithm is stable (if there are equivalent elements in the original two ranges, the elements from the first range (preserving their original order) precede the elements from the second range (preserving their original order).</para><para><emphasis role="bold">Requires</emphasis>:<itemizedlist>
  36. <listitem><para>RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.</para>
  37. </listitem><listitem><para>The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.</para>
  38. </listitem></itemizedlist>
  39. </para><para><emphasis role="bold">Parameters</emphasis>:<itemizedlist>
  40. <listitem><para>first: the beginning of the first sorted range.</para>
  41. </listitem><listitem><para>middle: the end of the first sorted range and the beginning of the second</para>
  42. </listitem><listitem><para>last: the end of the second sorted range</para>
  43. </listitem><listitem><para>comp: comparison function object which returns true if the first argument is is ordered before the second.</para>
  44. </listitem><listitem><para>uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len" elements of type iterator_traits&lt;RandIt&gt;::value_type. Maximum performance is achieved when uninitialized_len is min(std::distance(first, middle), std::distance(middle, last)).</para>
  45. </listitem></itemizedlist>
  46. </para><para><emphasis role="bold">Throws</emphasis>: If comp throws or the move constructor, move assignment or swap of the type of dereferenced RandIt throws.</para><para><emphasis role="bold">Complexity</emphasis>: Always K x O(N) comparisons and move assignments/constructors/swaps. Constant factor for comparisons and data movement is minimized when uninitialized_len is min(std::distance(first, middle), std::distance(middle, last)). Pretty good enough performance is achieved when uninitialized_len is ceil(sqrt(std::distance(first, last)))*2.</para><para><emphasis role="bold">Caution</emphasis>: Experimental implementation, not production-ready. </para></description></function>
  47. </namespace>
  48. </namespace>
  49. </header>
  50. <header name="boost/move/algo/adaptive_sort.hpp">
  51. <namespace name="boost">
  52. <namespace name="movelib">
  53. <function name="adaptive_sort"><type>void</type><template>
  54. <template-type-parameter name="RandIt"/>
  55. <template-type-parameter name="RandRawIt"/>
  56. <template-type-parameter name="Compare"/>
  57. </template><parameter name="first"><paramtype>RandIt</paramtype></parameter><parameter name="last"><paramtype>RandIt</paramtype></parameter><parameter name="comp"><paramtype>Compare</paramtype></parameter><parameter name="uninitialized"><paramtype>RandRawIt</paramtype></parameter><parameter name="uninitialized_len"><paramtype>typename iterator_traits&lt; RandIt &gt;::size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Sorts the elements in the range [first, last) in ascending order according to comparison functor "comp". The sort is stable (order of equal elements is guaranteed to be preserved). Performance is improved if additional raw storage is provided.</para><para><emphasis role="bold">Requires</emphasis>:<itemizedlist>
  58. <listitem><para>RandIt must meet the requirements of ValueSwappable and RandomAccessIterator.</para>
  59. </listitem><listitem><para>The type of dereferenced RandIt must meet the requirements of MoveAssignable and MoveConstructible.</para>
  60. </listitem></itemizedlist>
  61. </para><para><emphasis role="bold">Parameters</emphasis>:<itemizedlist>
  62. <listitem><para>first, last: the range of elements to sort</para>
  63. </listitem><listitem><para>comp: comparison function object which returns true if the first argument is is ordered before the second.</para>
  64. </listitem><listitem><para>uninitialized, uninitialized_len: raw storage starting on "uninitialized", able to hold "uninitialized_len" elements of type iterator_traits&lt;RandIt&gt;::value_type. Maximum performance is achieved when uninitialized_len is ceil(std::distance(first, last)/2).</para>
  65. </listitem></itemizedlist>
  66. </para><para><emphasis role="bold">Throws</emphasis>: If comp throws or the move constructor, move assignment or swap of the type of dereferenced RandIt throws.</para><para><emphasis role="bold">Complexity</emphasis>: Always K x O(Nxlog(N)) comparisons and move assignments/constructors/swaps. Comparisons are close to minimum even with no additional memory. Constant factor for data movement is minimized when uninitialized_len is ceil(std::distance(first, last)/2). Pretty good enough performance is achieved when ceil(sqrt(std::distance(first, last)))*2.</para><para><emphasis role="bold">Caution</emphasis>: Experimental implementation, not production-ready. </para></description></function>
  67. <function name="adaptive_sort"><type>void</type><template>
  68. <template-type-parameter name="RandIt"/>
  69. <template-type-parameter name="Compare"/>
  70. </template><parameter name="first"><paramtype>RandIt</paramtype></parameter><parameter name="last"><paramtype>RandIt</paramtype></parameter><parameter name="comp"><paramtype>Compare</paramtype></parameter></function>
  71. </namespace>
  72. </namespace>
  73. </header>
  74. <header name="boost/move/algo/predicate.hpp">
  75. <namespace name="boost">
  76. <namespace name="movelib">
  77. <struct name="antistable"><template>
  78. <template-type-parameter name="Comp"/>
  79. </template><method-group name="public member functions">
  80. <method name="operator()"><type>bool</type><template>
  81. <template-type-parameter name="U"/>
  82. <template-type-parameter name="V"/>
  83. </template><parameter name="u"><paramtype>const U &amp;</paramtype></parameter><parameter name="v"><paramtype>const V &amp;</paramtype></parameter></method>
  84. <method name="get" cv="const"><type>const Comp &amp;</type></method>
  85. </method-group>
  86. <constructor specifiers="explicit"><parameter name="comp"><paramtype>Comp &amp;</paramtype></parameter></constructor>
  87. <constructor><parameter name="other"><paramtype>const antistable &amp;</paramtype></parameter></constructor>
  88. <method-group name="private member functions">
  89. </method-group>
  90. <copy-assignment><type>antistable &amp;</type><parameter name=""><paramtype>const antistable &amp;</paramtype></parameter></copy-assignment>
  91. </struct><class name="inverse"><template>
  92. <template-type-parameter name="Comp"/>
  93. </template><method-group name="public member functions">
  94. <method name="operator()"><type>bool</type><template>
  95. <template-type-parameter name="T1"/>
  96. <template-type-parameter name="T2"/>
  97. </template><parameter name="l"><paramtype>const T1 &amp;</paramtype></parameter><parameter name="r"><paramtype>const T2 &amp;</paramtype></parameter></method>
  98. </method-group>
  99. <constructor/>
  100. <constructor specifiers="explicit"><parameter name="comp"><paramtype>Comp</paramtype></parameter></constructor>
  101. </class><class name="negate"><template>
  102. <template-type-parameter name="Comp"/>
  103. </template><method-group name="public member functions">
  104. <method name="operator()"><type>bool</type><template>
  105. <template-type-parameter name="T1"/>
  106. <template-type-parameter name="T2"/>
  107. </template><parameter name="l"><paramtype>const T1 &amp;</paramtype></parameter><parameter name="r"><paramtype>const T2 &amp;</paramtype></parameter></method>
  108. </method-group>
  109. <constructor/>
  110. <constructor specifiers="explicit"><parameter name="comp"><paramtype>Comp</paramtype></parameter></constructor>
  111. </class>
  112. <function name="unantistable"><type>Comp</type><template>
  113. <template-type-parameter name="Comp"/>
  114. </template><parameter name="comp"><paramtype>Comp</paramtype></parameter></function>
  115. <function name="unantistable"><type>Comp</type><template>
  116. <template-type-parameter name="Comp"/>
  117. </template><parameter name="comp"><paramtype>antistable&lt; Comp &gt;</paramtype></parameter></function>
  118. </namespace>
  119. </namespace>
  120. </header>
  121. <header name="boost/move/algo/unique.hpp">
  122. <namespace name="boost">
  123. <namespace name="movelib">
  124. <function name="unique"><type>ForwardIterator</type><template>
  125. <template-type-parameter name="ForwardIterator"/>
  126. <template-type-parameter name="BinaryPredicate"/>
  127. </template><parameter name="first"><paramtype>ForwardIterator</paramtype></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype></parameter><parameter name="pred"><paramtype>BinaryPredicate</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: The comparison function shall be an equivalence relation. The type of *first shall satisfy the MoveAssignable requirements</para><para><emphasis role="bold">Effects</emphasis>: For a nonempty range, eliminates all but the first element from every consecutive group of equivalent elements referred to by the iterator i in the range [first + 1, last) for which the following conditions hold: pred(*(i - 1), *i) != false.</para><para><emphasis role="bold">Returns</emphasis>: The end of the resulting range.</para><para><emphasis role="bold">Complexity</emphasis>: For nonempty ranges, exactly (last - first) - 1 applications of the corresponding predicate. </para></description></function>
  128. </namespace>
  129. </namespace>
  130. </header>
  131. <header name="boost/move/algorithm.hpp">
  132. <namespace name="boost">
  133. <function name="uninitialized_copy_or_move"><type>F</type><template>
  134. <template-type-parameter name="I"/>
  135. <template-type-parameter name="F"/>
  136. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="r"><paramtype>F</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></function>
  137. <function name="copy_or_move"><type>F</type><template>
  138. <template-type-parameter name="I"/>
  139. <template-type-parameter name="F"/>
  140. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="r"><paramtype>F</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></function>
  141. <function name="uninitialized_copy_or_move"><type>F</type><template>
  142. <template-type-parameter name="I"/>
  143. <template-type-parameter name="F"/>
  144. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="r"><paramtype>F</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: <programlisting language="c++">for (; first != last; ++result, ++first)
  145. new (static_cast&lt;void*&gt;(&amp;*result))
  146. typename iterator_traits&lt;ForwardIterator&gt;::value_type(*first);
  147. </programlisting></para><para><emphasis role="bold">Returns</emphasis>: result</para><para><emphasis role="bold">Note</emphasis>: This function is provided because <emphasis>std::uninitialized_copy</emphasis> from some STL implementations is not compatible with <emphasis><classname alt="boost::move_iterator">move_iterator</classname></emphasis> </para></description></function>
  148. <function name="copy_or_move"><type>F</type><template>
  149. <template-type-parameter name="I"/>
  150. <template-type-parameter name="F"/>
  151. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="r"><paramtype>F</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: <programlisting language="c++">for (; first != last; ++result, ++first)
  152. *result = *first;
  153. </programlisting></para><para><emphasis role="bold">Returns</emphasis>: result</para><para><emphasis role="bold">Note</emphasis>: This function is provided because <emphasis>std::uninitialized_copy</emphasis> from some STL implementations is not compatible with <emphasis><classname alt="boost::move_iterator">move_iterator</classname></emphasis> </para></description></function>
  154. </namespace>
  155. </header>
  156. <header name="boost/move/core.hpp">
  157. <para>This header implements macros to define movable classes and move-aware functions </para><namespace name="boost">
  158. <struct name="has_move_emulation_disabled"><template>
  159. <template-type-parameter name="T"/>
  160. </template><data-member name="value" specifiers="static"><type>const bool</type></data-member>
  161. </struct><struct name="has_move_emulation_enabled"><template>
  162. <template-type-parameter name="T"/>
  163. </template><description><para>This trait yields to a compile-time true boolean if T was marked as BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and rvalue references are not available on the platform. False otherwise. </para></description><data-member name="value" specifiers="static"><type>const bool</type></data-member>
  164. </struct>
  165. </namespace>
  166. <macro name="BOOST_MOVABLE_BUT_NOT_COPYABLE" kind="functionlike"><macro-parameter name="TYPE"/><description><para>This macro marks a type as movable but not copyable, disabling copy construction and assignment. The user will need to write a move constructor/assignment as explained in the documentation to fully write a movable but not copyable class. </para></description></macro>
  167. <macro name="BOOST_COPYABLE_AND_MOVABLE" kind="functionlike"><macro-parameter name="TYPE"/><description><para>This macro marks a type as copyable and movable. The user will need to write a move constructor/assignment and a copy assignment as explained in the documentation to fully write a copyable and movable class. </para></description></macro>
  168. <macro name="BOOST_RV_REF" kind="functionlike"><macro-parameter name="TYPE"/><description><para>This macro is used to achieve portable syntax in move constructors and assignments for classes marked as BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE </para></description></macro>
  169. <macro name="BOOST_RV_REF_BEG"><description><para>This macro is used to achieve portable syntax in move constructors and assignments for template classes marked as BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. As macros have problems with comma-separated template arguments, the template argument must be preceded with BOOST_RV_REF_BEG and ended with BOOST_RV_REF_END </para></description></macro>
  170. <macro name="BOOST_RV_REF_END"><description><para>This macro is used to achieve portable syntax in move constructors and assignments for template classes marked as BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. As macros have problems with comma-separated template arguments, the template argument must be preceded with BOOST_RV_REF_BEG and ended with BOOST_RV_REF_END </para></description></macro>
  171. <macro name="BOOST_RV_REF_BEG_IF_CXX11"><description><para>This macro expands to BOOST_RV_REF_BEG if BOOST_NO_CXX11_RVALUE_REFERENCES is not defined, empty otherwise </para></description></macro>
  172. <macro name="BOOST_RV_REF_END_IF_CXX11"><description><para>This macro expands to BOOST_RV_REF_END if BOOST_NO_CXX11_RVALUE_REFERENCES is not defined, empty otherwise </para></description></macro>
  173. <macro name="BOOST_COPY_ASSIGN_REF" kind="functionlike"><macro-parameter name="TYPE"/><description><para>This macro is used to achieve portable syntax in copy assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE. </para></description></macro>
  174. <macro name="BOOST_FWD_REF" kind="functionlike"><macro-parameter name="TYPE"/><description><para>This macro is used to implement portable perfect forwarding as explained in the documentation. </para></description></macro>
  175. <macro name="BOOST_MOVE_RET" kind="functionlike"><macro-parameter name="RET_TYPE"/><macro-parameter name="REF"/><description><para>This macro is used to achieve portable move return semantics. The C++11 Standard allows implicit move returns when the object to be returned is designated by a lvalue and:<itemizedlist>
  176. <listitem><para>The criteria for elision of a copy operation are met OR</para>
  177. </listitem><listitem><para>The criteria would be met save for the fact that the source object is a function parameter</para>
  178. </listitem></itemizedlist>
  179. </para><para>For C++11 conforming compilers this macros only yields to REF: <computeroutput>return BOOST_MOVE_RET(RET_TYPE, REF);</computeroutput> -&gt; <computeroutput>return REF;</computeroutput></para><para>For compilers without rvalue references this macro does an explicit move if the move emulation is activated and the return type (RET_TYPE) is not a reference.</para><para>For non-conforming compilers with rvalue references like Visual 2010 &amp; 2012, an explicit move is performed if RET_TYPE is not a reference.</para><para><emphasis role="bold">Caution</emphasis>: When using this macro in non-conforming or C++03 compilers, a move will be performed even if the C++11 standard does not allow it (e.g. returning a static variable). The user is responsible for using this macro only to return local objects that met C++11 criteria. </para></description></macro>
  180. <macro name="BOOST_MOVE_BASE" kind="functionlike"><macro-parameter name="BASE_TYPE"/><macro-parameter name="ARG"/><purpose>defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) </purpose><description><para>This macro is used to achieve portable optimal move constructors.</para><para>When implementing the move constructor, in C++03 compilers the moved-from argument must be cast to the base type before calling <computeroutput>boost::move()</computeroutput> due to rvalue reference limitations.</para><para>In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of a base type is implicit. </para></description></macro>
  181. </header>
  182. <header name="boost/move/default_delete.hpp">
  183. <para>Describes the default deleter (destruction policy) of <computeroutput>unique_ptr</computeroutput>: <computeroutput>default_delete</computeroutput>. </para><namespace name="boost">
  184. <namespace name="movelib">
  185. <struct name="default_delete"><template>
  186. <template-type-parameter name="T"><purpose><para>The type to be deleted. It may be an incomplete type </para></purpose></template-type-parameter>
  187. </template><description><para>The class template <computeroutput><classname alt="boost::movelib::default_delete">default_delete</classname></computeroutput> serves as the default deleter (destruction policy) for the class template <computeroutput><classname alt="boost::movelib::unique_ptr">unique_ptr</classname></computeroutput>.</para><para>
  188. </para></description><method-group name="public member functions">
  189. <method name="operator()" cv="const noexcept"><type>void</type><template>
  190. <template-type-parameter name="U"/>
  191. </template><parameter name="ptr"><paramtype>U *</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: if T is not an array type, calls <computeroutput>delete</computeroutput> on static_cast&lt;T*&gt;(ptr), otherwise calls <computeroutput>delete[]</computeroutput> on static_cast&lt;remove_extent&lt;T&gt;::type*&gt;(ptr).</para><para><emphasis role="bold">Remarks</emphasis>: If U is an incomplete type, the program is ill-formed. This operator shall not participate in overload resolution unless:<itemizedlist>
  192. <listitem><para>T is not an array type and U* is convertible to T*, OR</para>
  193. </listitem><listitem><para>T is an array type, and remove_cv&lt;U&gt;::type is the same type as remove_cv&lt;remove_extent&lt;T&gt;::type&gt;::type and U* is convertible to remove_extent&lt;T&gt;::type*. </para>
  194. </listitem></itemizedlist>
  195. </para></description></method>
  196. <method name="operator()" cv="const noexcept"><type>void</type><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Same as <computeroutput>(<emphasis>this)(static_cast&lt;element_type</emphasis>&gt;(nullptr))</computeroutput>. </para></description></method>
  197. </method-group>
  198. <constructor><description><para>Default constructor. </para></description></constructor>
  199. <constructor><parameter name=""><paramtype>const <classname>default_delete</classname> &amp;</paramtype></parameter><description><para>Trivial copy constructor </para></description></constructor>
  200. <copy-assignment><type><classname>default_delete</classname> &amp;</type><parameter name=""><paramtype>const <classname>default_delete</classname> &amp;</paramtype></parameter><description><para>Trivial assignment </para></description></copy-assignment>
  201. <constructor cv="noexcept"><template>
  202. <template-type-parameter name="U"/>
  203. </template><parameter name=""><paramtype>const <classname>default_delete</classname>&lt; U &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::default_delete">default_delete</classname> object from another <computeroutput><classname alt="boost::movelib::default_delete">default_delete</classname><underline> object.</underline></computeroutput></para><para><computeroutput><underline><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  204. <listitem><para>If T is not an array type and U* is implicitly convertible to T*.</para>
  205. </listitem><listitem><para>If T is an array type and U* is a more CV qualified pointer to remove_extent&lt;T&gt;::type. </para>
  206. </listitem></itemizedlist>
  207. </underline></computeroutput></para></description></constructor>
  208. <copy-assignment cv="noexcept"><type><classname>default_delete</classname> &amp;</type><template>
  209. <template-type-parameter name="U"/>
  210. </template><parameter name=""><paramtype>const <classname>default_delete</classname>&lt; U &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::default_delete">default_delete</classname> object from another <computeroutput><classname alt="boost::movelib::default_delete">default_delete</classname><underline> object.</underline></computeroutput></para><para><computeroutput><underline><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  211. <listitem><para>If T is not an array type and U* is implicitly convertible to T*.</para>
  212. </listitem><listitem><para>If T is an array type and U* is a more CV qualified pointer to remove_extent&lt;T&gt;::type. </para>
  213. </listitem></itemizedlist>
  214. </underline></computeroutput></para></description></copy-assignment>
  215. </struct>
  216. </namespace>
  217. </namespace>
  218. </header>
  219. <header name="boost/move/iterator.hpp">
  220. <namespace name="boost">
  221. <class name="back_move_insert_iterator"><template>
  222. <template-type-parameter name="C"/>
  223. </template><description><para>A move insert iterator that move constructs elements at the back of a container </para></description><typedef name="container_type"><type>C</type></typedef>
  224. <typedef name="value_type"><type>C::value_type</type></typedef>
  225. <typedef name="reference"><type>C::reference</type></typedef>
  226. <typedef name="pointer"><type>C::pointer</type></typedef>
  227. <typedef name="difference_type"><type>C::difference_type</type></typedef>
  228. <typedef name="iterator_category"><type>std::output_iterator_tag</type></typedef>
  229. <method-group name="public member functions">
  230. <method name="operator *"><type><classname>back_move_insert_iterator</classname> &amp;</type></method>
  231. <method name="operator++"><type><classname>back_move_insert_iterator</classname> &amp;</type></method>
  232. <method name="operator++"><type><classname>back_move_insert_iterator</classname> &amp;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  233. </method-group>
  234. <constructor specifiers="explicit"><parameter name="x"><paramtype>C &amp;</paramtype></parameter></constructor>
  235. <copy-assignment><type><classname>back_move_insert_iterator</classname> &amp;</type><parameter name="x"><paramtype>reference</paramtype></parameter></copy-assignment>
  236. <copy-assignment><type><classname>back_move_insert_iterator</classname> &amp;</type><parameter name="x"><paramtype>value_type &amp;&amp;</paramtype></parameter></copy-assignment>
  237. </class><class name="front_move_insert_iterator"><template>
  238. <template-type-parameter name="C"/>
  239. </template><description><para>A move insert iterator that move constructs elements int the front of a container </para></description><typedef name="container_type"><type>C</type></typedef>
  240. <typedef name="value_type"><type>C::value_type</type></typedef>
  241. <typedef name="reference"><type>C::reference</type></typedef>
  242. <typedef name="pointer"><type>C::pointer</type></typedef>
  243. <typedef name="difference_type"><type>C::difference_type</type></typedef>
  244. <typedef name="iterator_category"><type>std::output_iterator_tag</type></typedef>
  245. <method-group name="public member functions">
  246. <method name="operator *"><type><classname>front_move_insert_iterator</classname> &amp;</type></method>
  247. <method name="operator++"><type><classname>front_move_insert_iterator</classname> &amp;</type></method>
  248. <method name="operator++"><type><classname>front_move_insert_iterator</classname> &amp;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  249. </method-group>
  250. <constructor specifiers="explicit"><parameter name="x"><paramtype>C &amp;</paramtype></parameter></constructor>
  251. <copy-assignment><type><classname>front_move_insert_iterator</classname> &amp;</type><parameter name="x"><paramtype>reference</paramtype></parameter></copy-assignment>
  252. <copy-assignment><type><classname>front_move_insert_iterator</classname> &amp;</type><parameter name="x"><paramtype>value_type &amp;&amp;</paramtype></parameter></copy-assignment>
  253. </class><class name="move_insert_iterator"><template>
  254. <template-type-parameter name="C"/>
  255. </template><typedef name="container_type"><type>C</type></typedef>
  256. <typedef name="value_type"><type>C::value_type</type></typedef>
  257. <typedef name="reference"><type>C::reference</type></typedef>
  258. <typedef name="pointer"><type>C::pointer</type></typedef>
  259. <typedef name="difference_type"><type>C::difference_type</type></typedef>
  260. <typedef name="iterator_category"><type>std::output_iterator_tag</type></typedef>
  261. <method-group name="public member functions">
  262. <method name="operator *"><type>move_insert_iterator &amp;</type></method>
  263. <method name="operator++"><type>move_insert_iterator &amp;</type></method>
  264. <method name="operator++"><type>move_insert_iterator &amp;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  265. </method-group>
  266. <constructor specifiers="explicit"><parameter name="x"><paramtype>C &amp;</paramtype></parameter><parameter name="pos"><paramtype>typename C::iterator</paramtype></parameter></constructor>
  267. <copy-assignment><type>move_insert_iterator &amp;</type><parameter name="x"><paramtype>reference</paramtype></parameter></copy-assignment>
  268. <copy-assignment><type>move_insert_iterator &amp;</type><parameter name="x"><paramtype>value_type &amp;&amp;</paramtype></parameter></copy-assignment>
  269. </class><class name="move_iterator"><template>
  270. <template-type-parameter name="It"/>
  271. </template><description><para>Class template <classname alt="boost::move_iterator">move_iterator</classname> is an iterator adaptor with the same behavior as the underlying iterator except that its dereference operator implicitly converts the value returned by the underlying iterator's dereference operator to an rvalue reference. Some generic algorithms can be called with move iterators to replace copying with moving. </para></description><typedef name="iterator_type"><type>It</type></typedef>
  272. <typedef name="value_type"><type>boost::movelib::iterator_traits&lt; iterator_type &gt;::value_type</type></typedef>
  273. <typedef name="reference"><type>value_type &amp;&amp;</type></typedef>
  274. <typedef name="pointer"><type>It</type></typedef>
  275. <typedef name="difference_type"><type>boost::movelib::iterator_traits&lt; iterator_type &gt;::difference_type</type></typedef>
  276. <typedef name="iterator_category"><type>boost::movelib::iterator_traits&lt; iterator_type &gt;::iterator_category</type></typedef>
  277. <method-group name="public member functions">
  278. <method name="operator *" cv="const"><type>reference</type></method>
  279. <method name="operator-&gt;" cv="const"><type>pointer</type></method>
  280. <method name="operator++"><type><classname>move_iterator</classname> &amp;</type></method>
  281. <method name="operator++"><type><classname>move_iterator</classname>&lt; iterator_type &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  282. <method name="operator--"><type><classname>move_iterator</classname> &amp;</type></method>
  283. <method name="operator--"><type><classname>move_iterator</classname>&lt; iterator_type &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  284. <method name="operator+" cv="const"><type><classname>move_iterator</classname>&lt; iterator_type &gt;</type><parameter name="n"><paramtype>difference_type</paramtype></parameter></method>
  285. <method name="operator+="><type><classname>move_iterator</classname> &amp;</type><parameter name="n"><paramtype>difference_type</paramtype></parameter></method>
  286. <method name="operator-" cv="const"><type><classname>move_iterator</classname>&lt; iterator_type &gt;</type><parameter name="n"><paramtype>difference_type</paramtype></parameter></method>
  287. <method name="operator-="><type><classname>move_iterator</classname> &amp;</type><parameter name="n"><paramtype>difference_type</paramtype></parameter></method>
  288. <method name="operator[]" cv="const"><type>reference</type><parameter name="n"><paramtype>difference_type</paramtype></parameter></method>
  289. </method-group>
  290. <constructor/>
  291. <constructor specifiers="explicit"><parameter name="i"><paramtype>const It &amp;</paramtype></parameter></constructor>
  292. <constructor><template>
  293. <template-type-parameter name="U"/>
  294. </template><parameter name="u"><paramtype>const <classname>move_iterator</classname>&lt; U &gt; &amp;</paramtype></parameter></constructor>
  295. </class>
  296. <function name="make_move_iterator"><type><classname>move_iterator</classname>&lt; It &gt;</type><template>
  297. <template-type-parameter name="It"/>
  298. </template><parameter name="it"><paramtype>const It &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: move_iterator&lt;It&gt;(i). </para></description></function>
  299. <function name="back_move_inserter"><type><classname>back_move_insert_iterator</classname>&lt; C &gt;</type><template>
  300. <template-type-parameter name="C"/>
  301. </template><parameter name="x"><paramtype>C &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: back_move_insert_iterator&lt;C&gt;(x). </para></description></function>
  302. <function name="front_move_inserter"><type><classname>front_move_insert_iterator</classname>&lt; C &gt;</type><template>
  303. <template-type-parameter name="C"/>
  304. </template><parameter name="x"><paramtype>C &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: front_move_insert_iterator&lt;C&gt;(x). </para></description></function>
  305. <function name="move_inserter"><type>move_insert_iterator&lt; C &gt;</type><template>
  306. <template-type-parameter name="C"/>
  307. </template><parameter name="x"><paramtype>C &amp;</paramtype></parameter><parameter name="it"><paramtype>typename C::iterator</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: move_insert_iterator&lt;C&gt;(x, it). </para></description></function>
  308. </namespace>
  309. </header>
  310. <header name="boost/move/make_unique.hpp">
  311. <para>Defines "make_unique" functions, which are factories to create instances of unique_ptr depending on the passed arguments.</para><para>This header can be a bit heavyweight in C++03 compilers due to the use of the preprocessor library, that's why it's a a separate header from <computeroutput>unique_ptr.hpp</computeroutput> </para><namespace name="boost">
  312. <namespace name="movelib">
  313. <function name="make_unique"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  314. <template-type-parameter name="T"/>
  315. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  316. </template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is not an array.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new T(std::forward&lt;Args&gt;(args)...))</computeroutput>. </para></description></function>
  317. <function name="make_unique_nothrow"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  318. <template-type-parameter name="T"/>
  319. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  320. </template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is not an array.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new T(std::nothrow)(std::forward&lt;Args&gt;(args)...))</computeroutput>. </para></description></function>
  321. <function name="make_unique_definit"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  322. <template-type-parameter name="T"/>
  323. </template><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is not an array.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new T)</computeroutput> (default initialization) </para></description></function>
  324. <function name="make_unique_nothrow_definit"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  325. <template-type-parameter name="T"/>
  326. </template><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is not an array.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new T(std::nothrow)</computeroutput> (default initialization) </para></description></function>
  327. <function name="make_unique"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  328. <template-type-parameter name="T"/>
  329. </template><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of unknown bound.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new remove_extent_t&lt;T&gt;[n]())</computeroutput> (value initialization) </para></description></function>
  330. <function name="make_unique_nothrow"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  331. <template-type-parameter name="T"/>
  332. </template><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of unknown bound.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new (std::nothrow)remove_extent_t&lt;T&gt;[n]())</computeroutput> (value initialization) </para></description></function>
  333. <function name="make_unique_definit"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  334. <template-type-parameter name="T"/>
  335. </template><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of unknown bound.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new remove_extent_t&lt;T&gt;[n])</computeroutput> (default initialization) </para></description></function>
  336. <function name="make_unique_nothrow_definit"><type><classname>unique_ptr</classname>&lt; T &gt;</type><template>
  337. <template-type-parameter name="T"/>
  338. </template><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of unknown bound.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>unique_ptr&lt;T&gt;(new (std::nothrow)remove_extent_t&lt;T&gt;[n])</computeroutput> (default initialization) </para></description></function>
  339. <function name="make_unique"><type>unspecified</type><template>
  340. <template-type-parameter name="T"/>
  341. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  342. </template><parameter name="..."><paramtype>Args &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of known bound. </para></description></function>
  343. <function name="make_unique_definit"><type>unspecified</type><template>
  344. <template-type-parameter name="T"/>
  345. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  346. </template><parameter name="..."><paramtype>Args &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of known bound. </para></description></function>
  347. <function name="make_unique_nothrow"><type>unspecified</type><template>
  348. <template-type-parameter name="T"/>
  349. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  350. </template><parameter name="..."><paramtype>Args &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of known bound. </para></description></function>
  351. <function name="make_unique_nothrow_definit"><type>unspecified</type><template>
  352. <template-type-parameter name="T"/>
  353. <template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
  354. </template><parameter name="..."><paramtype>Args &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Remarks</emphasis>: This function shall not participate in overload resolution unless T is an array of known bound. </para></description></function>
  355. </namespace>
  356. </namespace>
  357. </header>
  358. <header name="boost/move/move.hpp">
  359. <para>A general library header that includes the rest of top-level headers. </para></header>
  360. <header name="boost/move/algo/move.hpp">
  361. <namespace name="boost">
  362. <function name="move"><type>O</type><template>
  363. <template-type-parameter name="I"/>
  364. <template-type-parameter name="O"/>
  365. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="result"><paramtype>O</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves elements in the range [first,last) into the range [result,result + (last - first)) starting from first and proceeding to last. For each non-negative integer n &lt; (last-first), performs *(result + n) = boost::move (*(first + n)).</para><para><emphasis role="bold">Effects</emphasis>: result + (last - first).</para><para><emphasis role="bold">Requires</emphasis>: result shall not be in the range [first,last).</para><para><emphasis role="bold">Complexity</emphasis>: Exactly last - first move assignments. </para></description></function>
  366. <function name="move_backward"><type>O</type><template>
  367. <template-type-parameter name="I"/>
  368. <template-type-parameter name="O"/>
  369. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="result"><paramtype>O</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves elements in the range [first,last) into the range [result - (last-first),result) starting from last - 1 and proceeding to first. For each positive integer n &lt;= (last - first), performs *(result - n) = boost::move(*(last - n)).</para><para><emphasis role="bold">Requires</emphasis>: result shall not be in the range [first,last).</para><para><emphasis role="bold">Returns</emphasis>: result - (last - first).</para><para><emphasis role="bold">Complexity</emphasis>: Exactly last - first assignments. </para></description></function>
  370. <function name="uninitialized_move"><type>F</type><template>
  371. <template-type-parameter name="I"/>
  372. <template-type-parameter name="F"/>
  373. </template><parameter name="f"><paramtype>I</paramtype></parameter><parameter name="l"><paramtype>I</paramtype></parameter><parameter name="r"><paramtype>F</paramtype></parameter><purpose>defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) </purpose><description><para><emphasis role="bold">Effects</emphasis>: <programlisting language="c++">for (; first != last; ++result, ++first)
  374. new (static_cast&lt;void*&gt;(&amp;*result))
  375. typename iterator_traits&lt;ForwardIterator&gt;::value_type(boost::move(*first));
  376. </programlisting></para><para><emphasis role="bold">Returns</emphasis>: result </para></description></function>
  377. </namespace>
  378. </header>
  379. <header name="boost/move/traits.hpp">
  380. <namespace name="boost">
  381. <struct name="has_nothrow_move"><template>
  382. <template-type-parameter name="T"/>
  383. </template><description><programlisting>boost::is_nothrow_move_constructible&lt;T&gt;::value &amp;&amp; boost::is_nothrow_move_assignable&lt;T&gt;::value </programlisting></description><data-member name="value" specifiers="static"><type>const bool</type></data-member>
  384. </struct><struct name="has_trivial_destructor_after_move"><template>
  385. <template-type-parameter name="T"/>
  386. </template><description><para>If this trait yields to true (<emphasis><classname alt="boost::has_trivial_destructor_after_move">has_trivial_destructor_after_move</classname> &lt;T&gt;::value == true</emphasis>) means that if T is used as argument of a move construction/assignment, there is no need to call T's destructor. This optimization tipically is used to improve containers' performance.</para><para>By default this trait is true if the type has trivial destructor, every class should specialize this trait if it wants to improve performance when inserted in containers. </para></description></struct>
  387. </namespace>
  388. </header>
  389. <header name="boost/move/unique_ptr.hpp">
  390. <para>Describes the smart pointer unique_ptr, a drop-in replacement for std::unique_ptr, usable also from C++03 compilers.</para><para>Main differences from std::unique_ptr to avoid heavy dependencies, specially in C++03 compilers:<itemizedlist>
  391. <listitem><para><computeroutput>operator &lt; </computeroutput> uses pointer <computeroutput>operator &lt; </computeroutput>instead of <computeroutput>std::less&lt;common_type&gt;</computeroutput>. This avoids dependencies on <computeroutput>std::common_type</computeroutput> and <computeroutput>std::less</computeroutput> (<computeroutput>&lt;type_traits&gt;/&lt;functional&gt;</computeroutput> headers). In C++03 this avoid pulling Boost.Typeof and other cascading dependencies. As in all Boost platforms <computeroutput>operator &lt;</computeroutput> on raw pointers and other smart pointers provides strict weak ordering in practice this should not be a problem for users.</para>
  392. </listitem><listitem><para>assignable from literal 0 for compilers without nullptr</para>
  393. </listitem><listitem><para><computeroutput>unique_ptr&lt;T[]&gt;</computeroutput> is constructible and assignable from <computeroutput>unique_ptr&lt;U[]&gt;</computeroutput> if cv-less T and cv-less U are the same type and T is more CV qualified than U. </para>
  394. </listitem></itemizedlist>
  395. </para><namespace name="boost">
  396. <namespace name="movelib">
  397. <class name="unique_ptr"><template>
  398. <template-type-parameter name="T"><purpose><para>Provides the type of the stored pointer. </para></purpose></template-type-parameter>
  399. <template-type-parameter name="D"><default><classname alt="boost::movelib::default_delete">default_delete</classname>&lt;T&gt;</default><purpose><para>The deleter type:<itemizedlist>
  400. <listitem><para>The default type for the template parameter D is <classname alt="boost::movelib::default_delete">default_delete</classname>. A client-supplied template argument D shall be a function object type, lvalue-reference to function, or lvalue-reference to function object type for which, given a value d of type D and a value ptr of type unique_ptr&lt;T, D&gt;::pointer, the expression d(ptr) is valid and has the effect of disposing of the pointer as appropriate for that deleter.</para>
  401. </listitem><listitem><para>If the deleter's type D is not a reference type, D shall satisfy the requirements of Destructible.</para>
  402. </listitem><listitem><para>If the type <computeroutput>remove_reference&lt;D&gt;::type::pointer</computeroutput> exists, it shall satisfy the requirements of NullablePointer. </para>
  403. </listitem></itemizedlist>
  404. </para></purpose></template-type-parameter>
  405. </template><description><para>A unique pointer is an object that owns another object and manages that other object through a pointer.</para><para>More precisely, a unique pointer is an object u that stores a pointer to a second object p and will dispose of p when u is itself destroyed (e.g., when leaving block scope). In this context, u is said to own p.</para><para>The mechanism by which u disposes of p is known as p's associated deleter, a function object whose correct invocation results in p's appropriate disposition (typically its deletion).</para><para>Let the notation u.p denote the pointer stored by u, and let u.d denote the associated deleter. Upon request, u can reset (replace) u.p and u.d with another pointer and deleter, but must properly dispose of its owned object via the associated deleter before such replacement is considered completed.</para><para>Additionally, u can, upon request, transfer ownership to another unique pointer u2. Upon completion of such a transfer, the following postconditions hold:<itemizedlist>
  406. <listitem><para>u2.p is equal to the pre-transfer u.p,</para>
  407. </listitem><listitem><para>u.p is equal to nullptr, and</para>
  408. </listitem><listitem><para>if the pre-transfer u.d maintained state, such state has been transferred to u2.d.</para>
  409. </listitem></itemizedlist>
  410. </para><para>As in the case of a reset, u2 must properly dispose of its pre-transfer owned object via the pre-transfer associated deleter before the ownership transfer is considered complete.</para><para>Each object of a type U instantiated from the <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> template specified in this subclause has the strict ownership semantics, specified above, of a unique pointer. In partial satisfaction of these semantics, each such U is MoveConstructible and MoveAssignable, but is not CopyConstructible nor CopyAssignable. The template parameter T of <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> may be an incomplete type.</para><para>The uses of <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> include providing exception safety for dynamically allocated memory, passing ownership of dynamically allocated memory to a function, and returning dynamically allocated memory from a function.</para><para>If T is an array type (e.g. unique_ptr&lt;MyType[]&gt;) the interface is slightly altered:<itemizedlist>
  411. <listitem><para>Pointers to types derived from T are rejected by the constructors, and by reset.</para>
  412. </listitem><listitem><para>The observers <computeroutput>operator*</computeroutput> and <computeroutput>operator-&gt;</computeroutput> are not provided.</para>
  413. </listitem><listitem><para>The indexing observer <computeroutput>operator[]</computeroutput> is provided.</para>
  414. </listitem></itemizedlist>
  415. </para><para>
  416. </para></description><typedef name="pointer"><description><para>If the type <computeroutput>remove_reference&lt;D&gt;::type::pointer</computeroutput> exists, then it shall be a synonym for <computeroutput>remove_reference&lt;D&gt;::type::pointer</computeroutput>. Otherwise it shall be a synonym for T*. </para></description><type>see_documentation</type></typedef>
  417. <typedef name="element_type"><description><para>If T is an array type, then element_type is equal to T. Otherwise, if T is a type in the form U[], element_type is equal to U. </para></description><type>see_documentation</type></typedef>
  418. <typedef name="deleter_type"><type>D</type></typedef>
  419. <method-group name="public member functions">
  420. <method name="operator *" cv="const noexcept"><type>element_type &amp;</type><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>get() != nullptr</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>*get()</computeroutput>.</para><para><emphasis role="bold">Remarks&lt;/b: If T is an array type, the program is ill-formed. </emphasis></para></description></method>
  421. <method name="operator[]" cv="const noexcept"><type>element_type &amp;</type><parameter name="i"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: i &lt; the number of elements in the array to which the stored pointer points.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>get()[i]</computeroutput>.</para><para><emphasis role="bold">Remarks&lt;/b: If T is not an array type, the program is ill-formed. </emphasis></para></description></method>
  422. <method name="operator-&gt;" cv="const noexcept"><type>pointer</type><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>get() != nullptr</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: <computeroutput>get()</computeroutput>.</para><para><emphasis role="bold">Note</emphasis>: use typically requires that T be a complete type.</para><para><emphasis role="bold">Remarks&lt;/b: If T is an array type, the program is ill-formed. </emphasis></para></description></method>
  423. <method name="get" cv="const noexcept"><type>pointer</type><description><para><emphasis role="bold">Returns</emphasis>: The stored pointer. </para></description></method>
  424. <method name="get_deleter" cv="noexcept"><type>D &amp;</type><description><para><emphasis role="bold">Returns</emphasis>: A reference to the stored deleter. </para></description></method>
  425. <method name="get_deleter" cv="const noexcept"><type>const D &amp;</type><description><para><emphasis role="bold">Returns</emphasis>: A reference to the stored deleter. </para></description></method>
  426. <method name="conversion-operator" cv="const noexcept" specifiers="explicit"><type>bool</type><description><para><emphasis role="bold">Returns</emphasis>: Returns: get() != nullptr. </para></description></method>
  427. <method name="release" cv="noexcept"><type>pointer</type><description><para><emphasis role="bold">Postcondition</emphasis>: <computeroutput>get() == nullptr</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: The value <computeroutput>get()</computeroutput> had at the start of the call to release. </para></description></method>
  428. <method name="reset" cv="noexcept"><type>void</type><template>
  429. <template-type-parameter name="Pointer"/>
  430. </template><parameter name="p"><paramtype>Pointer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: The expression <computeroutput>get_deleter()(get())</computeroutput> shall be well formed, shall have well-defined behavior, and shall not throw exceptions.</para><para><emphasis role="bold">Effects</emphasis>: assigns p to the stored pointer, and then if the old value of the stored pointer, old_p, was not equal to nullptr, calls <computeroutput>get_deleter()(old_p)</computeroutput>. Note: The order of these operations is significant because the call to <computeroutput>get_deleter()</computeroutput> may destroy *this.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == p</computeroutput>. Note: The postcondition does not hold if the call to <computeroutput>get_deleter()</computeroutput> destroys *this since <computeroutput>this-&gt;get()</computeroutput> is no longer a valid expression.</para><para><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  431. <listitem><para>If T is not an array type and Pointer is implicitly convertible to pointer.</para>
  432. </listitem><listitem><para>If T is an array type and Pointer is a more CV qualified pointer to element_type. </para>
  433. </listitem></itemizedlist>
  434. </para></description></method>
  435. <method name="reset" cv="noexcept"><type>void</type><description><para><emphasis role="bold">Requires</emphasis>: The expression <computeroutput>get_deleter()(get())</computeroutput> shall be well formed, shall have well-defined behavior, and shall not throw exceptions.</para><para><emphasis role="bold">Effects</emphasis>: assigns nullptr to the stored pointer, and then if the old value of the stored pointer, old_p, was not equal to nullptr, calls <computeroutput>get_deleter()(old_p)</computeroutput>. Note: The order of these operations is significant because the call to <computeroutput>get_deleter()</computeroutput> may destroy *this.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == p</computeroutput>. Note: The postcondition does not hold if the call to <computeroutput>get_deleter()</computeroutput> destroys *this since <computeroutput>this-&gt;get()</computeroutput> is no longer a valid expression. </para></description></method>
  436. <method name="reset" cv="noexcept"><type>void</type><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Same as <computeroutput>reset()</computeroutput> </para></description></method>
  437. <method name="swap" cv="noexcept"><type>void</type><parameter name="u"><paramtype><classname>unique_ptr</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>get_deleter()</computeroutput> shall be swappable and shall not throw an exception under swap.</para><para><emphasis role="bold">Effects</emphasis>: Invokes swap on the stored pointers and on the stored deleters of *this and u. </para></description></method>
  438. </method-group>
  439. <constructor cv="= delete"><parameter name=""><paramtype>const <classname>unique_ptr</classname> &amp;</paramtype></parameter></constructor>
  440. <copy-assignment cv="= delete"><type><classname>unique_ptr</classname> &amp;</type><parameter name=""><paramtype>const <classname>unique_ptr</classname> &amp;</paramtype></parameter></copy-assignment>
  441. <constructor cv="noexcept"><description><para><emphasis role="bold">Requires</emphasis>: D shall satisfy the requirements of DefaultConstructible, and that construction shall not throw an exception.</para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> object that owns nothing, value-initializing the stored pointer and the stored deleter.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == nullptr</computeroutput>. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter.</para><para><emphasis role="bold">Remarks</emphasis>: If this constructor is instantiated with a pointer type or reference type for the template argument D, the program is ill-formed. </para></description></constructor>
  442. <constructor cv="noexcept"><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Same as <computeroutput>unique_ptr()</computeroutput> (default constructor). </para></description></constructor>
  443. <constructor specifiers="explicit" cv="noexcept"><template>
  444. <template-type-parameter name="Pointer"/>
  445. </template><parameter name="p"><paramtype>Pointer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: D shall satisfy the requirements of DefaultConstructible, and that construction shall not throw an exception.</para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> which owns p, initializing the stored pointer with p and value initializing the stored deleter.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == p</computeroutput>. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter.</para><para><emphasis role="bold">Remarks</emphasis>: If this constructor is instantiated with a pointer type or reference type for the template argument D, the program is ill-formed. This constructor shall not participate in overload resolution unless:<itemizedlist>
  446. <listitem><para>If T is not an array type and Pointer is implicitly convertible to pointer.</para>
  447. </listitem><listitem><para>If T is an array type and Pointer is a more CV qualified pointer to element_type. </para>
  448. </listitem></itemizedlist>
  449. </para></description></constructor>
  450. <constructor cv="noexcept"><template>
  451. <template-type-parameter name="Pointer"/>
  452. </template><parameter name="p"><paramtype>Pointer</paramtype></parameter><parameter name="d1"><paramtype>see_documentation</paramtype></parameter><description><para>The signature of this constructor depends upon whether D is a reference type.<itemizedlist>
  453. <listitem><para>If D is non-reference type A, then the signature is <computeroutput>unique_ptr(pointer p, const A&amp; d)</computeroutput>.</para>
  454. </listitem><listitem><para>If D is an lvalue-reference type A&amp;, then the signature is <computeroutput>unique_ptr(pointer p, A&amp; d)</computeroutput>.</para>
  455. </listitem><listitem><para>If D is an lvalue-reference type const A&amp;, then the signature is <computeroutput>unique_ptr(pointer p, const A&amp; d)</computeroutput>.</para>
  456. </listitem></itemizedlist>
  457. </para><para><emphasis role="bold">Requires</emphasis>: Either<itemizedlist>
  458. <listitem><para>D is not an lvalue-reference type and d is an lvalue or const rvalue. D shall satisfy the requirements of CopyConstructible, and the copy constructor of D shall not throw an exception. This <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> will hold a copy of d.</para>
  459. </listitem><listitem><para>D is an lvalue-reference type and d is an lvalue. the type which D references need not be CopyConstructible nor MoveConstructible. This <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> will hold a D which refers to the lvalue d.</para>
  460. </listitem></itemizedlist>
  461. </para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> object which owns p, initializing the stored pointer with p and initializing the deleter as described above.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == p</computeroutput>. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter. If D is a reference type then <computeroutput>get_deleter()</computeroutput> returns a reference to the lvalue d.</para><para><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  462. <listitem><para>If T is not an array type and Pointer is implicitly convertible to pointer.</para>
  463. </listitem><listitem><para>If T is an array type and Pointer is a more CV qualified pointer to element_type. </para>
  464. </listitem></itemizedlist>
  465. </para></description></constructor>
  466. <constructor cv="noexcept"><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="d1"><paramtype>see_documentation</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Same effects as <computeroutput>template&lt;class Pointer&gt; unique_ptr(Pointer p, deleter_arg_type1 d1)</computeroutput> and additionally <computeroutput>get() == nullptr</computeroutput> </para></description></constructor>
  467. <constructor cv="noexcept"><template>
  468. <template-type-parameter name="Pointer"/>
  469. </template><parameter name="p"><paramtype>Pointer</paramtype></parameter><parameter name="d2"><paramtype>see_documentation</paramtype></parameter><description><para>The signature of this constructor depends upon whether D is a reference type.<itemizedlist>
  470. <listitem><para>If D is non-reference type A, then the signature is <computeroutput>unique_ptr(pointer p, A&amp;&amp; d)</computeroutput>.</para>
  471. </listitem><listitem><para>If D is an lvalue-reference type A&amp;, then the signature is <computeroutput>unique_ptr(pointer p, A&amp;&amp; d)</computeroutput>.</para>
  472. </listitem><listitem><para>If D is an lvalue-reference type const A&amp;, then the signature is <computeroutput>unique_ptr(pointer p, const A&amp;&amp; d)</computeroutput>.</para>
  473. </listitem></itemizedlist>
  474. </para><para><emphasis role="bold">Requires</emphasis>: Either<itemizedlist>
  475. <listitem><para>D is not an lvalue-reference type and d is a non-const rvalue. D shall satisfy the requirements of MoveConstructible, and the move constructor of D shall not throw an exception. This <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> will hold a value move constructed from d.</para>
  476. </listitem><listitem><para>D is an lvalue-reference type and d is an rvalue, the program is ill-formed.</para>
  477. </listitem></itemizedlist>
  478. </para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> object which owns p, initializing the stored pointer with p and initializing the deleter as described above.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get() == p</computeroutput>. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter. If D is a reference type then <computeroutput>get_deleter()</computeroutput> returns a reference to the lvalue d.</para><para><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  479. <listitem><para>If T is not an array type and Pointer is implicitly convertible to pointer.</para>
  480. </listitem><listitem><para>If T is an array type and Pointer is a more CV qualified pointer to element_type. </para>
  481. </listitem></itemizedlist>
  482. </para></description></constructor>
  483. <constructor cv="noexcept"><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="d2"><paramtype>see_documentation</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Same effects as <computeroutput>template&lt;class Pointer&gt; unique_ptr(Pointer p, deleter_arg_type2 d2)</computeroutput> and additionally <computeroutput>get() == nullptr</computeroutput> </para></description></constructor>
  484. <constructor cv="noexcept"><parameter name="u"><paramtype><classname>unique_ptr</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: If D is not a reference type, D shall satisfy the requirements of MoveConstructible. Construction of the deleter from an rvalue of type D shall not throw an exception.</para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> by transferring ownership from u to *this. If D is a reference type, this deleter is copy constructed from u's deleter; otherwise, this deleter is move constructed from u's deleter.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get()</computeroutput> yields the value u.get() yielded before the construction. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter that was constructed from u.get_deleter(). If D is a reference type then <computeroutput>get_deleter()</computeroutput> and <computeroutput>u.get_deleter()</computeroutput> both reference the same lvalue deleter. </para></description></constructor>
  485. <constructor cv="noexcept"><template>
  486. <template-type-parameter name="U"/>
  487. <template-type-parameter name="E"/>
  488. </template><parameter name="u"><paramtype>BOOST_RV_REF_BEG_IF_CXX11 <classname>unique_ptr</classname>&lt; U, E &gt; BOOST_RV_REF_END_IF_CXX11</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: If E is not a reference type, construction of the deleter from an rvalue of type E shall be well formed and shall not throw an exception. Otherwise, E is a reference type and construction of the deleter from an lvalue of type E shall be well formed and shall not throw an exception.</para><para><emphasis role="bold">Remarks</emphasis>: This constructor shall not participate in overload resolution unless:<itemizedlist>
  489. <listitem><para><computeroutput>unique_ptr&lt;U, E&gt;::pointer</computeroutput> is implicitly convertible to pointer,</para>
  490. </listitem><listitem><para>U is not an array type, and</para>
  491. </listitem><listitem><para>either D is a reference type and E is the same type as D, or D is not a reference type and E is implicitly convertible to D.</para>
  492. </listitem></itemizedlist>
  493. </para><para><emphasis role="bold">Effects</emphasis>: Constructs a <classname alt="boost::movelib::unique_ptr">unique_ptr</classname> by transferring ownership from u to *this. If E is a reference type, this deleter is copy constructed from u's deleter; otherwise, this deleter is move constructed from u's deleter.</para><para><emphasis role="bold">Postconditions</emphasis>: <computeroutput>get()</computeroutput> yields the value <computeroutput>u.get()</computeroutput> yielded before the construction. <computeroutput>get_deleter()</computeroutput> returns a reference to the stored deleter that was constructed from <computeroutput>u.get_deleter()</computeroutput>. </para></description></constructor>
  494. <destructor><description><para><emphasis role="bold">Requires</emphasis>: The expression <computeroutput>get_deleter()(get())</computeroutput> shall be well formed, shall have well-defined behavior, and shall not throw exceptions.</para><para><emphasis role="bold">Effects</emphasis>: If <computeroutput>get() == nullpt1r</computeroutput> there are no effects. Otherwise <computeroutput>get_deleter()(get())</computeroutput>.</para><para><emphasis role="bold">Note</emphasis>: The use of <classname alt="boost::movelib::default_delete">default_delete</classname> requires T to be a complete type </para></description></destructor>
  495. <copy-assignment cv="noexcept"><type><classname>unique_ptr</classname> &amp;</type><parameter name="u"><paramtype><classname>unique_ptr</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: If D is not a reference type, D shall satisfy the requirements of MoveAssignable and assignment of the deleter from an rvalue of type D shall not throw an exception. Otherwise, D is a reference type; <computeroutput>remove_reference&lt;D&gt;::type</computeroutput> shall satisfy the CopyAssignable requirements and assignment of the deleter from an lvalue of type D shall not throw an exception.</para><para><emphasis role="bold">Effects</emphasis>: Transfers ownership from u to *this as if by calling <computeroutput>reset(u.release())</computeroutput> followed by <computeroutput>get_deleter() = std::forward&lt;D&gt;(u.get_deleter())</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: *this. </para></description></copy-assignment>
  496. <copy-assignment cv="noexcept"><type><classname>unique_ptr</classname> &amp;</type><template>
  497. <template-type-parameter name="U"/>
  498. <template-type-parameter name="E"/>
  499. </template><parameter name="u"><paramtype><classname>unique_ptr</classname>&lt; U, E &gt; &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: If E is not a reference type, assignment of the deleter from an rvalue of type E shall be well-formed and shall not throw an exception. Otherwise, E is a reference type and assignment of the deleter from an lvalue of type E shall be well-formed and shall not throw an exception.</para><para><emphasis role="bold">Remarks</emphasis>: This operator shall not participate in overload resolution unless:<itemizedlist>
  500. <listitem><para><computeroutput>unique_ptr&lt;U, E&gt;::pointer</computeroutput> is implicitly convertible to pointer and</para>
  501. </listitem><listitem><para>U is not an array type.</para>
  502. </listitem></itemizedlist>
  503. </para><para><emphasis role="bold">Effects</emphasis>: Transfers ownership from u to *this as if by calling <computeroutput>reset(u.release())</computeroutput> followed by <computeroutput>get_deleter() = std::forward&lt;E&gt;(u.get_deleter())</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: *this. </para></description></copy-assignment>
  504. <copy-assignment cv="noexcept"><type><classname>unique_ptr</classname> &amp;</type><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: <computeroutput>reset()</computeroutput>.</para><para><emphasis role="bold">Postcondition</emphasis>: <computeroutput>get() == nullptr</computeroutput></para><para><emphasis role="bold">Returns</emphasis>: *this. </para></description></copy-assignment>
  505. </class><function name="swap"><type>void</type><template>
  506. <template-type-parameter name="T"/>
  507. <template-type-parameter name="D"/>
  508. </template><parameter name="x"><paramtype><classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Calls <computeroutput>x.swap(y)</computeroutput>. </para></description></function>
  509. <function name="operator=="><type>bool</type><template>
  510. <template-type-parameter name="T1"/>
  511. <template-type-parameter name="D1"/>
  512. <template-type-parameter name="T2"/>
  513. <template-type-parameter name="D2"/>
  514. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>x.get() == y.get()</computeroutput>. </para></description></function>
  515. <function name="operator!="><type>bool</type><template>
  516. <template-type-parameter name="T1"/>
  517. <template-type-parameter name="D1"/>
  518. <template-type-parameter name="T2"/>
  519. <template-type-parameter name="D2"/>
  520. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>x.get() != y.get()</computeroutput>. </para></description></function>
  521. <function name="operator&lt;"><type>bool</type><template>
  522. <template-type-parameter name="T1"/>
  523. <template-type-parameter name="D1"/>
  524. <template-type-parameter name="T2"/>
  525. <template-type-parameter name="D2"/>
  526. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: x.get() &lt; y.get().</para><para><emphasis role="bold">Remarks</emphasis>: This comparison shall induce a strict weak ordering betwen pointers. </para></description></function>
  527. <function name="operator&lt;="><type>bool</type><template>
  528. <template-type-parameter name="T1"/>
  529. <template-type-parameter name="D1"/>
  530. <template-type-parameter name="T2"/>
  531. <template-type-parameter name="D2"/>
  532. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: !(y &lt; x). </para></description></function>
  533. <function name="operator&gt;"><type>bool</type><template>
  534. <template-type-parameter name="T1"/>
  535. <template-type-parameter name="D1"/>
  536. <template-type-parameter name="T2"/>
  537. <template-type-parameter name="D2"/>
  538. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: y &lt; x. </para></description></function>
  539. <function name="operator&gt;="><type>bool</type><template>
  540. <template-type-parameter name="T1"/>
  541. <template-type-parameter name="D1"/>
  542. <template-type-parameter name="T2"/>
  543. <template-type-parameter name="D2"/>
  544. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T1, D1 &gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>unique_ptr</classname>&lt; T2, D2 &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>:!(x &lt; y). </para></description></function>
  545. <function name="operator=="><type>bool</type><template>
  546. <template-type-parameter name="T"/>
  547. <template-type-parameter name="D"/>
  548. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>:!x. </para></description></function>
  549. <function name="operator=="><type>bool</type><template>
  550. <template-type-parameter name="T"/>
  551. <template-type-parameter name="D"/>
  552. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>:!x. </para></description></function>
  553. <function name="operator!="><type>bool</type><template>
  554. <template-type-parameter name="T"/>
  555. <template-type-parameter name="D"/>
  556. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: (bool)x. </para></description></function>
  557. <function name="operator!="><type>bool</type><template>
  558. <template-type-parameter name="T"/>
  559. <template-type-parameter name="D"/>
  560. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: (bool)x. </para></description></function>
  561. <function name="operator&lt;"><type>bool</type><template>
  562. <template-type-parameter name="T"/>
  563. <template-type-parameter name="D"/>
  564. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>operator </computeroutput> shall induce a strict weak ordering on unique_ptr&lt;T, D&gt;::pointer values.</para><para><emphasis role="bold">Returns</emphasis>: Returns <computeroutput>x.get() &lt; pointer()</computeroutput>. </para></description></function>
  565. <function name="operator&lt;"><type>bool</type><template>
  566. <template-type-parameter name="T"/>
  567. <template-type-parameter name="D"/>
  568. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>operator </computeroutput> shall induce a strict weak ordering on unique_ptr&lt;T, D&gt;::pointer values.</para><para><emphasis role="bold">Returns</emphasis>: Returns <computeroutput>pointer() &lt; x.get()</computeroutput>. </para></description></function>
  569. <function name="operator&gt;"><type>bool</type><template>
  570. <template-type-parameter name="T"/>
  571. <template-type-parameter name="D"/>
  572. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>nullptr &lt; x</computeroutput>. </para></description></function>
  573. <function name="operator&gt;"><type>bool</type><template>
  574. <template-type-parameter name="T"/>
  575. <template-type-parameter name="D"/>
  576. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>x &lt; nullptr</computeroutput>. </para></description></function>
  577. <function name="operator&lt;="><type>bool</type><template>
  578. <template-type-parameter name="T"/>
  579. <template-type-parameter name="D"/>
  580. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>!(nullptr &lt; x)</computeroutput>. </para></description></function>
  581. <function name="operator&lt;="><type>bool</type><template>
  582. <template-type-parameter name="T"/>
  583. <template-type-parameter name="D"/>
  584. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>!(x &lt; nullptr)</computeroutput>. </para></description></function>
  585. <function name="operator&gt;="><type>bool</type><template>
  586. <template-type-parameter name="T"/>
  587. <template-type-parameter name="D"/>
  588. </template><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>!(x &lt; nullptr)</computeroutput>. </para></description></function>
  589. <function name="operator&gt;="><type>bool</type><template>
  590. <template-type-parameter name="T"/>
  591. <template-type-parameter name="D"/>
  592. </template><parameter name=""><paramtype>std::nullptr_t</paramtype></parameter><parameter name="x"><paramtype>const <classname>unique_ptr</classname>&lt; T, D &gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: <computeroutput>!(nullptr &lt; x)</computeroutput>. </para></description></function>
  593. </namespace>
  594. </namespace>
  595. </header>
  596. <header name="boost/move/utility.hpp">
  597. <para>This header includes core utilities from <computeroutput>&lt;boost/move/utility_core.hpp&gt;</computeroutput> and defines some more advanced utilities such as: </para><namespace name="boost">
  598. <function name="move_if_noexcept"><type>rvalue_reference_or_const_lvalue_reference</type><template>
  599. <template-type-parameter name="T"/>
  600. </template><parameter name=""><paramtype>input_reference</paramtype></parameter><description><para>This function provides a way to convert a reference into a rvalue reference in compilers with rvalue references. For other compilers converts T &amp; into <emphasis>::boost::rv&lt;T&gt; &amp;</emphasis> so that move emulation is activated. Reference would be converted to rvalue reference only if input type is nothrow move constructible or if it has no copy constructor. In all other cases const reference would be returned </para></description></function>
  601. </namespace>
  602. </header>
  603. <header name="boost/move/utility_core.hpp">
  604. <para>This header defines core utilities to ease the development of move-aware functions. This header minimizes dependencies from other libraries. </para><namespace name="boost">
  605. <struct name="enable_move_utility_emulation"><template>
  606. <template-type-parameter name="T"/>
  607. </template><description><para>This trait's internal boolean <computeroutput>value</computeroutput> is false in compilers with rvalue references and true in compilers without rvalue references.</para><para>A user can specialize this trait for a type T to false to SFINAE out <computeroutput>move</computeroutput> and <computeroutput>forward</computeroutput> so that the user can define a different move emulation for that type in namespace boost (e.g. another Boost library for its types) and avoid any overload ambiguity. </para></description><data-member name="value" specifiers="static"><type>const bool</type></data-member>
  608. </struct><function name="move"><type>rvalue_reference</type><template>
  609. <template-type-parameter name="T"/>
  610. </template><parameter name=""><paramtype>input_reference</paramtype></parameter><description><para>This function provides a way to convert a reference into a rvalue reference in compilers with rvalue references. For other compilers if <computeroutput>T</computeroutput> is Boost.Move enabled type then it converts <computeroutput>T&amp;</computeroutput> into <computeroutput>::boost::rv&lt;T&gt; &amp;</computeroutput> so that move emulation is activated, else it returns <computeroutput>T &amp;</computeroutput>. </para></description></function>
  611. <function name="forward"><type>output_reference</type><template>
  612. <template-type-parameter name="T"/>
  613. </template><parameter name=""><paramtype>input_reference</paramtype></parameter><description><para>This function provides limited form of forwarding that is usually enough for in-place construction and avoids the exponential overloading for achieve the limited forwarding in C++03.</para><para>For compilers with rvalue references this function provides perfect forwarding.</para><para>Otherwise:<itemizedlist>
  614. <listitem><para>If input_reference binds to const ::boost::rv&lt;T&gt; &amp; then it output_reference is ::boost::rv&lt;T&gt; &amp;</para>
  615. </listitem><listitem><para>Else, output_reference is equal to input_reference. </para>
  616. </listitem></itemizedlist>
  617. </para></description></function>
  618. <function name="move_if_not_lvalue_reference"><type>output_reference</type><template>
  619. <template-type-parameter name="T"/>
  620. </template><parameter name=""><paramtype>input_reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Calls <computeroutput>boost::move</computeroutput> if <computeroutput>input_reference</computeroutput> is not a lvalue reference. Otherwise returns the reference </para></description></function>
  621. </namespace>
  622. </header>
  623. </library-reference>