Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51022 - in sandbox/thread_safe_signals/trunk/libs/signals2/doc: . reference
From: fmhess_at_[hidden]
Date: 2009-02-04 16:24:23


Author: fmhess
Date: 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
New Revision: 51022
URL: http://svn.boost.org/trac/boost/changeset/51022

Log:
Updated reference documentation to reflect changes to
postconstructors/predestructors

Removed:
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct_ptr.xml
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/postconstructible.xml
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/predestructible.xml
Text files modified:
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/Makefile | 3
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/porting.xml | 22 +++---
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct.xml | 145 +++++++++++++++++++++++++++++++++------
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/reference.xml | 3
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/tests.xml | 2
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/thread_safety.xml | 5 -
   sandbox/thread_safe_signals/trunk/libs/signals2/doc/tutorial.xml | 21 ++---
   7 files changed, 142 insertions(+), 59 deletions(-)

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/Makefile
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/Makefile (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/Makefile 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -14,13 +14,10 @@
         tutorial.xml \
         reference/connection.xml \
         reference/deconstruct.xml \
- reference/deconstruct_ptr.xml \
         reference/dummy_mutex.xml \
         reference/last_value.xml \
         reference/mutex.xml \
         reference/optional_last_value.xml \
- reference/postconstructible.xml \
- reference/predestructible.xml \
         reference/reference.xml \
         reference/shared_connection_block.xml \
         reference/signal_base.xml \

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/porting.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/porting.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/porting.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -64,27 +64,27 @@
           <listitem>
             <para>Support for postconstructors (and predestructors) on objects managed by <classname>shared_ptr</classname>
               has been added with
- <classname>postconstructible</classname>, <classname>predestructible</classname>,
- and the factory functions <functionname>deconstruct</functionname> and <functionname>deconstruct_ptr</functionname>.
+ the <functionname>deconstruct</functionname> factory function.
               This was motivated by the importance of
               <code>shared_ptr</code> for the new connection tracking scheme, and the
               inability to obtain a <code>shared_ptr</code> to an object in its constructor.
- The use of these new additions is described in the
+ The use of <functionname>deconstruct</functionname> is described in the
               <link linkend="signals2.tutorial.deconstruct">tutorial</link>.
             </para>
             <para>
- The use of these new classes is in no way required, they are only provided in the hope
- they may be useful. You may wish to use them if you are porting code where
+ The use of <functionname>deconstruct</functionname> is in no way required,
+ it is only provided in the hope
+ it may be useful. You may wish to use it if you are porting code where
               a class creates connections to its own member functions in its constructor,
               and you also
               wish to use the new automatic connection management scheme. You could then
- move the connection creation from the constructor to to the class'
- <methodname alt="postconstructible::postconstruct">postconstruct</methodname>
- method, where <methodname>enable_shared_from_this::shared_from_this</methodname>
- may be used successfully to obtain a <classname>shared_ptr</classname> for
+ move the connection creation from the constructor to to the an
+ <code>adl_postconstruct</code> function, where
+ a reference to the owning <classname>shared_ptr</classname> is available for
               passing to <methodname alt="slotN::track">slot::track</methodname>.
- The <functionname>deconstruct</functionname> function could be used create objects
- of the class and run their <code>postconstruct</code> method. You can enforce use of <functionname>deconstruct</functionname> by
+ The <functionname>deconstruct</functionname> function would be used create objects
+ of the class and run their associated <code>adl_postconstruct</code> function.
+ You can enforce use of <functionname>deconstruct</functionname> by
               making the class' constructors private and declaring
               <classname>deconstruct_access</classname> a friend.
             </para>

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -11,14 +11,14 @@
           <template>
             <template-type-parameter name="T"/>
           </template>
- <type>shared_ptr&lt;T&gt;</type>
+ <type><classname>postconstructor_invoker</classname>&lt;T&gt;</type>
         </signature>
         <signature>
           <template>
             <template-type-parameter name="T"/>
             <template-type-parameter name="A1"/>
           </template>
- <type>shared_ptr&lt;T&gt;</type>
+ <type><classname>postconstructor_invoker</classname>&lt;T&gt;</type>
           <parameter name="arg1"><paramtype>const A1 &amp;</paramtype></parameter>
         </signature>
         <signature>
@@ -27,7 +27,7 @@
             <template-type-parameter name="A1"/>
             <template-type-parameter name="A2"/>
           </template>
- <type>shared_ptr&lt;T&gt;</type>
+ <type><classname>postconstructor_invoker</classname>&lt;T&gt;</type>
           <parameter name="arg1"><paramtype>const A1 &amp;</paramtype></parameter>
           <parameter name="arg2"><paramtype>const A2 &amp;</paramtype></parameter>
         </signature>
@@ -38,44 +38,68 @@
             <template-type-parameter name="A2, ..."/>
             <template-type-parameter name="AN"/>
           </template>
- <type>shared_ptr&lt;T&gt;</type>
+ <type><classname>postconstructor_invoker</classname>&lt;T&gt;</type>
           <parameter name="arg1"><paramtype>const A1 &amp;</paramtype></parameter>
           <parameter name="arg2"><paramtype>const A2 &amp;</paramtype></parameter>
           <parameter name=""><paramtype>...</paramtype></parameter>
           <parameter name="argN"><paramtype>const AN &amp;</paramtype></parameter>
- <purpose>this is my purpose</purpose>
         </signature>
 
- <purpose>Create a <code>shared_ptr</code> which supports post-constructors and pre-destructors.</purpose>
+ <purpose>Create a <code>shared_ptr</code> with support for post-constructors and pre-destructors.</purpose>
 
- <effects>
- <para>Creates a <code>shared_ptr&lt;T&gt;</code> and its owned object using only a single allocation,
+ <description>
+ <para>Creates an object and its owning <code>shared_ptr&lt;T&gt;</code>
+ (wrapped inside a <classname>postconstructor_invoker</classname>)
+ using only a single allocation,
             in a manner similar
             to that of <functionname>boost::make_shared()</functionname>. In addition, <code>deconstruct</code>
- supports postconstructors and predestructors for types derived from either the
- <classname>postconstructible</classname> or <classname>predestructible</classname> base classes.
- If <code>T</code> is derived from <classname>postconstructible</classname>
- then <code>postconstruct()</code> will be called on the newly constructed object
- after it is passed to its owning <code>shared_ptr</code>.
- If <code>T</code> is derived from <classname>predestructible</classname>
- then the deleter of the returned <classname>shared_ptr</classname> will call
- <code>predestruct()</code> on the owned object prior to deleting it with
+ supports postconstructors and predestructors. The returned
+ <classname>shared_ptr</classname> is wrapped inside a <classname>postconstructor_invoker</classname>
+ in order to provide the user with an opportunity to pass arguments to a postconstructor,
+ while insuring the postconstructor is run before the wrapped
+ <classname>shared_ptr</classname> is accessible.
+ </para>
+ <para>
+ In order to use <code>deconstruct</code> you must define a postconstructor for your class.
+ More specifically, you must define
+ an <code>adl_postconstruct</code> function which can be found via argument-dependent
+ lookup. Typically, this means defining an <code>adl_postconstruct</code> function
+ in the same namespace as its associated class. See the reference for
+ <classname>postconstructor_invoker</classname>
+ for a specification of what arguments are passed to the <code>adl_postconstruct</code>
+ call.
+ </para>
+ <para>
+ Optionally, you may define a predestructor for your class. This is done by
+ defining an <code>adl_predestruct</code> function which may be found
+ by argument-dependent lookup. The deleter of the <classname>shared_ptr</classname>
+ created by <code>deconstruct</code> will make an unqualified call to
+ <code>adl_predestruct</code> with a single
+ argument: a pointer to the object which is about to be deleted.
+ As a convenience, the pointer will always be cast to point to a non-const type
+ before being passed to <code>adl_predestruct</code>.
+ If no user-defined <code>adl_predestruct</code> function is found via
+ argument-dependent lookup, a default function (which does nothing) will
+ be used. After <code>adl_predestruct</code> is called, the deleter
+ will delete the object with
             <functionname>checked_delete</functionname>.
           </para>
           <para>
             Any arguments passed to a
             <code>deconstruct()</code> call are forwarded to the matching constructor of the
             template type
- <code>T</code>.
+ <code>T</code>. Arguments may also be passed to the class' associated
+ <code>adl_postconstruct</code> function by using the
+ <methodname>postconstructor_invoker::postconstruct()</methodname> methods.
           </para>
- </effects>
+ </description>
         <notes>
           <para>If your compiler supports the C++0x features of rvalue references
             and variadic templates, then <code>deconstruct</code> will perform perfect
             forwarding of arguments to the <code>T</code> constructor, using
             a prototype of:
           </para>
- <programlisting>template&lt; typename T, typename... Args > boost::shared_ptr&lt; T &gt; deconstruct( Args &amp;&amp; ... args );</programlisting>
+ <programlisting>template&lt; typename T, typename... Args > postconstructor_invoker&lt; T &gt; deconstruct( Args &amp;&amp; ... args );</programlisting>
           <para>Otherwise, argument forwarding is performed via const references, as specified in
             the synopsis. In order to pass non-const references to a constructor, you will need
             to wrap them in reference wrappers using <functionname>boost::ref</functionname>.
@@ -89,13 +113,8 @@
             objects are always created
             properly using <code>deconstruct</code>.
           </para>
- <para>
- See also <functionname>deconstruct_ptr</functionname>, which is similar to <code>deconstruct</code>,
- except it more closely resembles the constructors of <classname>shared_ptr</classname> rather
- than the <functionname>boost::make_shared</functionname> factory function.
- </para>
         </notes>
- <returns><para>A <code>shared_ptr&lt;T&gt;</code> owning a newly allocated object of
+ <returns><para>A <code>postconstructor_invoker&lt;T&gt;</code> owning a newly allocated object of
             type <code>T</code>.</para>
         </returns>
       </overloaded-function>
@@ -114,6 +133,82 @@
           </para>
         </description>
       </class>
+ <class name="postconstructor_invoker">
+ <method-group name="public methods">
+ <method name="conversion-operator">
+ <type>const shared_ptr&lt;T&gt; &amp;</type>
+ <description>
+ <para>
+ The conversion operator has the same effect as explicitly calling
+ the <methodname>postconstruct</methodname> method with no arguments.
+ </para>
+ </description>
+ </method>
+ <overloaded-method name="postconstruct" cv="const">
+ <signature>
+ <type>const shared_ptr&lt;T&gt; &amp;</type>
+ </signature>
+ <signature>
+ <template>
+ <template-type-parameter name="A1"/>
+ </template>
+ <type>const shared_ptr&lt;T&gt; &amp;</type>
+ <parameter name="a1"><paramtype>A1</paramtype></parameter>
+ </signature>
+ <signature>
+ <template>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ </template>
+ <type>const shared_ptr&lt;T&gt; &amp;</type>
+ <parameter name="a1"><paramtype>A1</paramtype></parameter>
+ <parameter name="a2"><paramtype>A1</paramtype></parameter>
+ </signature>
+ <signature>
+ <template>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2, ..."/>
+ <template-type-parameter name="AN"/>
+ </template>
+ <type>const shared_ptr&lt;T&gt; &amp;</type>
+ <parameter name="a1"><paramtype>A1</paramtype></parameter>
+ <parameter name="a2"><paramtype>A1</paramtype></parameter>
+ <parameter name=""><paramtype>...</paramtype></parameter>
+ <parameter name="aN"><paramtype>A1</paramtype></parameter>
+ </signature>
+ <description>
+ <para>
+ The <code>postconstruct</code> methods make an unqualified call to
+ <code>adl_postconstruct()</code> and then return the <classname>shared_ptr</classname>
+ which was wrapped inside the <code>postconstructor_invoker</code>
+ object by <functionname>deconstruct()</functionname>.
+ The first two arguments passed to the
+ <code>adl_postconstruct()</code> call are always the <classname>shared_ptr</classname>
+ owning the object created by <functionname>deconstruct()</functionname>,
+ followed by a ordinary pointer to the same object. As a convenience,
+ the ordinary pointer
+ will always be cast to point to a non-const type before being passed
+ to <code>adl_postconstruct</code>. The remaining arguments passed to
+ <code>adl_postconstruct</code> are whatever arguments the user may have
+ passed to the <code>postconstruct</code>
+ method.
+ </para>
+ </description>
+ </overloaded-method>
+ </method-group>
+ <purpose>Pass arguments to and run postconstructors for objects created with <functionname>deconstruct()</functionname>.</purpose>
+ <description>
+ <para>
+ Objects of type <code>postconstructor_invoker</code> are returned by calls to the
+ <functionname>deconstruct()</functionname> factory function. These objects are intended
+ to either be immediately assigned to a <classname>shared_ptr</classname> (in which case the
+ class' conversion operator will perform the conversion by calling the
+ <methodname>postconstruct</methodname> with no arguments), or to be converted
+ to <classname>shared_ptr</classname> explicitly by the user calling one of
+ the <methodname>postconstruct</methodname> methods.
+ </para>
+ </description>
+ </class>
     </namespace>
   </namespace>
 </header>

Deleted: sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct_ptr.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/deconstruct_ptr.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
+++ (empty file)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
- "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<header name="boost/signals2/deconstruct_ptr.hpp" last-revision="$Date: 2007-03-06 16:51:55 -0500 (Tue, 06 Mar 2007) $">
- <using-namespace name="boost"/>
- <using-namespace name="boost::signals2"/>
- <namespace name="boost">
- <namespace name="signals2">
- <overloaded-function name="deconstruct_ptr">
- <signature>
- <template>
- <template-type-parameter name="T"/>
- </template>
- <type>shared_ptr&lt;T&gt;</type>
- <parameter name="pointer"><paramtype>T*</paramtype></parameter>
- </signature>
- <signature>
- <template>
- <template-type-parameter name="T"/>
- <template-type-parameter name="D"/>
- </template>
- <type>shared_ptr&lt;T&gt;</type>
- <parameter name="pointer"><paramtype>T*</paramtype></parameter>
- <parameter name="deleter"><paramtype>D</paramtype></parameter>
- </signature>
-
- <purpose>Create a <code>shared_ptr</code> which supports post-constructors and pre-destructors.</purpose>
-
- <effects>
- <para>Creates a <code>shared_ptr&lt;T&gt;</code> by passing the <code>pointer</code> and
- <code>deleter</code> parameters to the <code>shared_ptr</code> constructor. If no
- <code>deleter</code> is specified, then <classname>predestructing_deleter</classname> is
- used as the default. If <code>T</code> is derived from <classname>postconstructible</classname>
- (and <code>pointer</code> is not a null pointer),
- then <code>pointer->postconstruct()</code> will be called after the <code>shared_ptr</code> is constructed.
- </para>
- </effects>
- <notes>
- <para>
- See also <functionname>deconstruct</functionname>, which is similar to <code>deconstruct_ptr</code>,
- except it resembles the <functionname>boost::make_shared</functionname> factory function
- rather than the constructors of <classname>shared_ptr</classname>. The
- <functionname>deconstruct</functionname> factory function creates the
- <classname>shared_ptr</classname> and the object it owns efficiently with a single allocation,
- and can be given access to private or protected constructors.
- </para>
- </notes>
- <returns><para>A <code>shared_ptr&lt;T&gt;</code> owning <code>pointer</code>.</para></returns>
- </overloaded-function>
-
- <class name="predestructing_deleter">
- <template>
- <template-type-parameter name="T"/>
- </template>
- <method name="operator()" cv="const">
- <type>void</type>
- <parameter name="pointer"><paramtype>const T *</paramtype>
- </parameter>
- <effects>
- <para>Calls <code>pointer-><methodname alt="predestructible::predestruct">predestruct</methodname>()</code>
- if <code>T</code> is derived from
- <classname>predestructible</classname>. Then <code>pointer</code> is deleted using
- <functionname>checked_delete</functionname>.
- </para>
- </effects>
- </method>
- <purpose>Predestruct object if it is predestructible, then delete.
- </purpose>
- </class>
- </namespace>
- </namespace>
-</header>
\ No newline at end of file

Deleted: sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/postconstructible.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/postconstructible.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
+++ (empty file)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
- "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<header name="boost/signals2/postconstructible.hpp" last-revision="$Date: 2007-03-06 16:51:55 -0500 (Tue, 06 Mar 2007) $">
- <using-namespace name="boost"/>
- <namespace name="boost">
- <namespace name="signals2">
- <class name="postconstructible">
- <purpose>A base class for classes with postconstructors, used in conjunction with <functionname>deconstruct_ptr</functionname>().
- </purpose>
- <access name="protected">
- <destructor specifiers="virtual"/>
- <method name="postconstruct" specifiers="virtual">
- <type>void</type>
- <notes><para>Override <code>postconstruct()</code> with your class's post-constructor.
- It will be called automatically if you manage your objects with <code>shared_ptr</code>s
- created with <functionname>deconstruct()</functionname> or
- <functionname>deconstruct_ptr()</functionname>.
- </para></notes>
- </method>
- </access>
- </class>
- </namespace>
- </namespace>
-</header>

Deleted: sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/predestructible.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/predestructible.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
+++ (empty file)
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
- "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<header name="boost/signals2/predestructible.hpp" last-revision="$Date: 2007-03-06 16:51:55 -0500 (Tue, 06 Mar 2007) $">
- <using-namespace name="boost"/>
- <namespace name="boost">
- <namespace name="signals2">
- <class name="predestructible">
- <purpose>A base class for classes with predestructors, used in conjunction with <functionname>deconstruct_ptr</functionname>().
- </purpose>
- <access name="protected">
- <constructor/>
- </access>
- <access name="public">
- <destructor specifiers="virtual"/>
- <method name="predestruct" specifiers="virtual">
- <type>void</type>
- <notes><para>Override <code>predestruct()</code> with your class' pre-destructor.
- It will be called automatically if you manage your objects with <code>shared_ptr</code>s
- that use <classname>predestructing_deleter</classname> or similar as their deleter, such as
- <classname>shared_ptr</classname> created with <functionname>deconstruct()</functionname> or
- <functionname>deconstruct_ptr()</functionname>.</para>
- </notes>
- </method>
- </access>
- </class>
- </namespace>
- </namespace>
-</header>

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/reference.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/reference.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/reference/reference.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -12,13 +12,10 @@
 
   <xi:include href="connection.xml"/>
   <xi:include href="deconstruct.xml"/>
- <xi:include href="deconstruct_ptr.xml"/>
   <xi:include href="dummy_mutex.xml"/>
   <xi:include href="last_value.xml"/>
   <xi:include href="mutex.xml"/>
   <xi:include href="optional_last_value.xml"/>
- <xi:include href="postconstructible.xml"/>
- <xi:include href="predestructible.xml"/>
   <xi:include href="shared_connection_block.xml"/>
   <xi:include href="signal_header.xml"/>
   <xi:include href="signal_base.xml"/>

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/tests.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/tests.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/tests.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -24,7 +24,7 @@
     <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
     <purpose>
       <para>Test postconstruction/predestruction functionality of
- <functionname>boost::signals2::deconstruct_ptr</functionname> and friends.</para>
+ <functionname>boost::signals2::deconstruct</functionname>.</para>
     </purpose>
   </run-test>
 

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/thread_safety.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/thread_safety.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/thread_safety.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -175,11 +175,6 @@
       a signal's slot list, they are protected by the mutex associated with
       each signal-slot connection.
     </para>
- <para>
- The <classname>postconstructible</classname> and <classname>predestructible</classname>
- classes are simply abstract base classes which maintain no state. Therefore they
- are thread-safe.
- </para>
     <para>The <classname>signals2::trackable</classname> class does NOT provide
       thread-safe automatic connection management. In particular, it leaves open the
       possibility of a signal invocation calling into a partially destructed object

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/doc/tutorial.xml
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/doc/tutorial.xml (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/doc/tutorial.xml 2009-02-04 16:24:22 EST (Wed, 04 Feb 2009)
@@ -853,28 +853,27 @@
     <title>Postconstructors and Predestructors (Advanced)</title>
     <para>One limitation of using <code>shared_ptr</code> for tracking is that
       an object cannot setup tracking of itself in its constructor. However, it is
- possible to set up tracking in a post-constructor. In a post-constructor,
- a <code>shared_ptr</code> to <code>this</code> can be obtained by using
- <classname>enable_shared_from_this</classname>. The Boost.Signals2
+ possible to set up tracking in a post-constructor which is called after the
+ object has been created and passed to a <classname>shared_ptr</classname>.
+ The Boost.Signals2
       library provides support for post-constructors and pre-destructors
- via the base classes <classname>postconstructible</classname>
- and <classname>predestructible</classname>, and the related factory functions
- <functionname>deconstruct()</functionname> and <functionname>deconstruct_ptr()</functionname>.
+ via the <functionname>deconstruct()</functionname> factory function.
     </para>
     <para>
       For most cases, the simplest and most robust way to setup postconstructors
- for a class is to derive the class from <classname>postconstructible</classname>,
- make its constructors private, and give <functionname>deconstruct</functionname>
+ for a class is to define an associated <code>adl_postconstruct</code> function
+ which can be found by <functionname>deconstruct()</functionname>,
+ make the class' constructors private, and give <functionname>deconstruct</functionname>
       access to the private constructors by declaring <classname>deconstruct_access</classname>
       a friend. This will ensure that objects of the class may only be created
       through the <functionname>deconstruct()</functionname> function, and their
- <code>postconstruct()</code> function will always be called.
+ associated <code>adl_postconstruct()</code> function will always be called.
     </para>
     <para>
       Be aware that the postconstructor/predestructor support in Boost.Signals2
       is in no way essential to the use of the library. The use of
- <functionname>deconstruct</functionname>, <classname>postconstructible</classname>,
- etc. is purely optional. One alternative is to
+ <functionname>deconstruct</functionname>
+ is purely optional. One alternative is to
       define static factory functions for your classes. The
       factory function can create an object, pass ownership of the object to
       a <classname>shared_ptr</classname>, setup tracking for the object,


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk