[Boost-bugs] [Boost C++ Libraries] #6941: ASIO Daytime.3 example misuses enable_shared_from_this

Subject: [Boost-bugs] [Boost C++ Libraries] #6941: ASIO Daytime.3 example misuses enable_shared_from_this
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-24 21:57:54


#6941: ASIO Daytime.3 example misuses enable_shared_from_this
-----------------------------------+----------------------------------------
 Reporter: m_albert137@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
-----------------------------------+----------------------------------------
 In the documentation for the ASIO library, the Daytime.3
 example has class tcp_connection inheriting from
 enable_shared_from_this, but then in "tcp_connection::create()"
 we have
    return pointer( new tcp_connection....)
 where pointer is a typedef for the shared_ptr type.

 Perhaps:
     return (new tcp_connection...).shared_from_this()
 ?

 By the way, thanks for all the wonderful software!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6941>
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:09 UTC