Re: [Boost-bugs] [Boost C++ Libraries] #4548: typo in factory documentation example code

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4548: typo in factory documentation example code
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-04-07 00:25:46


#4548: typo in factory documentation example code
----------------------------------------------------+-----------------------
  Reporter: Erik Sjölund <erik.sjolund@…> | Owner: t_schwinger
      Type: Bugs | Status: new
 Milestone: Boost 1.44.0 | Component: functional/factory
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------------------+-----------------------

Comment (by steven_watanabe):

 This example is wrong for any number of reasons:

  * It requires an illegal implicit conversion from a pointer to an
 auto_ptr.
  * It attempts to create an object of an abstract class a_factory (in
 ptr_map::operator[])
  * It treats the result of factories[some_name] as a pointer. It should
 be a reference.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4548#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC