Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > f5e5087a439fef5532501bf9a6ff9c34 > files > 935

libstdc++-docs-4.7.2-8.1.mga3.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>libstdc++: std::auto_ptr&lt; _Tp &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libstdc++
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a00574.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="a02717.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">std::auto_ptr&lt; _Tp &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7c925143715c359436b453e524dd9fc1"><td class="memItemLeft" align="right" valign="top">typedef _Tp&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a></td></tr>
<tr class="separator:a7c925143715c359436b453e524dd9fc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4029546a38036de379586d8514a02ebb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a4029546a38036de379586d8514a02ebb">auto_ptr</a> (<a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *__p=0)  throw ()</td></tr>
<tr class="separator:a4029546a38036de379586d8514a02ebb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa88c998565d04c8e882a3b579e46c055"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#aa88c998565d04c8e882a3b579e46c055">auto_ptr</a> (<a class="el" href="a00574.html">auto_ptr</a> &amp;__a)  throw ()</td></tr>
<tr class="separator:aa88c998565d04c8e882a3b579e46c055"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10d7a4a15c88b4953d090c08dfc87e14"><td class="memTemplParams" colspan="2">template&lt;typename _Tp1 &gt; </td></tr>
<tr class="memitem:a10d7a4a15c88b4953d090c08dfc87e14"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00574.html#a10d7a4a15c88b4953d090c08dfc87e14">auto_ptr</a> (<a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp1 &gt; &amp;__a)  throw ()</td></tr>
<tr class="separator:a10d7a4a15c88b4953d090c08dfc87e14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a829d06b1a12a622608a3cce322238fc6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a829d06b1a12a622608a3cce322238fc6">auto_ptr</a> (<a class="el" href="a00575.html">auto_ptr_ref</a>&lt; <a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> &gt; __ref)  throw ()</td></tr>
<tr class="separator:a829d06b1a12a622608a3cce322238fc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7306f9cb13ae8e32b4a4bc9d8bee2fd1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a7306f9cb13ae8e32b4a4bc9d8bee2fd1">~auto_ptr</a> ()</td></tr>
<tr class="separator:a7306f9cb13ae8e32b4a4bc9d8bee2fd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac17a50e1852dcf017ab54ccb5a2d9cf3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#ac17a50e1852dcf017ab54ccb5a2d9cf3">get</a> () const   throw ()</td></tr>
<tr class="separator:ac17a50e1852dcf017ab54ccb5a2d9cf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3da3775aba2d35047d59630d882fa9a6"><td class="memTemplParams" colspan="2"><a class="anchor" id="a3da3775aba2d35047d59630d882fa9a6"></a>
template&lt;typename _Tp1 &gt; </td></tr>
<tr class="memitem:a3da3775aba2d35047d59630d882fa9a6"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><b>operator auto_ptr&lt; _Tp1 &gt;</b> ()  throw ()</td></tr>
<tr class="separator:a3da3775aba2d35047d59630d882fa9a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae349cab64637962e883d25e098991a3e"><td class="memTemplParams" colspan="2"><a class="anchor" id="ae349cab64637962e883d25e098991a3e"></a>
template&lt;typename _Tp1 &gt; </td></tr>
<tr class="memitem:ae349cab64637962e883d25e098991a3e"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><b>operator auto_ptr_ref&lt; _Tp1 &gt;</b> ()  throw ()</td></tr>
<tr class="separator:ae349cab64637962e883d25e098991a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa29de43931b66c7c12b29c69dbf2fe2c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#aa29de43931b66c7c12b29c69dbf2fe2c">operator*</a> () const   throw ()</td></tr>
<tr class="separator:aa29de43931b66c7c12b29c69dbf2fe2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1cc3046443a2ea0eaa710452365c8ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#af1cc3046443a2ea0eaa710452365c8ae">operator-&gt;</a> () const   throw ()</td></tr>
<tr class="separator:af1cc3046443a2ea0eaa710452365c8ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af798a3136d8030f2158837fde7373f5b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00574.html">auto_ptr</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#af798a3136d8030f2158837fde7373f5b">operator=</a> (<a class="el" href="a00574.html">auto_ptr</a> &amp;__a)  throw ()</td></tr>
<tr class="separator:af798a3136d8030f2158837fde7373f5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf78f102f371538dbe78a57976053736"><td class="memTemplParams" colspan="2">template&lt;typename _Tp1 &gt; </td></tr>
<tr class="memitem:adf78f102f371538dbe78a57976053736"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00574.html">auto_ptr</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00574.html#adf78f102f371538dbe78a57976053736">operator=</a> (<a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp1 &gt; &amp;__a)  throw ()</td></tr>
<tr class="separator:adf78f102f371538dbe78a57976053736"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66db670614e0593af6a9b36018796f45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66db670614e0593af6a9b36018796f45"></a>
<a class="el" href="a00574.html">auto_ptr</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="a00575.html">auto_ptr_ref</a>&lt; <a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> &gt; __ref)  throw ()</td></tr>
<tr class="separator:a66db670614e0593af6a9b36018796f45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cdeabd85acfcac56136924e939c29ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a3cdeabd85acfcac56136924e939c29ef">release</a> ()  throw ()</td></tr>
<tr class="separator:a3cdeabd85acfcac56136924e939c29ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d9519c9b72d8add8292661b822ab7fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00574.html#a7d9519c9b72d8add8292661b822ab7fe">reset</a> (<a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *__p=0)  throw ()</td></tr>
<tr class="separator:a7d9519c9b72d8add8292661b822ab7fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename _Tp&gt;<br/>
class std::auto_ptr&lt; _Tp &gt;</h3>

