<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[shared_ptr]]></title><description><![CDATA[<p>Wenn ich den shared_ptr mittels reset freigebe, wird dann der eigentliche ptr im shared_ptr auf 0 gesetzt, so dass ich ihn mit NOT 0 abfragen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/270006/shared_ptr</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 19:57:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/270006.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 05 Jul 2010 11:19:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to shared_ptr on Mon, 05 Jul 2010 11:19:36 GMT]]></title><description><![CDATA[<p>Wenn ich den shared_ptr mittels reset freigebe, wird dann der eigentliche ptr im shared_ptr auf 0 gesetzt, so dass ich ihn mit NOT 0 abfragen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1921548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1921548</guid><dc:creator><![CDATA[Frageee]]></dc:creator><pubDate>Mon, 05 Jul 2010 11:19:36 GMT</pubDate></item><item><title><![CDATA[Reply to shared_ptr on Mon, 05 Jul 2010 11:24:48 GMT]]></title><description><![CDATA[<p>Ja. (Siehe TR1, 2.2.3.1 (1-3) und 2.2.3.4 (3))</p>
<p>Übrigens hat shared_ptr einen operator <em>unspecified-bool-type</em>() const, so dass du den Zeiger auch direkt in eine Abfrage werfen kannst:</p>
<pre><code class="language-cpp">std::tr1::shared_ptr&lt;int&gt; p;

if(p) {
  // ...
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1921552</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1921552</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Mon, 05 Jul 2010 11:24:48 GMT</pubDate></item></channel></rss>