Boost C++ Libraries: Ticket #4548: typo in factory documentation example code https://svn.boost.org/trac10/ticket/4548 <p> At this page: <a href="http://www.boost.org/doc/libs/1_44_0/libs/functional/factory/doc/html/index.html">http://www.boost.org/doc/libs/1_44_0/libs/functional/factory/doc/html/index.html</a> </p> <p> this line seems wrong: </p> <blockquote> <p> std::auto_ptr&lt;an_abstract_factory&gt; x = factories[some_name]-&gt;create(); </p> </blockquote> <p> I think it should be: </p> <blockquote> <p> std::auto_ptr&lt;an_abstract_class&gt; x = factories[some_name]-&gt;create(); </p> </blockquote> <p> cheers, <br /> Erik Sjölund </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4548 Trac 1.4.3 Erik Sjölund <erik.sjolund@…> Tue, 17 Aug 2010 08:57:51 GMT attachment set https://svn.boost.org/trac10/ticket/4548 https://svn.boost.org/trac10/ticket/4548 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">fix-factory-html-bug.patch</span> </li> </ul> Ticket Steven Watanabe Thu, 07 Apr 2011 00:25:45 GMT <link>https://svn.boost.org/trac10/ticket/4548#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4548#comment:1</guid> <description> <p> This example is wrong for any number of reasons: </p> <ul><li>It requires an illegal implicit conversion from a pointer to an auto_ptr. </li><li>It attempts to create an object of an abstract class a_factory (in ptr_map::operator[]) </li><li>It treats the result of factories[some_name] as a pointer. It should be a reference. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 07 Apr 2011 00:31:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4548#comment:2 https://svn.boost.org/trac10/ticket/4548#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/71064" title="Make sure this example compiles. Fixes #4548.">[71064]</a>) Make sure this example compiles. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4548" title="#4548: Bugs: typo in factory documentation example code (closed: fixed)">#4548</a>. </p> Ticket