<p>A simple smart pointer providing strict ownership semantics. </p>
<p>The Standard says: </p>
<pre>
An <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> owns the object it holds a pointer to.  Copying
an <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> copies the pointer and transfers ownership to the
destination.  If more than one <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> owns the same object
at the same time the behavior of the program is undefined.</pre><pre>The uses of <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> include providing temporary
exception-safety for dynamically allocated memory, passing
ownership of dynamically allocated memory to a function, and
returning dynamically allocated memory from a function.  <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> does not meet the CopyConstructible and Assignable
requirements for Standard Library <a href="tables.html#65">container</a> elements and thus
instantiating a Standard Library container with an <code><a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a></code> results in undefined behavior.
</pre><p> Quoted from [20.4.5]/3.</p>
<p>Good examples of what can and cannot be done with <a class="el" href="a00574.html" title="A simple smart pointer providing strict ownership semantics.">auto_ptr</a> can be found in the libstdc++ testsuite.</p>
<p>_GLIBCXX_RESOLVE_LIB_DEFECTS</p>
<ol type="1">
<li>auto_ptr&lt;&gt; conversion issues These resolutions have all been incorporated. </li>
</ol>

<p>Definition at line <a class="el" href="a00989_source.html#l00087">87</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a7c925143715c359436b453e524dd9fc1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef _Tp <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::<a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The pointed-to type. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00094">94</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4029546a38036de379586d8514a02ebb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::<a class="el" href="a00574.html">auto_ptr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *&#160;</td>
          <td class="paramname"><em>__p</em> = <code>0</code></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>An auto_ptr is usually constructed from a raw pointer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__p</td><td>A pointer (defaults to NULL).</td></tr>
  </table>
  </dd>
</dl>
<p>This object now <em>owns</em> the object pointed to by <em>__p</em>. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00103">103</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa88c998565d04c8e882a3b579e46c055"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::<a class="el" href="a00574.html">auto_ptr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>__a</em></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>An auto_ptr can be constructed from another auto_ptr. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__a</td><td>Another auto_ptr of the same type.</td></tr>
  </table>
  </dd>
</dl>
<p>This object now <em>owns</em> the object previously owned by <em>__a</em>, which has given up ownership. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00112">112</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="a10d7a4a15c88b4953d090c08dfc87e14"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<div class="memtemplate">
template&lt;typename _Tp1 &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::<a class="el" href="a00574.html">auto_ptr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp1 &gt; &amp;&#160;</td>
          <td class="paramname"><em>__a</em></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>An auto_ptr can be constructed from another auto_ptr. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__a</td><td>Another auto_ptr of a different but related type.</td></tr>
  </table>
  </dd>
</dl>
<p>A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.</p>
<p>This object now <em>owns</em> the object previously owned by <em>__a</em>, which has given up ownership. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00125">125</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7306f9cb13ae8e32b4a4bc9d8bee2fd1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::~<a class="el" href="a00574.html">auto_ptr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>When the auto_ptr goes out of scope, the object it owns is deleted. If it no longer owns anything (i.e., <code><a class="el" href="a00574.html#ac17a50e1852dcf017ab54ccb5a2d9cf3" title="Bypassing the smart pointer.">get()</a></code> is <code>NULL</code>), then this has no effect.</p>
<p>The C++ standard says there is supposed to be an empty throw specification here, but omitting it is standard conforming. Its presence can be detected only if _Tp::~_Tp() throws, but this is prohibited. [17.4.3.6]/2 </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00170">170</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="a829d06b1a12a622608a3cce322238fc6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::<a class="el" href="a00574.html">auto_ptr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00575.html">auto_ptr_ref</a>&lt; <a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> &gt;&#160;</td>
          <td class="paramname"><em>__ref</em></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Automatic conversions. </p>
<p>These operations convert an auto_ptr into and from an <a class="el" href="a00575.html">auto_ptr_ref</a> automatically as needed. This allows constructs such as </p>
<div class="fragment"><div class="line">auto_ptr&lt;Derived&gt;  func_returning_auto_ptr(.....);</div>
<div class="line">...</div>
<div class="line">auto_ptr&lt;Base&gt; ptr = func_returning_auto_ptr(.....);</div>
</div><!-- fragment --> 
<p>Definition at line <a class="el" href="a00989_source.html#l00260">260</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac17a50e1852dcf017ab54ccb5a2d9cf3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a>* <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::get </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Bypassing the smart pointer. </p>
<dl class="section return"><dt>Returns</dt><dd>The raw pointer being managed.</dd></dl>
<p>You can get a copy of the pointer that this object owns, for situations such as passing to a function which only accepts a raw pointer.</p>
<dl class="section note"><dt>Note</dt><dd>This auto_ptr still owns the memory. </dd></dl>

<p>Definition at line <a class="el" href="a00989_source.html#l00211">211</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa29de43931b66c7c12b29c69dbf2fe2c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a>&amp; <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Smart pointer dereferencing. </p>
<p>If this auto_ptr no longer owns anything, then this operation will crash. (For a smart pointer, <em>no longer owns anything</em> is the same as being a null pointer, and you know what happens when you dereference one of those...) </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00181">181</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="af1cc3046443a2ea0eaa710452365c8ae"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a>* <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Smart pointer dereferencing. </p>
<p>This returns the pointer itself, which the language then will automatically cause to be dereferenced. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00194">194</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="af798a3136d8030f2158837fde7373f5b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">auto_ptr</a>&amp; <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>__a</em></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>auto_ptr assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__a</td><td>Another auto_ptr of the same type.</td></tr>
  </table>
  </dd>
</dl>
<p>This object now <em>owns</em> the object previously owned by <em>__a</em>, which has given up ownership. The object that this one <em>used</em> to own and track has been deleted. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00136">136</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

<p>References <a class="el" href="a00989_source.html#l00240">std::auto_ptr&lt; _Tp &gt;::reset()</a>.</p>

</div>
</div>
<a class="anchor" id="adf78f102f371538dbe78a57976053736"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<div class="memtemplate">
template&lt;typename _Tp1 &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html">auto_ptr</a>&amp; <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html">auto_ptr</a>&lt; _Tp1 &gt; &amp;&#160;</td>
          <td class="paramname"><em>__a</em></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>auto_ptr assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__a</td><td>Another auto_ptr of a different but related type.</td></tr>
  </table>
  </dd>
</dl>
<p>A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.</p>
<p>This object now <em>owns</em> the object previously owned by <em>__a</em>, which has given up ownership. The object that this one <em>used</em> to own and track has been deleted. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00154">154</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

<p>References <a class="el" href="a00989_source.html#l00240">std::auto_ptr&lt; _Tp &gt;::reset()</a>.</p>

</div>
</div>
<a class="anchor" id="a3cdeabd85acfcac56136924e939c29ef"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a>* <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Bypassing the smart pointer. </p>
<dl class="section return"><dt>Returns</dt><dd>The raw pointer being managed.</dd></dl>
<p>You can get a copy of the pointer that this object owns, for situations such as passing to a function which only accepts a raw pointer.</p>
<dl class="section note"><dt>Note</dt><dd>This auto_ptr no longer owns the memory. When this object goes out of scope, nothing will happen. </dd></dl>

<p>Definition at line <a class="el" href="a00989_source.html#l00225">225</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7d9519c9b72d8add8292661b822ab7fe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00574.html">std::auto_ptr</a>&lt; _Tp &gt;::reset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00574.html#a7c925143715c359436b453e524dd9fc1">element_type</a> *&#160;</td>
          <td class="paramname"><em>__p</em> = <code>0</code></td><td>)</td>
          <td>  throw ()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Forcibly deletes the managed object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">__p</td><td>A pointer (defaults to NULL).</td></tr>
  </table>
  </dd>
</dl>
<p>This object now <em>owns</em> the object pointed to by <em>__p</em>. The previous object has been deleted. </p>

<p>Definition at line <a class="el" href="a00989_source.html#l00240">240</a> of file <a class="el" href="a00989_source.html">auto_ptr.h</a>.</p>

<p>Referenced by <a class="el" href="a00989_source.html#l00136">std::auto_ptr&lt; _Tp &gt;::operator=()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00989_source.html">auto_ptr.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="a01604.html">std</a></li><li class="navelem"><a class="el" href="a00574.html">auto_ptr</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3 </li>
  </ul>
</div>
</body>
</html>