Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77861 - in trunk: boost libs/scope_exit/doc libs/scope_exit/doc/html libs/scope_exit/doc/html/scope_exit libs/scope_exit/test
From: lorcaminiti_at_[hidden]
Date: 2012-04-09 16:32:20


Author: lcaminiti
Date: 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
New Revision: 77861
URL: http://svn.boost.org/trac/boost/changeset/77861

Log:
Final (?) updated of ScopeExit docs.
Text files modified:
   trunk/boost/scope_exit.hpp | 389 ++++++++++++++++++++++++++++-----------
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html | 23 +-
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html | 34 ++-
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html | 14
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html | 18 -
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html | 16
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html | 24 +-
   trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html | 13
   trunk/libs/scope_exit/doc/html/index.html | 14
   trunk/libs/scope_exit/doc/html/reference.html | 11
   trunk/libs/scope_exit/doc/html/scope_exit/Acknowledgements.html | 20 +-
   trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html | 25 +-
   trunk/libs/scope_exit/doc/html/scope_exit/Getting_Started.html | 12
   trunk/libs/scope_exit/doc/html/scope_exit/No_Variadic_Macros.html | 76 +++++--
   trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html | 278 +++++++++++++++++-----------
   trunk/libs/scope_exit/doc/scope_exit.qbk | 160 ++++++++-------
   trunk/libs/scope_exit/test/same_line.cpp | 29 ++
   trunk/libs/scope_exit/test/world_this.cpp | 2
   trunk/libs/scope_exit/test/world_void.cpp | 4
   19 files changed, 716 insertions(+), 446 deletions(-)

Modified: trunk/boost/scope_exit.hpp
==============================================================================
--- trunk/boost/scope_exit.hpp (original)
+++ trunk/boost/scope_exit.hpp 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -769,16 +769,19 @@
 // PUBLIC //
 
 #if defined(BOOST_NO_VARIADIC_MACROS) // No variadic macros (sequences only).
-# define BOOST_SCOPE_EXIT_ID(id, within_template, void_or_seq) \
- BOOST_SCOPE_EXIT_AUX_IMPL(id, \
- BOOST_PP_EXPR_IIF(within_template, typename), \
+# define BOOST_SCOPE_EXIT_ID(id, void_or_seq) \
+ BOOST_SCOPE_EXIT_AUX_IMPL(id, BOOST_PP_EMPTY(), \
+ BOOST_SCOPE_EXIT_AUX_TRAITS( \
+ BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(void_or_seq)))
+# define BOOST_SCOPE_EXIT_TPL_ID(id, void_or_seq) \
+ BOOST_SCOPE_EXIT_AUX_IMPL(id, typename, \
                 BOOST_SCOPE_EXIT_AUX_TRAITS( \
                         BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(void_or_seq)))
 # define BOOST_SCOPE_EXIT(void_or_seq) \
- BOOST_SCOPE_EXIT_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, 0, \
+ BOOST_SCOPE_EXIT_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, \
                 void_or_seq)
 # define BOOST_SCOPE_EXIT_TPL(void_or_seq) \
- BOOST_SCOPE_EXIT_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, 1, \
+ BOOST_SCOPE_EXIT_TPL_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, \
                 void_or_seq)
 # if !defined(BOOST_NO_LAMBDAS)
 # define BOOST_SCOPE_EXIT_ALL_ID(id, seq) \
@@ -839,13 +842,15 @@
 #else // DOXYGEN
 
 /** @file
-_at_brief Scope exits allow to execute arbitrary code when the enclosing scope exits.
+@brief Scope exits allow to execute arbitrary code when the enclosing scope
+exits.
 */
 
 /**
 @brief This macro declares a scope exit.
 
-The scope exit declaration schedules the execution of the scope exit body at the exit of the enclosing scope:
+The scope exit declaration schedules the execution of the scope exit body at
+the exit of the enclosing scope:
 
 @code
     { // Some local scope.
@@ -858,12 +863,16 @@
 @endcode
 
 The enclosing scope must be local.
-If multiple scope exits are declared within the same enclosing scope, the scope exit bodies are executed in the reversed order of their declarations.
-Note how the end of the scope exit body must be marked by @RefMacro{BOOST_SCOPE_EXIT_END} (or by a <c>;</c> but only on C++11).
+If multiple scope exits are declared within the same enclosing scope, the scope
+exit bodies are executed in the reversed order of their declarations.
+Note how the end of the scope exit body must be marked by
+@RefMacro{BOOST_SCOPE_EXIT_END}.
 
 @Params
 @Param{capture_list,
-On compilers that support variadic macros\, the capture list syntax is defined by the following grammar:
+On compilers that support variadic macros (see also Boost.Config
+<c>BOOST_NO_VARIADIC_MACROS</c>)\, the capture list syntax is defined by the
+following grammar:
 @code
     capture_list:
             void | capture_tuple | capture_sequence
@@ -874,54 +883,91 @@
     capture:
             [&]variable | this_
 @endcode
-On compilers that do not support variadic macros\, <c>capture_tuple</c> cannot be used:
+On compilers that do not support variadic macros\, <c>capture_tuple</c> cannot
+be used:
 @code
     capture_list:
             void | capture_sequence
 @endcode
-Finally\, on C++11 compilers <c>this</c> can be used instead of <c>this_</c>:
+Furthermore\, if @RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS} is defined on
+C++11 compilers that support lambda functions (i.e.\, Boost.Config's <c>BOOST_NO_LAMBDAS</c> is not defined) then a semicolon <c>;</c> can be used instead of
+@RefMacro{BOOST_SCOPE_EXIT_END} and <c>this</c> can be used instead of
+<c>this_</c>:
 @code
     capture:
             [&]variable | this_ | this
 @endcode
 
-Lexical conventions: <c>token1 | token2</c> means either <c>token1</c> or
+(Lexical conventions: <c>token1 | token2</c> means either <c>token1</c> or
 <c>token2</c>; <c>[token]</c> means either <c>token</c> or nothing;
-<c>{expression}</c> means the token resulting from the expression.
+<c>{expression}</c> means the tokens resulting from the expression.)
 }
 @EndParams
 
-Note that on compilers with variadic macro support (most of moder compliers and all C++11 compilers), the capture list can be specified as a comma-separated list of tokens.
-On all compilers, the same macro @RefMacro{BOOST_SCOPE_EXIT} also allows to specify the capture list as a Boost.Preprocessor sequence of tokens (for supporting compilers without variadic macros and for backward compatibility with older versions of this library).
-
-The name <c>variable</c> of each captured variable must be a valid name in the enclosing scope and it must appear exactly once in the capture list.
-If a capture starts with the ampersand sign <c>&</c>, the corresponding variable will be available by reference within the scope exit body; otherwise, a copy of the variable will be made at the point of the scope exit declaration and that copy will be available inside the scope exit body (in this case, the variable's type must be <c>CopyConstructible</c>).
-
-From within a member function, the object <c>this</c> can be captured using the special symbol <c>this_</c> in both the capture list and the scope exit body (using <c>this</c> instead of <c>this_</c> in the scope exit body leads to undefined behaviour).
-On C++11 it is possible (but not required) to use <c>this</c> instead of <c>this_</c>.
-
-It is possible to capture no variable by specifying the capture list as <c>void</c> (regardless of variadic macro support).
-
-Only variables listed in the capture list, static variables, <c>extern</c> variables, global variables, functions, and enumerations from the enclosing scope can be used inside the scope exit body.
-
-On various GCC versions the special macro @RefMacro{BOOST_SCOPE_EXIT_TPL} must be used instead of @RefMacro{BOOST_SCOPE_EXIT} within templates (this is not necessary on C++11).
-
-On C++11, it is possible capture all variables in scope without listing their names using the macro @RefMacro{BOOST_SCOPE_EXIT_ALL}.
-
-_at_Warning The implementation executes the scope exit body within a destructor thus the scope exit body must never throw in order to comply with STL exception safety requirements.
-
-_at_Note The implementation uses Boost.Typeof to automatically deduce the types of the captured variables.
-In order to compile code in type-of emulation mode, Boost.Typeof must be properly configured (see the @RefSectId{Getting_Started, Getting Started} section).
-
-_at_See @RefSect{Tutorial} section, @RefSectId{Getting_Started, Getting Started} section, @RefSectId{No_Variadic_Macros, No Variadic Macros} section, @RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_ALL}, @RefMacro{BOOST_SCOPE_EXIT_END}.
+Note that on compilers that support variadic macros (most of moder compliers
+and all C++11 compilers), the capture list can be specified as a
+comma-separated list of tokens (this is the preferred syntax).
+However, on all compilers the same macro @RefMacro{BOOST_SCOPE_EXIT} also
+allows to specify the capture list as a Boost.Preprocessor sequence of tokens
+(for supporting compilers without variadic macros and for backward compatibility with older versions of this library).
+
+The name <c>variable</c> of each captured variable must be a valid name in the
+enclosing scope and it must appear exactly once in the capture list.
+If a capture starts with the ampersand sign <c>&</c>, the corresponding
+variable will be available by reference within the scope exit body; otherwise,
+a copy of the variable will be made at the point of the scope exit declaration
+and that copy will be available inside the scope exit body (in this case, the
+variable's type must be <c>CopyConstructible</c>).
+
+From within a member function, the object <c>this</c> can be captured using the
+special name <c>this_</c> in both the capture list and the scope exit body
+(using <c>this</c> instead of <c>this_</c> in the scope exit body leads to
+undefined behaviour).
+
+It is possible to capture no variable by specifying the capture list as
+<c>void</c> (regardless of variadic macro support).
+
+Only variables listed in the capture list, static variables, <c>extern</c>
+variables, global variables, functions, and enumerations from the enclosing
+scope can be used inside the scope exit body.
+
+On various GCC versions the special macro @RefMacro{BOOST_SCOPE_EXIT_TPL} must
+be used instead of @RefMacro{BOOST_SCOPE_EXIT} within templates (to maximize
+portability, it is recommended to always use @RefMacro{BOOST_SCOPE_EXIT_TPL}
+within templates).
+
+On C++11, it is possible capture all variables in scope without listing their
+names one-by-one using the macro @RefMacro{BOOST_SCOPE_EXIT_ALL}.
+
+In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_ID} must be used
+instead of @RefMacro{BOOST_SCOPE_EXIT} when it is necessary to expand multiple
+scope exit declarations on the same line.
+
+@Warning The implementation executes the scope exit body within a destructor
+thus the scope exit body must never throw in order to comply with STL exception
+safety requirements.
+
+@Note The implementation uses Boost.Typeof to automatically deduce the types of
+the captured variables.
+In order to compile code in type-of emulation mode, all types must be properly
+registered with Boost.Typeof (see the
+@RefSectId{Getting_Started, Getting Started} section).
+
+@See @RefSect{Tutorial} section, @RefSectId{Getting_Started, Getting Started}
+section, @RefSectId{No_Variadic_Macros, No Variadic Macros} section,
+@RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_ALL},
+@RefMacro{BOOST_SCOPE_EXIT_END}, @RefMacro{BOOST_SCOPE_EXIT_ID}.
 */
 #define BOOST_SCOPE_EXIT(capture_list)
 
 /**
-_at_brief This macro is a workaround to declare a scope exit for various versions of GCC.
+@brief This macro is a workaround for various versions of GCC to declare scope
+exits within templates.
 
-Various versions of the GCC compiler do not compile @RefMacro{BOOST_SCOPE_EXIT} inside function templates.
-As a workaround, @RefMacro{BOOST_SCOPE_EXIT_TPL} should be used instead of @RefMacro{BOOST_SCOPE_EXIT} in these cases:
+Various versions of the GCC compiler do not compile @RefMacro{BOOST_SCOPE_EXIT}
+inside function templates.
+As a workaround, @RefMacro{BOOST_SCOPE_EXIT_TPL} should be used instead of
+@RefMacro{BOOST_SCOPE_EXIT} in these cases:
 
 @code
     { // Some local scope.
@@ -933,12 +979,23 @@
     }
 @endcode
 
-The syntax of @RefMacro{BOOST_SCOPE_EXIT_TPL} is the exact same as the one of @RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more information).
+The syntax of @RefMacro{BOOST_SCOPE_EXIT_TPL} is the exact same as the one of
+@RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more
+information).
 
-On C++11, @RefMacro{BOOST_SCOPE_EXIT_TPL} is not needed because @RefMacro{BOOST_SCOPE_EXIT} always compiles on GCC versions that support C++11 (that is also why there is no need for a <c>BOOST_SCOPE_EXIT_ALL_TPL</c> macro given that @RefMacro{BOOST_SCOPE_EXIT_ALL} is only available for C++11 compilers on which it always compiles correctly).
+On C++11 compilers, @RefMacro{BOOST_SCOPE_EXIT_TPL} is not needed because
+@RefMacro{BOOST_SCOPE_EXIT} always compiles on GCC versions that support C++11.
 However, @RefMacro{BOOST_SCOPE_EXIT_TPL} is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers.
+It is recommended to always use @RefMacro{BOOST_SCOPE_EXIT_TPL} within
+templates so to maximize portability.
 
-_at_Note The problem boils down to the following code (see also GCC bug 37920):
+In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_TPL_ID} must be used
+instead of @RefMacro{BOOST_SCOPE_EXIT_TPL} when it is necessary to expand
+multiple scope exit declarations on the same line within templates.
+
+@Note The issue in compiling scope exit declarations that some GCC versions
+have is illustrated by the following code (see also
+GCC bug 37920):
 @code
     template<class T>
     void f(T const& x) {
@@ -953,55 +1010,94 @@
 
     int main(void) { f(0); }
 @endcode
-This can be fixed by adding <c>typename</c> in front of <c>local::typeof_i</c> and <c>local::typeof_x</c> (which is the approach followed by the implementation of @RefMacro{BOOST_SCOPE_EXIT_TPL}).
+This can be fixed by adding <c>typename</c> in front of <c>local::typeof_i</c>
+and <c>local::typeof_x</c> (which is the approach followed by the
+implementation of the @RefMacro{BOOST_SCOPE_EXIT_TPL} macro).
 
-_at_Note Although @RefMacro{BOOST_SCOPE_EXIT_TPL} has the same suffix as <c>BOOST_TYPEOF_TPL</c>, it does not follow the Boost.Typeof convention.
+@Note Although @RefMacro{BOOST_SCOPE_EXIT_TPL} has the same suffix as
+<c>BOOST_TYPEOF_TPL</c>, it does not follow the Boost.Typeof convention.
 
-_at_See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_END}.
+@See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT},
+@RefMacro{BOOST_SCOPE_EXIT_END}, @RefMacro{BOOST_SCOPE_EXIT_TPL_ID}.
 */
 #define BOOST_SCOPE_EXIT_TPL(capture_list)
 
 /**
-_at_brief This macro allows to expand multiple scope exit macros on the same line.
+@brief This macro allows to expand multiple scope exit declarations on the same
+line.
 
 This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT} but it can be expanded
 multiple times on the same line if different identifiers <c>id</c> are provided
-for each expansion (see @RefMacro{BOOST_SCOPE_EXIT} for more detail).
+for each expansion (see @RefMacro{BOOST_SCOPE_EXIT} for more information).
 
 @Params
 @Param{id,
- A unique identifier token which can be catted by the preprocessor (for
- example <c>__LINE__</c> or <c>scope_exit_number_1_on_line_123</c>).
+A unique identifier token which can be concatenated by the preprocessor
+(<c>__LINE__</c>\, <c>scope_exit_number_1_on_line_123</c>\, a combination of
+alphanumeric tokens\, etc).
 }
-_at_Param{within_template,
- Specify <c>1</c> when this macro is used in a type-dependant context
- on GCC\, <c>1</c> otherwise (this is equivalent to using
- @RefMacro{BOOST_SCOPE_EXIT_TPL} on separate lines).
+@Param{capture_list,
+Same as the <c>capture_list</c> parameter of the @RefMacro{BOOST_SCOPE_EXIT}
+macro.
+}
+@EndParams
+
+@Note This macro can be useful when the scope exit macros are expanded
+within user-defined macros (because nested macros expand on the same line).
+On some compilers (e.g., MSVC which supports the non standard
+<c>__COUNTER__</c> macro) it might not be necessary to use this macro but
+the use of this macro is always necessary to ensure portability when expanding
+multiple scope exit declarations on the same line.
+
+@See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT},
+@RefMacro{BOOST_SCOPE_EXIT_END_ID}, @RefMacro{BOOST_SCOPE_EXIT_ALL_ID},
+@RefMacro{BOOST_SCOPE_EXIT_TPL_ID}.
+*/
+#define BOOST_SCOPE_EXIT_ID(id, capture_list)
+
+/**
+@brief This macro is required to expand multiple scope exit declarations on the
+same line within templates on various versions of GCC.
+
+This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_TPL} but it can be
+expanded multiple times on the same line if different identifiers <c>id</c> are
+provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_TPL} for more
+information).
+As with @RefMacro{BOOST_SCOPE_EXIT_TPL}, it is recommended to always use this
+macro when expanding scope exits multiple times on the same line within
+templates.
+
+@Params
+@Param{id,
+A unique identifier token which can be concatenated by the preprocessor
+(<c>__LINE__</c>\, <c>scope_exit_number_1_on_line_123</c>\, a combination of
+alphanumeric tokens\, etc).
 }
 @Param{capture_list,
- Same as the <c>capture_list</c> parameter of the
- @RefMacro{BOOST_SCOPE_EXIT} macro.
+Same as the <c>capture_list</c> parameter of the
+@RefMacro{BOOST_SCOPE_EXIT_TPL} macro.
 }
 @EndParams
 
 @Note This macro can be useful when the scope exit macros are expanded
-within user-defined macros (because macros all expand on the same line).
+within user-defined macros (because nested macros expand on the same line).
 On some compilers (e.g., MSVC which supports the non standard
 <c>__COUNTER__</c> macro) it might not be necessary to use this macro but
 the use of this macro is always necessary to ensure portability when expanding
-multiple scope exit macros on the same line (because this library can only
-portably use <c>__LINE__</c> to internally generate unique identifiers).
+multiple scope exit declarations on the same line.
 
-_at_See @RefMacro{BOOST_SCOPE_EXIT_END_ID}, @RefMacro{BOOST_SCOPE_EXIT_ALL_ID},
- @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_TPL}.
+@See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT_TPL},
+@RefMacro{BOOST_SCOPE_EXIT_END_ID}, @RefMacro{BOOST_SCOPE_EXIT_ID},
+@RefMacro{BOOST_SCOPE_EXIT_ALL_ID}.
 */
-#define BOOST_SCOPE_EXIT_ID(id, within_template, capture_list)
+#define BOOST_SCOPE_EXIT_TPL_ID(id, capture_list)
 
 /**
-_at_brief This macro declares a scope exit that captures all variables in scope (C++11 only).
+@brief This macro declares a scope exit that captures all variables in scope
+(C++11 only).
 
 This macro accepts a capture list starting with either <c>&</c> or <c>=</c> to capture all variables in scope by reference or value respectively (following the same syntax of C++11 lambdas).
-A part from that, this macro works like @RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more information).
+A part from that, this macro works like @RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more information):
 
 @code
     { // Some local scope.
@@ -1013,11 +1109,19 @@
     }
 @endcode
 
-_at_Warning This macro is only available on C++11 compilers.
+Note how the end of the scope exit body declared by this macro must be marked
+by a semi-column <c>;</c> (and not by @RefMacro{BOOST_SCOPE_EXIT_END}).
+
+@Warning This macro is only available on C++11 compilers (specifically, on
+C++11 compilers that do not define the Boost.Config <c>BOOST_NO_LAMBDAS</c>
+macro).
 It is not defined on non-C++11 compilers so its use on non-C++11 compilers will generate a compiler error.
 
 @Params
 @Param{capture_list,
+On compilers that support variadic macros (see also Boost.Config
+<c>BOOST_NO_VARIADIC_MACROS</c>)\, the capture list syntax is defined by the
+following grammar:
 @code
 capture_list:
         capture_tuple | capture_sequence
@@ -1026,66 +1130,102 @@
 capture_sequence:
         {(&) | (=)} [(capture) (capture) ...]
 capture:
- [&]variable | this_ | this
+ [&]variable | this_
+@endcode
+On compilers that do not support variadic macros\, <c>capture_tuple</c> cannot
+be used:
+@code
+ capture_list:
+ void | capture_sequence
+@endcode
+Furthermore\, on C++11 compilers that support the use of <c>typename</c>
+outside templates\, also <c>this</c> can be used to capture the object at member
+function scope:
+@code
+ capture:
+ [&]variable | this_ | this
 @endcode
 
-Lexical conventions: <c>token1 | token2</c> means either <c>token1</c> or
+(Lexical conventions: <c>token1 | token2</c> means either <c>token1</c> or
 <c>token2</c>; <c>[token]</c> means either <c>token</c> or nothing;
-<c>{expression}</c> means the token resulting from the expression.
+<c>{expression}</c> means the token resulting from the expression.)
 }
 @EndParams
 
-For this macro, the capture list must always contain at least the leading <c>&</c> or <c>=</c> so it can never be <c>void</c>.
-
-Note that on compilers with variadic macro support (which should be all C++11 compilers), the capture list can be specified as a comma-separated list.
-On all compilers, the same macro @RefMacro{BOOST_SCOPE_EXIT_ALL} also allows to specify the capture list as a Boost.Preprocessor sequence (to allow to use a syntax consistent with the one of <c>BOOST_SCOPE_EXIT</c> when used on compilers without variadic macro support).
-The scope exit body declared by this macro can be terminated equivalently by either a semi-column <c>;</c> or by the macro @RefMacro{BOOST_SCOPE_EXIT_END}.
-The @RefMacro{BOOST_SCOPE_EXIT_ALL} macro is only available on C++11 where the terminating semi-column <c>;</c> can always be used without worrying about portability with C++03 (see @RefMacro{BOOST_SCOPE_EXIT_END} for more information).
-Similarly, this macro can always use <c>this</c> instead of <c>this_</c> to capture the enclosing object without worrying about portability with C++03 because this macro is only available on C++11 compilers.
+Note that on compilers with variadic macro support (which should be all C++11
+compilers), the capture list can be specified as a comma-separated list.
+On all compilers, the same macro @RefMacro{BOOST_SCOPE_EXIT_ALL} also allows to
+specify the capture list as a Boost.Preprocessor sequence.
+
+The capture list must always contain at least the leading <c>&</c> or <c>=</c>
+so it can never be <c>void</c> (<c>BOOST_SCOPE_EXIT(void)</c> should be used
+to program scope exits with an empty capture list).
+
+In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_ALL_ID} must be used
+instead of @RefMacro{BOOST_SCOPE_EXIT_ALL} when it is necessary to expand
+multiple scope exit declarations on the same line.
+
+@Warning This macro capture list follows the exact same syntax of C++11 lambda
+captures which is unfortunately different from the syntax of
+@RefMacro{BOOST_SCOPE_EXIT} captures (unless programmers define the
+@RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS} macro).
+For example, like C++11 lambda functions, @RefMacro{BOOST_SCOPE_EXIT_ALL}
+requires to capture data members by capturing the object <c>this</c> while
+@RefMacro{BOOST_SCOPE_EXIT} allows to capture data members directly and without
+capturing the object.
+
+@Warning The implementation executes the scope exit body within a destructor
+thus the scope exit body must never throw in order to comply with STL exception
+safety requirements.
 
-_at_Note In summary, this macro can take advantage of all syntax improvements allowed by C++11 but it optionally supports the same syntax required by C++03 so programmers can always program both @RefMacro{BOOST_SCOPE_EXIT_ALL} and @RefMacro{BOOST_SCOPE_EXIT} using the same syntax and for all compilers if they wish to do so.
+@Note This macro can always be used also within templates (so there is no need
+for a <c>BOOST_SCOPE_EXIT_ALL_TPL</c> macro).
 
-_at_Warning The implementation executes the scope exit body within a destructor thus the scope exit body must never throw in order to comply with STL exception safety requirements.
-
-_at_See @RefSect{Tutorial} section, @RefSectId{No_Variadic_Macros, No Variadic Macros} section, @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_END}.
+@See @RefSect{Tutorial} section, @RefSectId{No_Variadic_Macros, No Variadic Macros} section, @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_ALL_ID}.
 */
 #define BOOST_SCOPE_EXIT_ALL(capture_list)
 
 /**
-_at_brief This macro allows to expand multiple scope exit macros on the same line.
+@brief This macro allows to expand on the same line multiple scope exits that
+capture all variables in scope (C++11 only).
 
 This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_ALL} but it can be
 expanded multiple times on the same line if different identifiers <c>id</c> are
 provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_ALL} for more
-detail).
+information).
+As with @RefMacro{BOOST_SCOPE_EXIT_ALL}, this macro is only available on C++11
+compilers (specifically, on C++11 compilers that do not define the
+Boost.Config <c>BOOST_NO_LAMBDAS</c> macro).
 
 @Params
 @Param{id,
- A unique identifier token which can be catted by the preprocessor (for
- example <c>__LINE__</c> or <c>scope_exit_number_1_on_line_123</c>).
+A unique identifier token which can be concatenated by the preprocessor
+(<c>__LINE__</c>\, <c>scope_exit_number_1_on_line_123</c>\, a combination of
+alphanumeric tokens\, etc).
 }
 @Param{capture_list,
- Same as the <c>capture_list</c> parameter of the
- @RefMacro{BOOST_SCOPE_EXIT} macro.
+Same as the <c>capture_list</c> parameter of the
+@RefMacro{BOOST_SCOPE_EXIT_ALL} macro.
 }
 @EndParams
 
 @Note This macro can be useful when the scope exit macros are expanded
-within user-defined macros (because macros all expand on the same line).
+within user-defined macros (because nested macros expand on the same line).
 On some compilers (e.g., MSVC which supports the non standard
 <c>__COUNTER__</c> macro) it might not be necessary to use this macro but
 the use of this macro is always necessary to ensure portability when expanding
-multiple scope exit macros on the same line (because this library can only
-portably use <c>__LINE__</c> to internally generate unique identifiers).
+multiple scope exit declarations on the same line.
 
-_at_See @RefMacro{BOOST_SCOPE_EXIT_ID}, @RefMacro{BOOST_SCOPE_EXIT_ALL}.
+@See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT_ALL},
+@RefMacro{BOOST_SCOPE_EXIT_ID}.
 */
 #define BOOST_SCOPE_EXIT_ALL_ID(id, capture_list)
 
 /**
 @brief This macro marks the end of a scope exit body.
 
-This macro must follow the closing curly bracket <c>}</c> that ends the scope exit body:
+This macro must follow the closing curly bracket <c>}</c> that ends the body of
+either @RefMacro{BOOST_SCOPE_EXIT} or @RefMacro{BOOST_SCOPE_EXIT_TPL}:
 
 @code
     { // Some local scope.
@@ -1097,34 +1237,35 @@
     }
 @endcode
 
-On C++11, this macro is not necessary and it can be replaced by a semi-column <c>;</c> :
-_at_code
- { // Some local scope.
- ...
- BOOST_SCOPE_EXIT(capture_list) {
- ... // Body code.
- }; // C++11 only.
- ...
- }
-_at_endcode
-However, @RefMacro{BOOST_SCOPE_EXIT_END} is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers.
+In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_END_ID} must be used
+instead of @RefMacro{BOOST_SCOPE_EXIT_END} when it is necessary to expand
+multiple scope exit bodies on the same line.
+
+@Note If programmers define the @RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS}
+macro on C++11 compilers, a semicolon <c>;</c> can be used instead of this
+macro.
+However, to maximize portability, it is recommended to always use
+@RefMacro{BOOST_SCOPE_EXIT_END}.
 
-_at_See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_ALL}.
+@See @RefSect{Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT},
+@RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_END_ID}.
 */
 #define BOOST_SCOPE_EXIT_END
 
 /**
-_at_brief This macro allows to expand multiple scope exit macros on the same line.
+@brief This macro allows to terminate multiple scope exit bodies on the same
+line.
 
 This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_END} but it can be
 expanded multiple times on the same line if different identifiers <c>id</c> are
 provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_END} for more
-detail).
+information).
 
 @Params
 @Param{id,
- A unique identifier token which can be catted by the preprocessor (for
- example <c>__LINE__</c> or <c>scope_exit_number_1_on_line_123</c>).
+A unique identifier token which can be concatenated by the preprocessor
+(<c>__LINE__</c>\, <c>scope_exit_number_1_on_line_123</c>\, a combination of
+alphanumeric tokens\, etc).
 }
 @EndParams
 
@@ -1136,24 +1277,40 @@
 multiple scope exit macros on the same line (because this library can only
 portably use <c>__LINE__</c> to internally generate unique identifiers).
 
-_at_See @RefMacro{BOOST_SCOPE_EXIT_ID}, @RefMacro{BOOST_SCOPE_EXIT_END}.
+@See @RefMacro{BOOST_SCOPE_EXIT_ID}, @RefMacro{BOOST_SCOPE_EXIT_TPL_ID},
+@RefMacro{BOOST_SCOPE_EXIT_END}.
 */
 #define BOOST_SCOPE_EXIT_END_ID(id)
 
 /**
-_at_brief Force to use C++11 lambda implementation for scope-exit macro.
+@brief Force to use C++11 lambda functions to implement scope exits.
 
-If programmers define this configuration macro on a C++11 compiler, lambda functions will be used to implement the @RefMacro{BOOST_SCOPE_EXIT} macro.
+If programmers define this configuration macro on a C++11 compiler for which
+the Boost.Config macro <c>BOOST_NO_LAMBDAS</c> is not defined, the
+@RefMacro{BOOST_SCOPE_EXIT} and @RefMacro{BOOST_SCOPE_EXIT_TPL} macros will use
+C++11 lambda functions to declare scope exits.
 By default this macro is not defined.
 
-_at_Note When @RefMacro{BOOST_SCOPE_EXIT} is implemented using lambda, the semantics of its variable captures follow the semantics of C++11 lambda captures which are in general different from the legacy capture semantics of this library (e.g., C++11 lambdas require to capture data members via capturing the object <c>this</c> while this library always allowed to capture data members directly).
-Therefore, when this configuration macro is defined, @RefMacro{BOOST_SCOPE_EXIT} is no longer backward compatible.
-
-A semicolon <c>;</c> can simply be used instead of @RefMacro{BOOST_SCOPE_EXIT_END} when this configuration macro is defined.
-
-This configuration macro does not control the definition of @RefMacro{BOOST_SCOPE_EXIT_ALL} which is always and automatically defined on compilers that support C++11 lambdas.
+@Warning When scope exits are implemented using lambda functions, the syntax of
+the capture list follows the exact same syntax of C++11 lambda captures
+which is in general different from the legacy capture syntax of this library.
+For example, C++11 lambdas require to capture data members by capturing the
+object <c>this</c> while this library always allowed to capture data members
+directly.
+Therefore, when this configuration macro is defined,
+@RefMacro{BOOST_SCOPE_EXIT} and @RefMacro{BOOST_SCOPE_EXIT_TPL} are no longer
+backward compatible (and this is why this macro is not defined by default).
+
+A semicolon <c>;</c> can be used instead of @RefMacro{BOOST_SCOPE_EXIT_END}
+when this configuration macro is defined (but it is recommended to always use
+@RefMacro{BOOST_SCOPE_EXIT_END} so to maximize portability).
+
+@Note This configuration macro does not control the definition of
+@RefMacro{BOOST_SCOPE_EXIT_ALL} which is always and automatically defined on
+compilers that support C++11 lambda functions.
 
-_at_See @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_ALL}, @RefMacro{BOOST_SCOPE_EXIT_END}.
+@See @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_TPL},
+@RefMacro{BOOST_SCOPE_EXIT_END}.
 */
 #define BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS
 

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -33,7 +33,7 @@
 
 </span>BOOST_SCOPE_EXIT(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id852211"></a><h2>Description</h2>
+<a name="id855581"></a><h2>Description</h2>
 <p>The scope exit declaration schedules the execution of the scope exit body at the exit of the enclosing scope:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>
@@ -43,7 +43,7 @@
         <span class="special">...</span>
     <span class="special">}</span>
 </pre>
-<p>The enclosing scope must be local. If multiple scope exits are declared within the same enclosing scope, the scope exit bodies are executed in the reversed order of their declarations. Note how the end of the scope exit body must be marked by <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> (or by a <code class="computeroutput">;</code> but only on C++11).</p>
+<p>The enclosing scope must be local. If multiple scope exits are declared within the same enclosing scope, the scope exit bodies are executed in the reversed order of their declarations. Note how the end of the scope exit body must be marked by <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>.</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -52,7 +52,7 @@
 </colgroup>
 <tbody><tr>
 <td><span class="bold"><strong><code class="computeroutput">capture_list</code></strong></span></td>
-<td>On compilers that support variadic macros, the capture list syntax is defined by the following grammar: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture_list</span><span class="special">:</span>
+<td>On compilers that support variadic macros (see also Boost.Config <code class="computeroutput">BOOST_NO_VARIADIC_MACROS</code>), the capture list syntax is defined by the following grammar: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture_list</span><span class="special">:</span>
             <span class="keyword">void</span> <span class="special">|</span> <span class="identifier">capture_tuple</span> <span class="special">|</span> <span class="identifier">capture_sequence</span>
     <span class="identifier">capture_tuple</span><span class="special">:</span>
             <span class="identifier">capture</span><span class="special">,</span> <span class="identifier">capture</span><span class="special">,</span> <span class="special">...</span>
@@ -62,23 +62,24 @@
             <span class="special">[</span><span class="special">&amp;</span><span class="special">]</span><span class="identifier">variable</span> <span class="special">|</span> <span class="identifier">this_</span>
 </pre> On compilers that do not support variadic macros, <code class="computeroutput">capture_tuple</code> cannot be used: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture_list</span><span class="special">:</span>
             <span class="keyword">void</span> <span class="special">|</span> <span class="identifier">capture_sequence</span>
-</pre> Finally, on C++11 compilers <code class="computeroutput">this</code> can be used instead of <code class="computeroutput">this_</code>: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture</span><span class="special">:</span>
+</pre> Furthermore, if <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS</a></code> is defined on C++11 compilers that support lambda functions (i.e., Boost.Config's <code class="computeroutput">BOOST_NO_LAMBDAS</code> is not defined) then a semicolon <code class="computeroutput">;</code> can be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> and <code class="computeroutput">this</code> can be used instead of <code class="computeroutput">this_</code>: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture</span><span class="special">:</span>
             <span class="special">[</span><span class="special">&amp;</span><span class="special">]</span><span class="identifier">variable</span> <span class="special">|</span> <span class="identifier">this_</span> <span class="special">|</span> <span class="keyword">this</span>
-</pre>Lexical conventions: <code class="computeroutput">token1 | token2</code> means either <code class="computeroutput">token1</code> or <code class="computeroutput">token2</code>; <code class="computeroutput">[token]</code> means either <code class="computeroutput">token</code> or nothing; <code class="computeroutput">{expression}</code> means the token resulting from the expression. </td>
+</pre>(Lexical conventions: <code class="computeroutput">token1 | token2</code> means either <code class="computeroutput">token1</code> or <code class="computeroutput">token2</code>; <code class="computeroutput">[token]</code> means either <code class="computeroutput">token</code> or nothing; <code class="computeroutput">{expression}</code> means the tokens resulting from the expression.) </td>
 </tr></tbody>
 </table></div>
 <p>
 </p>
-<p>Note that on compilers with variadic macro support (most of moder compliers and all C++11 compilers), the capture list can be specified as a comma-separated list of tokens. On all compilers, the same macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> also allows to specify the capture list as a Boost.Preprocessor sequence of tokens (for supporting compilers without variadic macros and for backward compatibility with older versions of this library).</p>
+<p>Note that on compilers that support variadic macros (most of moder compliers and all C++11 compilers), the capture list can be specified as a comma-separated list of tokens (this is the preferred syntax). However, on all compilers the same macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> also allows to specify the capture list as a Boost.Preprocessor sequence of tokens (for supporting compilers without variadic macros and for backward compatibility with older versions of this library).</p>
 <p>The name <code class="computeroutput">variable</code> of each captured variable must be a valid name in the enclosing scope and it must appear exactly once in the capture list. If a capture starts with the ampersand sign <code class="computeroutput">&amp;</code>, the corresponding variable will be available by reference within the scope exit body; otherwise, a copy of the variable will be made at the point of the scope exit declaration and that copy will be available inside the scope exit body (in this case, the variable's type must be <code class="computeroutput">CopyConstructible</code>).</p>
-<p>From within a member function, the object <code class="computeroutput">this</code> can be captured using the special symbol <code class="computeroutput">this_</code> in both the capture list and the scope exit body (using <code class="computeroutput">this</code> instead of <code class="computeroutput">this_</code> in the scope exit body leads to undefined behaviour). On C++11 it is possible (but not required) to use <code class="computeroutput">this</code> instead of <code class="computeroutput">this_</code>.</p>
+<p>From within a member function, the object <code class="computeroutput">this</code> can be captured using the special name <code class="computeroutput">this_</code> in both the capture list and the scope exit body (using <code class="computeroutput">this</code> instead of <code class="computeroutput">this_</code> in the scope exit body leads to undefined behaviour).</p>
 <p>It is possible to capture no variable by specifying the capture list as <code class="computeroutput">void</code> (regardless of variadic macro support).</p>
 <p>Only variables listed in the capture list, static variables, <code class="computeroutput">extern</code> variables, global variables, functions, and enumerations from the enclosing scope can be used inside the scope exit body.</p>
-<p>On various GCC versions the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> within templates (this is not necessary on C++11).</p>
-<p>On C++11, it is possible capture all variables in scope without listing their names using the macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>.</p>
+<p>On various GCC versions the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> within templates (to maximize portability, it is recommended to always use <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> within templates).</p>
+<p>On C++11, it is possible capture all variables in scope without listing their names one-by-one using the macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>.</p>
+<p>In general, the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> when it is necessary to expand multiple scope exit declarations on the same line.</p>
 <p><span class="bold"><strong>Warning:</strong></span> The implementation executes the scope exit body within a destructor thus the scope exit body must never throw in order to comply with STL exception safety requirements.</p>
-<p><span class="bold"><strong>Note:</strong></span> The implementation uses Boost.Typeof to automatically deduce the types of the captured variables. In order to compile code in type-of emulation mode, Boost.Typeof must be properly configured (see the <a class="link" href="scope_exit/Getting_Started.html" title="Getting Started"> Getting Started</a> section).</p>
-<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="scope_exit/Getting_Started.html" title="Getting Started"> Getting Started</a> section, <a class="link" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros"> No Variadic Macros</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
+<p><span class="bold"><strong>Note:</strong></span> The implementation uses Boost.Typeof to automatically deduce the types of the captured variables. In order to compile code in type-of emulation mode, all types must be properly registered with Boost.Typeof (see the <a class="link" href="scope_exit/Getting_Started.html" title="Getting Started"> Getting Started</a> section).</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="scope_exit/Getting_Started.html" title="Getting Started"> Getting Started</a> section, <a class="link" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros"> No Variadic Macros</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">
-<link rel="prev" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">
+<link rel="prev" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">
 <link rel="next" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_SCOPE_EXIT_ALL"></a><div class="titlepage"></div>
@@ -33,8 +33,8 @@
 
 </span>BOOST_SCOPE_EXIT_ALL(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id853508"></a><h2>Description</h2>
-<p>This macro accepts a capture list starting with either <code class="computeroutput">&amp;</code> or <code class="computeroutput">=</code> to capture all variables in scope by reference or value respectively (following the same syntax of C++11 lambdas). A part from that, this macro works like <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more information).</p>
+<a name="id857075"></a><h2>Description</h2>
+<p>This macro accepts a capture list starting with either <code class="computeroutput">&amp;</code> or <code class="computeroutput">=</code> to capture all variables in scope by reference or value respectively (following the same syntax of C++11 lambdas). A part from that, this macro works like <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more information):</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>
         <span class="identifier">BOOST_SCOPE_EXIT_ALL</span><span class="special">(</span><span class="identifier">capture_list</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// C++11 only.</span>
@@ -43,7 +43,8 @@
         <span class="special">...</span>
     <span class="special">}</span>
 </pre>
-<p><span class="bold"><strong>Warning:</strong></span> This macro is only available on C++11 compilers. It is not defined on non-C++11 compilers so its use on non-C++11 compilers will generate a compiler error.</p>
+<p>Note how the end of the scope exit body declared by this macro must be marked by a semi-column <code class="computeroutput">;</code> (and not by <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>).</p>
+<p><span class="bold"><strong>Warning:</strong></span> This macro is only available on C++11 compilers (specifically, on C++11 compilers that do not define the Boost.Config <code class="computeroutput">BOOST_NO_LAMBDAS</code> macro). It is not defined on non-C++11 compilers so its use on non-C++11 compilers will generate a compiler error.</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -52,25 +53,30 @@
 </colgroup>
 <tbody><tr>
 <td><span class="bold"><strong><code class="computeroutput">capture_list</code></strong></span></td>
-<td>
-<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">capture_list</span><span class="special">:</span>
+<td>On compilers that support variadic macros (see also Boost.Config <code class="computeroutput">BOOST_NO_VARIADIC_MACROS</code>), the capture list syntax is defined by the following grammar: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">capture_list</span><span class="special">:</span>
         <span class="identifier">capture_tuple</span> <span class="special">|</span> <span class="identifier">capture_sequence</span>
 <span class="identifier">capture_tuple</span><span class="special">:</span>
         <span class="special">{</span><span class="special">&amp;</span> <span class="special">|</span> <span class="special">=</span><span class="special">}</span> <span class="special">[</span><span class="special">,</span> <span class="identifier">capture</span><span class="special">,</span> <span class="identifier">capture</span><span class="special">,</span> <span class="special">...</span><span class="special">]</span>
 <span class="identifier">capture_sequence</span><span class="special">:</span>
         <span class="special">{</span><span class="special">(</span><span class="special">&amp;</span><span class="special">)</span> <span class="special">|</span> <span class="special">(</span><span class="special">=</span><span class="special">)</span><span class="special">}</span> <span class="special">[</span><span class="special">(</span><span class="identifier">capture</span><span class="special">)</span> <span class="special">(</span><span class="identifier">capture</span><span class="special">)</span> <span class="special">...</span><span class="special">]</span>
 <span class="identifier">capture</span><span class="special">:</span>
- <span class="special">[</span><span class="special">&amp;</span><span class="special">]</span><span class="identifier">variable</span> <span class="special">|</span> <span class="identifier">this_</span> <span class="special">|</span> <span class="keyword">this</span>
-</pre>Lexical conventions: <code class="computeroutput">token1 | token2</code> means either <code class="computeroutput">token1</code> or <code class="computeroutput">token2</code>; <code class="computeroutput">[token]</code> means either <code class="computeroutput">token</code> or nothing; <code class="computeroutput">{expression}</code> means the token resulting from the expression. </td>
+ <span class="special">[</span><span class="special">&amp;</span><span class="special">]</span><span class="identifier">variable</span> <span class="special">|</span> <span class="identifier">this_</span>
+</pre> On compilers that do not support variadic macros, <code class="computeroutput">capture_tuple</code> cannot be used: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture_list</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="special">|</span> <span class="identifier">capture_sequence</span>
+</pre> Furthermore, on C++11 compilers that support the use of <code class="computeroutput">typename</code> outside templates, also <code class="computeroutput">this</code> can be used to capture the object at member function scope: <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">capture</span><span class="special">:</span>
+ <span class="special">[</span><span class="special">&amp;</span><span class="special">]</span><span class="identifier">variable</span> <span class="special">|</span> <span class="identifier">this_</span> <span class="special">|</span> <span class="keyword">this</span>
+</pre>(Lexical conventions: <code class="computeroutput">token1 | token2</code> means either <code class="computeroutput">token1</code> or <code class="computeroutput">token2</code>; <code class="computeroutput">[token]</code> means either <code class="computeroutput">token</code> or nothing; <code class="computeroutput">{expression}</code> means the token resulting from the expression.) </td>
 </tr></tbody>
 </table></div>
 <p>
 </p>
-<p>For this macro, the capture list must always contain at least the leading <code class="computeroutput">&amp;</code> or <code class="computeroutput">=</code> so it can never be <code class="computeroutput">void</code>.</p>
-<p>Note that on compilers with variadic macro support (which should be all C++11 compilers), the capture list can be specified as a comma-separated list. On all compilers, the same macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> also allows to specify the capture list as a Boost.Preprocessor sequence (to allow to use a syntax consistent with the one of <code class="computeroutput">BOOST_SCOPE_EXIT</code> when used on compilers without variadic macro support). The scope exit body declared by this macro can be terminated equivalently by either a semi-column <code class="computeroutput">;</code> or by the macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. The <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> macro
 is only available on C++11 where the terminating semi-column <code class="computeroutput">;</code> can always be used without worrying about portability with C++03 (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> for more information). Similarly, this macro can always use <code class="computeroutput">this</code> instead of <code class="computeroutput">this_</code> to capture the enclosing object without worrying about portability with C++03 because this macro is only available on C++11 compilers.</p>
-<p><span class="bold"><strong>Note:</strong></span> In summary, this macro can take advantage of all syntax improvements allowed by C++11 but it optionally supports the same syntax required by C++03 so programmers can always program both <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> and <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> using the same syntax and for all compilers if they wish to do so.</p>
+<p>Note that on compilers with variadic macro support (which should be all C++11 compilers), the capture list can be specified as a comma-separated list. On all compilers, the same macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> also allows to specify the capture list as a Boost.Preprocessor sequence.</p>
+<p>The capture list must always contain at least the leading <code class="computeroutput">&amp;</code> or <code class="computeroutput">=</code> so it can never be <code class="computeroutput">void</code> (<code class="computeroutput">BOOST_SCOPE_EXIT(void)</code> should be used to program scope exits with an empty capture list).</p>
+<p>In general, the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> when it is necessary to expand multiple scope exit declarations on the same line.</p>
+<p><span class="bold"><strong>Warning:</strong></span> This macro capture list follows the exact same syntax of C++11 lambda captures which is unfortunately different from the syntax of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> captures (unless programmers define the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS</a></code> macro). For example, like C++11 lambda functions, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> requires to capture data members by capturing the object <code class="computeroutput">this</code> while <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> allows to capture data members direct
ly and without capturing the object.</p>
 <p><span class="bold"><strong>Warning:</strong></span> The implementation executes the scope exit body within a destructor thus the scope exit body must never throw in order to comply with STL exception safety requirements.</p>
-<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros"> No Variadic Macros</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
+<p><span class="bold"><strong>Note:</strong></span> This macro can always be used also within templates (so there is no need for a <code class="computeroutput">BOOST_SCOPE_EXIT_ALL_TPL</code> macro).</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <a class="link" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros"> No Variadic Macros</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -83,7 +89,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL_ID.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ALL_ID.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -26,15 +26,15 @@
 <a name="BOOST_SCOPE_EXIT_ALL_ID"></a><div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Macro BOOST_SCOPE_EXIT_ALL_ID</span></h2>
-<p>BOOST_SCOPE_EXIT_ALL_ID &#8212; This macro allows to expand multiple scope exit macros on the same line. </p>
+<p>BOOST_SCOPE_EXIT_ALL_ID &#8212; This macro allows to expand on the same line multiple scope exits that capture all variables in scope (C++11 only). </p>
 </div>
 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">boost/scope_exit.hpp</a>&gt;
 
 </span>BOOST_SCOPE_EXIT_ALL_ID(id, capture_list)</pre></div>
 <div class="refsect1">
-<a name="id854045"></a><h2>Description</h2>
-<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> for more detail).</p>
+<a name="id857728"></a><h2>Description</h2>
+<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> for more information). As with <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>, this macro is only available on C++11 compilers (specifically, on C++11 compilers that do not define the Boost.Config <code class="computeroutput">BOOST_NO_LAMBDAS</code> macro).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -44,18 +44,18 @@
 <tbody>
 <tr>
 <td><span class="bold"><strong><code class="computeroutput">id</code></strong></span></td>
-<td>A unique identifier token which can be catted by the preprocessor (for example <code class="computeroutput">__LINE__</code> or <code class="computeroutput">scope_exit_number_1_on_line_123</code>). </td>
+<td>A unique identifier token which can be concatenated by the preprocessor (<code class="computeroutput">__LINE__</code>, <code class="computeroutput">scope_exit_number_1_on_line_123</code>, a combination of alphanumeric tokens, etc). </td>
 </tr>
 <tr>
 <td><span class="bold"><strong><code class="computeroutput">capture_list</code></strong></span></td>
-<td>Same as the <code class="computeroutput">capture_list</code> parameter of the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> macro. </td>
+<td>Same as the <code class="computeroutput">capture_list</code> parameter of the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> macro. </td>
 </tr>
 </tbody>
 </table></div>
 <p>
 </p>
-<p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the scope exit macros are expanded within user-defined macros (because macros all expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro is always necessary to ensure portability when expanding multiple scope exit macros on the same line (because this library can only portably use <code class="computeroutput">__LINE__</code> to internally generate unique identifiers).</p>
-<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>. </p>
+<p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the scope exit macros are expanded within user-defined macros (because nested macros expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro is always necessary to ensure portability when expanding multiple scope exit declarations on the same line.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -33,8 +33,8 @@
 
 </span>BOOST_SCOPE_EXIT_END</pre></div>
 <div class="refsect1">
-<a name="id854194"></a><h2>Description</h2>
-<p>This macro must follow the closing curly bracket <code class="computeroutput">}</code> that ends the scope exit body:</p>
+<a name="id857888"></a><h2>Description</h2>
+<p>This macro must follow the closing curly bracket <code class="computeroutput">}</code> that ends the body of either <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> or <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>
         <span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(</span><span class="identifier">capture_list</span><span class="special">)</span> <span class="special">{</span>
@@ -43,17 +43,9 @@
         <span class="special">...</span>
     <span class="special">}</span>
 </pre>
-<p>On C++11, this macro is not necessary and it can be replaced by a semi-column <code class="computeroutput">;</code> : </p>
-<pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
- <span class="special">...</span>
- <span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(</span><span class="identifier">capture_list</span><span class="special">)</span> <span class="special">{</span>
- <span class="special">...</span> <span class="comment">// Body code.</span>
- <span class="special">}</span><span class="special">;</span> <span class="comment">// C++11 only.</span>
- <span class="special">...</span>
- <span class="special">}</span>
-</pre>
-<p> However, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers.</p>
-<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>. </p>
+<p>In general, the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> when it is necessary to expand multiple scope exit bodies on the same line.</p>
+<p><span class="bold"><strong>Note:</strong></span> If programmers define the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS</a></code> macro on C++11 compilers, a semicolon <code class="computeroutput">;</code> can be used instead of this macro. However, to maximize portability, it is recommended to always use <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_END_ID.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">
 <link rel="prev" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">
-<link rel="next" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">
+<link rel="next" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,21 +20,21 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_SCOPE_EXIT_END_ID"></a><div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Macro BOOST_SCOPE_EXIT_END_ID</span></h2>
-<p>BOOST_SCOPE_EXIT_END_ID &#8212; This macro allows to expand multiple scope exit macros on the same line. </p>
+<p>BOOST_SCOPE_EXIT_END_ID &#8212; This macro allows to terminate multiple scope exit bodies on the same line. </p>
 </div>
 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">boost/scope_exit.hpp</a>&gt;
 
 </span>BOOST_SCOPE_EXIT_END_ID(id)</pre></div>
 <div class="refsect1">
-<a name="id854420"></a><h2>Description</h2>
-<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> for more detail).</p>
+<a name="id859181"></a><h2>Description</h2>
+<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code> for more information).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -43,13 +43,13 @@
 </colgroup>
 <tbody><tr>
 <td><span class="bold"><strong><code class="computeroutput">id</code></strong></span></td>
-<td>A unique identifier token which can be catted by the preprocessor (for example <code class="computeroutput">__LINE__</code> or <code class="computeroutput">scope_exit_number_1_on_line_123</code>). </td>
+<td>A unique identifier token which can be concatenated by the preprocessor (<code class="computeroutput">__LINE__</code>, <code class="computeroutput">scope_exit_number_1_on_line_123</code>, a combination of alphanumeric tokens, etc). </td>
 </tr></tbody>
 </table></div>
 <p>
 </p>
 <p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the scope exit macros are expanded within user-defined macros (because macros all expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro is always necessary to ensure portability when expanding multiple scope exit macros on the same line (because this library can only portably use <code class="computeroutput">__LINE__</code> to internally generate unique identifiers).</p>
-<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
+<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -62,7 +62,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_END.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_ID.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">
 <link rel="prev" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">
-<link rel="next" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">
+<link rel="next" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,21 +20,21 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_TPL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="refentry">
 <a name="BOOST_SCOPE_EXIT_ID"></a><div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Macro BOOST_SCOPE_EXIT_ID</span></h2>
-<p>BOOST_SCOPE_EXIT_ID &#8212; This macro allows to expand multiple scope exit macros on the same line. </p>
+<p>BOOST_SCOPE_EXIT_ID &#8212; This macro allows to expand multiple scope exit declarations on the same line. </p>
 </div>
 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">boost/scope_exit.hpp</a>&gt;
 
-</span>BOOST_SCOPE_EXIT_ID(id, within_template, capture_list)</pre></div>
+</span>BOOST_SCOPE_EXIT_ID(id, capture_list)</pre></div>
 <div class="refsect1">
-<a name="id853313"></a><h2>Description</h2>
-<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more detail).</p>
+<a name="id856741"></a><h2>Description</h2>
+<p>This macro is equivalent to <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> but it can be expanded multiple times on the same line if different identifiers <code class="computeroutput">id</code> are provided for each expansion (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more information).</p>
 <p><span class="bold"><strong>Parameters:</strong></span> </p>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -44,11 +44,7 @@
 <tbody>
 <tr>
 <td><span class="bold"><strong><code class="computeroutput">id</code></strong></span></td>
-<td>A unique identifier token which can be catted by the preprocessor (for example <code class="computeroutput">__LINE__</code> or <code class="computeroutput">scope_exit_number_1_on_line_123</code>). </td>
-</tr>
-<tr>
-<td><span class="bold"><strong><code class="computeroutput">within_template</code></strong></span></td>
-<td>Specify <code class="computeroutput">1</code> when this macro is used in a type-dependant context on GCC, <code class="computeroutput">1</code> otherwise (this is equivalent to using <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> on separate lines). </td>
+<td>A unique identifier token which can be concatenated by the preprocessor (<code class="computeroutput">__LINE__</code>, <code class="computeroutput">scope_exit_number_1_on_line_123</code>, a combination of alphanumeric tokens, etc). </td>
 </tr>
 <tr>
 <td><span class="bold"><strong><code class="computeroutput">capture_list</code></strong></span></td>
@@ -58,8 +54,8 @@
 </table></div>
 <p>
 </p>
-<p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the scope exit macros are expanded within user-defined macros (because macros all expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro is always necessary to ensure portability when expanding multiple scope exit macros on the same line (because this library can only portably use <code class="computeroutput">__LINE__</code> to internally generate unique identifiers).</p>
-<p><span class="bold"><strong>See:</strong></span> <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>. </p>
+<p><span class="bold"><strong>Note:</strong></span> This macro can be useful when the scope exit macros are expanded within user-defined macros (because nested macros expand on the same line). On some compilers (e.g., MSVC which supports the non standard <code class="computeroutput">__COUNTER__</code> macro) it might not be necessary to use this macro but the use of this macro is always necessary to ensure portability when expanding multiple scope exit declarations on the same line.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -72,7 +68,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_ALL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="BOOST_SCOPE_EXIT_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.scope_exit_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT_TPL_ID.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html (original)
+++ trunk/libs/scope_exit/doc/html/BOOST_SCOPE_EXIT_TPL.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -26,14 +26,14 @@
 <a name="BOOST_SCOPE_EXIT_TPL"></a><div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Macro BOOST_SCOPE_EXIT_TPL</span></h2>
-<p>BOOST_SCOPE_EXIT_TPL &#8212; This macro is a workaround to declare a scope exit for various versions of GCC. </p>
+<p>BOOST_SCOPE_EXIT_TPL &#8212; This macro is a workaround for various versions of GCC to declare scope exits within templates. </p>
 </div>
 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.scope_exit_hpp" title="Header &lt;boost/scope_exit.hpp&gt;">boost/scope_exit.hpp</a>&gt;
 
 </span>BOOST_SCOPE_EXIT_TPL(capture_list)</pre></div>
 <div class="refsect1">
-<a name="id852780"></a><h2>Description</h2>
+<a name="id856189"></a><h2>Description</h2>
 <p>Various versions of the GCC compiler do not compile <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> inside function templates. As a workaround, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> should be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> in these cases:</p>
 <pre class="programlisting"> <span class="special">{</span> <span class="comment">// Some local scope.</span>
         <span class="special">...</span>
@@ -44,8 +44,9 @@
     <span class="special">}</span>
 </pre>
 <p>The syntax of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> is the exact same as the one of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> (see <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> for more information).</p>
-<p>On C++11, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> is not needed because <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> always compiles on GCC versions that support C++11 (that is also why there is no need for a <code class="computeroutput">BOOST_SCOPE_EXIT_ALL_TPL</code> macro given that <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> is only available for C++11 compilers on which it always compiles correctly). However, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers.</p>
-<p><span class="bold"><strong>Note:</strong></span> The problem boils down to the following code (see also GCC bug 37920): </p>
+<p>On C++11 compilers, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> is not needed because <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> always compiles on GCC versions that support C++11. However, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers. It is recommended to always use <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> within templates so to maximize portability.</p>
+<p>In general, the special macro <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code> must be used instead of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> when it is necessary to expand multiple scope exit declarations on the same line within templates.</p>
+<p><span class="bold"><strong>Note:</strong></span> The issue in compiling scope exit declarations that some GCC versions have is illustrated by the following code (see also GCC bug 37920): </p>
 <pre class="programlisting"> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
     <span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">{</span>
         <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
@@ -59,9 +60,9 @@
 
     <span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">f</span><span class="special">(</span><span class="number">0</span><span class="special">)</span><span class="special">;</span> <span class="special">}</span>
 </pre>
-<p> This can be fixed by adding <code class="computeroutput">typename</code> in front of <code class="computeroutput">local::typeof_i</code> and <code class="computeroutput">local::typeof_x</code> (which is the approach followed by the implementation of <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>).</p>
+<p> This can be fixed by adding <code class="computeroutput">typename</code> in front of <code class="computeroutput">local::typeof_i</code> and <code class="computeroutput">local::typeof_x</code> (which is the approach followed by the implementation of the <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> macro).</p>
 <p><span class="bold"><strong>Note:</strong></span> Although <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code> has the same suffix as <code class="computeroutput">BOOST_TYPEOF_TPL</code>, it does not follow the Boost.Typeof convention.</p>
-<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>. </p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="scope_exit/Tutorial.html" title="Tutorial">Tutorial</a> section, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>, <code class="computeroutput"><a class="link" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>. </p>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: trunk/libs/scope_exit/doc/html/index.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/index.html (original)
+++ trunk/libs/scope_exit/doc/html/index.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -59,10 +59,10 @@
       Workaround (GCC)</a></span></dt>
 <dt><span class="section">Same Line Expansions</span></dt>
 </dl></dd>
-<dt><span class="section">Reference</span></dt>
-<dd><dl><dt><span class="section">Header <boost/scope_exit.hpp></span></dt></dl></dd>
 <dt><span class="section">Annex: Alternatives</span></dt>
 <dt><span class="section">Annex: No Variadic Macros</span></dt>
+<dt><span class="section">Reference</span></dt>
+<dd><dl><dt><span class="section">Header <boost/scope_exit.hpp></span></dt></dl></dd>
 <dt><span class="section">Acknowledgements</span></dt>
 </dl>
 </div>
@@ -77,9 +77,9 @@
       Nowadays, every C++ developer is familiar with the Resource Acquisition Is
       Initialization (RAII)
       technique. It binds resource acquisition and release to initialization and
- destruction of a variable that holds the resource. But there are times when
- writing a special class for such variable is not worth the effort. This is
- when the <a class="link" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> comes into play.
+ destruction of a variable that holds the resource. There are times when writing
+ a special class for such a variable is not worth the effort. This is when
+ <a class="link" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> comes into play.
     </p>
 <p>
       Programmers can put resource acquisition directly in their code and next to
@@ -117,14 +117,14 @@
         Older versions of this library used a Boost.Preprocessor
         sequence to specify the list of captured variables. While maintaining full
         backward compatibility, it is now possible to specify the captured variables
- also as a comma-separated list (which is the preferred syntax). See the
+ also using a comma-separated list (which is the preferred syntax). See the
         <a class="link" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros">No Variadic Macros</a> section
         for more details.
       </p></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 25, 2012 at 20:01:40 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 09, 2012 at 20:30:24 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/scope_exit/doc/html/reference.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/reference.html (original)
+++ trunk/libs/scope_exit/doc/html/reference.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
-<link rel="prev" href="scope_exit/Tutorial.html" title="Tutorial">
+<link rel="prev" href="scope_exit/No_Variadic_Macros.html" title="Annex: No Variadic Macros">
 <link rel="next" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="scope_exit/Tutorial.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="scope_exit/No_Variadic_Macros.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section reference">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -34,12 +34,13 @@
 
 <a class="link" href="BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a>(capture_list)
 <a class="link" href="BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a>(capture_list)
-<a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a>(id, within_template, capture_list)
+<a class="link" href="BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a>(id, capture_list)
+<a class="link" href="BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a>(id, capture_list)
 <a class="link" href="BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a>(capture_list)
 <a class="link" href="BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a>(id, capture_list)
 <a class="link" href="BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a>
 <a class="link" href="BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a>(id)
-<a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL</a></pre>
+<a class="link" href="BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS</a></pre>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -52,7 +53,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="scope_exit/Tutorial.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="scope_exit/No_Variadic_Macros.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="BOOST_SCOPE_EXIT.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Acknowledgements.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Acknowledgements.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Acknowledgements.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
-<link rel="prev" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">
+<link rel="prev" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -19,7 +19,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
 </div>
 <div class="section scope_exit_Acknowledgements">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -32,28 +32,28 @@
       Lorenzo Caminiti added variadic macro support, capture of the object <code class="computeroutput"><span class="identifier">this_</span></code>, empty captures using <code class="computeroutput"><span class="keyword">void</span></code>, and <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT_ALL</span></code>.
     </p>
 <p>
- <span class="emphasis"><em>Thanks to the following people (in chronological order).</em></span>
+ Thanks to the following people (in chronological order):
     </p>
 <p>
       Maxim Yegorushkin for sharing code where he used a local struct to clean up
- resources.
+ resources;
     </p>
 <p>
       Andrei Alexandrescu for pointing out the scope(exit)
       construct of the D
- programming language.
+ programming language;
     </p>
 <p>
- Pavel Vozenilek and Maxim Yanchenko for reviews of early drafts of the library.
+ Pavel Vozenilek and Maxim Yanchenko for reviews of early drafts of the library;
     </p>
 <p>
- Steven Watanabe for his valuable ideas.
+ Steven Watanabe for his valuable ideas;
     </p>
 <p>
- Jody Hagins for good comments that helped to significantly improve the documentation.
+ Jody Hagins for good comments that helped to significantly improve the documentation;
     </p>
 <p>
- Richard Webb for testing the library on MSVC compiler.
+ Richard Webb for testing the library on MSVC compiler;
     </p>
 <p>
       Adam Butcher for a workaround to error C2355 when deducing the type of <code class="computeroutput"><span class="keyword">this</span></code> on some MSVC versions.
@@ -69,7 +69,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Alternatives.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
-<link rel="prev" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL">
+<link rel="prev" href="Tutorial.html" title="Tutorial">
 <link rel="next" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Tutorial.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section scope_exit_Alternatives">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="scope_exit.Alternatives"></a><a class="link" href="Alternatives.html" title="Annex: Alternatives">Annex: Alternatives</a>
 </h2></div></div></div>
 <p>
- This section presents some alternatives and work related to <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>.
+ This section presents some alternative and related work to <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>.
     </p>
 <h6>
 <a name="scope_exit.Alternatives.h0"></a>
@@ -58,7 +58,7 @@
 <p>
       Note the following issues with this approach:
     </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="orderedlist"><ol class="orderedlist" type="1">
 <li class="listitem">
           The <code class="computeroutput"><span class="identifier">passwd</span></code> object is defined
           outside of the <code class="computeroutput"><span class="keyword">try</span></code> block because
@@ -74,7 +74,7 @@
           If opening throws, the <code class="computeroutput"><span class="identifier">passwd</span><span class="special">.</span><span class="identifier">close</span><span class="special">()</span></code> should not be called, hence the call
           to <code class="computeroutput"><span class="identifier">passwd</span><span class="special">.</span><span class="identifier">is_open</span><span class="special">()</span></code>.
         </li>
-</ul></div>
+</ol></div>
 <p>
       The <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> approach does not have
       any of these issues. For example (see also try_catch.cpp):
@@ -151,7 +151,8 @@
       Guards</a>
     </h6>
 <p>
- Imagine that a new currency rate is introduced before performing a transaction:
+ Imagine that a new currency rate is introduced before performing a transaction
+ (see also []):
     </p>
 <p>
 </p>
@@ -193,7 +194,7 @@
 <p>
       Note the following issues with this approach:
     </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="orderedlist"><ol class="orderedlist" type="1">
 <li class="listitem">
           <a href="http://www.boost.org/libs/lambda" target="_top">Boost.Lambda</a> expressions
           are hard to write correctly (e.g., overloaded functions must be explicitly
@@ -209,7 +210,7 @@
           Setting a breakpoint inside <code class="computeroutput"><span class="identifier">if_</span><span class="special">[...]</span></code> requires in-depth knowledge of Boost.Lambda and debugging
           techniques.
         </li>
-</ul></div>
+</ol></div>
 <p>
       This code will look much better with C++11 lambdas:
     </p>
@@ -259,8 +260,8 @@
       these two D's
       constructs can be expressed in terms of scope(exit)
       and a <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">commit</span></code>
- variable as explained in the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
- section.
+ variable (similarly to some examples presented in the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
+ section).
     </p>
 <h6>
 <a name="scope_exit.Alternatives.h4"></a>
@@ -269,7 +270,7 @@
     </h6>
 <p>
       Using C++11 lambdas, it is relatively easy to implement the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
- construct. For example (see also world_lambda.cpp):
+ construct. For example (see also world_cxx11_lambda.cpp):
     </p>
 <p>
 </p>
@@ -312,7 +313,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDA_IMPL.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Tutorial.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="No_Variadic_Macros.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Getting_Started.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Getting_Started.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Getting_Started.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -49,11 +49,7 @@
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
             MSVC 7.1 and 8.0 fail to link if a function with <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
- is included by multiple translation units. Furthermore, on MSVC it is
- possible to capture the object <code class="computeroutput"><span class="identifier">this_</span></code>
- only with native Boost.Typeof
- (and not in type-of emulation
- mode).
+ is included by multiple translation units.
           </li>
 <li class="listitem">
             GCC 3.3 cannot compile <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
@@ -82,9 +78,9 @@
         to automatically deduce the types of the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
         captured variables (see the <a class="link" href="Tutorial.html" title="Tutorial">Tutorial</a>
         section). In order to compile code in <a href="http://www.boost.org/libs/typeof" target="_top">type-of
- emulation</a> mode, all types should be properly registered with BOOST_TYPEOF_REGISTER_TYPE
- or BOOST_TYPEOF_REGISTER_TEMPLATE
- macros, or appropriate Boost.Typeof
+ emulation</a> mode, all types should be properly registered using BOOST_TYPEOF_REGISTER_TYPE
+ and BOOST_TYPEOF_REGISTER_TEMPLATE,
+ or appropriate Boost.Typeof
         headers should be included.
       </p>
 </div>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/No_Variadic_Macros.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/No_Variadic_Macros.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/No_Variadic_Macros.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="prev" href="Alternatives.html" title="Annex: Alternatives">
-<link rel="next" href="Acknowledgements.html" title="Acknowledgements">
+<link rel="next" href="../reference.html" title="Reference">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="Alternatives.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Alternatives.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section scope_exit_No_Variadic_Macros">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -37,9 +37,9 @@
     </h6>
 <p>
       Most modern compilers support variadic macros (notably, these include GCC,
- MSVC, and all C++11 compilers). However, in the rare case that programmers
- need to use this library on a complier without variaidc macros, this library
- also allows to specify the capture list using a Boost.Preprocessor
+ MSVC, and all C++11 compilers). <sup>[<a name="scope_exit.No_Variadic_Macros.f0" href="#ftn.scope_exit.No_Variadic_Macros.f0" class="footnote">9</a>]</sup> However, in the rare case that programmers need to use this library
+ on a complier without variaidc macros, this library also allows to specify
+ the capture list using a Boost.Preprocessor
       sequence where tokens are separated by round parenthesis <code class="computeroutput"><span class="special">()</span></code>:
     </p>
 <pre class="programlisting"><span class="special">(</span><span class="identifier">capture1</span><span class="special">)</span> <span class="special">(</span><span class="identifier">capture2</span><span class="special">)</span> <span class="special">...</span> <span class="comment">// All compilers.</span>
@@ -52,11 +52,31 @@
 </pre>
 <p>
       For example, the following syntax is accepted on all compilers with and without
- variadic macros (see also world_seq.cpp):
+ variadic macros (see also world_seq.cpp
+ and world.cpp):
     </p>
-<p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Boost.Preprocessor Sequence (All Compilers)
+ </p>
+ </th>
+<th>
+ <p>
+ Comma-Separated List (Variadic Macros Only)
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
 </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">world</span><span class="special">::</span><span class="identifier">add_person</span><span class="special">(</span><span class="identifier">person</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">a_person</span><span class="special">)</span> <span class="special">{</span>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">world</span><span class="special">::</span><span class="identifier">add_person</span><span class="special">(</span><span class="identifier">person</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">a_person</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">bool</span> <span class="identifier">commit</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
 
     <span class="identifier">persons_</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">a_person</span><span class="special">);</span> <span class="comment">// (1) direct action</span>
@@ -71,17 +91,12 @@
 <span class="special">}</span>
 </pre>
 <p>
- </p>
-<p>
- Furthermore, older versions of this library used to only support the Boost.Preprocessor sequence
- syntax so the above syntax is also supported for backward compatibility. However,
- in the current version of this library and on compilers with variadic macros,
- the comma-separated syntax we have seen so far is preferred because more readable
- (see also world.cpp):
- </p>
-<p>
+ </p>
+ </td>
+<td>
+ <p>
 </p>
-<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">world</span><span class="special">::</span><span class="identifier">add_person</span><span class="special">(</span><span class="identifier">person</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">a_person</span><span class="special">)</span> <span class="special">{</span>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">world</span><span class="special">::</span><span class="identifier">add_person</span><span class="special">(</span><span class="identifier">person</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">a_person</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">bool</span> <span class="identifier">commit</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
 
     <span class="identifier">persons_</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">a_person</span><span class="special">);</span> <span class="comment">// (1) direct action</span>
@@ -96,12 +111,21 @@
 <span class="special">}</span>
 </pre>
 <p>
- </p>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
 <p>
       Note how the same macros accept both syntaxes on compilers with variadic macros
       and only the Boost.Preprocessor
- sequence syntax on compilers without variadic macros. Finally, an empty capture
- list is always specified using <code class="computeroutput"><span class="keyword">void</span></code>
+ sequence syntax on compilers without variadic macros. Older versions of this
+ library used to only support the Boost.Preprocessor
+ sequence syntax so this syntax is supported also for backward compatibility.
+ However, in the current version of this library and on compilers with variadic
+ macros, the comma-separated syntax is preferred because it is more readable.
+ </p>
+<p>
+ Finally, an empty capture list is always specified using <code class="computeroutput"><span class="keyword">void</span></code>
       on compilers with and without variaidc macros (see also world_void.cpp):
     </p>
 <p>
@@ -180,6 +204,14 @@
             </td></tr>
 </tbody>
 </table></div>
+<div class="footnotes">
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.No_Variadic_Macros.f0" href="#scope_exit.No_Variadic_Macros.f0" class="para">9</a>] </sup>
+ A C++ compiler does not support variadic macros if the Boost.Config
+ macro <code class="computeroutput"><span class="identifier">BOOST_NO_VARIADIC_MACROS</span></code>
+ is defined for that compiler.
+ </p></div>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -191,7 +223,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="Alternatives.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Alternatives.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html
==============================================================================
--- trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html (original)
+++ trunk/libs/scope_exit/doc/html/scope_exit/Tutorial.html 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -7,7 +7,7 @@
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
 <link rel="prev" href="Getting_Started.html" title="Getting Started">
-<link rel="next" href="../reference.html" title="Reference">
+<link rel="next" href="Alternatives.html" title="Annex: Alternatives">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="Getting_Started.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Getting_Started.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Alternatives.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section scope_exit_Tutorial">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -101,21 +101,21 @@
         with the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> macro
         invocation which accepts a comma-separated list of captured variables (a
         <a href="http://www.boost.org/libs/preprocessor" target="_top">Boost.Preprocessor</a>
- sequence is also accepted here for compilers that do not support variadic
- macros and for backward compatibility with older versions of this library,
- see the <a class="link" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">No Variadic Macros</a>
- section). If a capture starts with the ampersand sign <code class="computeroutput"><span class="special">&amp;</span></code>,
+ sequence is also accepted for compilers that do not support variadic macros
+ and for backward compatibility with older versions of this library, see the
+ <a class="link" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">No Variadic Macros</a> section).
+ If a capture starts with the ampersand sign <code class="computeroutput"><span class="special">&amp;</span></code>,
         a reference to the captured variable will be available inside the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
         body; otherwise, a copy of the variable will be made after the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
         declaration at point <code class="literal">(1)</code> and only the copy will be available
- inside the body (in this case, the captured variable's type must be <code class="computeroutput"><span class="identifier">CopyConstructible</span></code>).
+ inside the body (in this case, the captured variable's type must be CopyConstructible).
       </p>
 <p>
         In the example above, the variables <code class="computeroutput"><span class="identifier">commit</span></code>
         and <code class="computeroutput"><span class="identifier">persons_</span></code> are captured
         by reference because the final value of the <code class="computeroutput"><span class="identifier">commit</span></code>
         variable should be used to determine whether to execute rollback actions
- or not and the action should modify the <code class="computeroutput"><span class="identifier">persons_</span></code>
+ or not, and the action should modify the <code class="computeroutput"><span class="identifier">persons_</span></code>
         object, not its copy. This is the most common case but passing a variable
         by value is sometimes useful as well.
       </p>
@@ -123,10 +123,7 @@
         Finally, the end of the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
         body must be marked by the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>
         macro which must follow the closing curly bracket <code class="computeroutput"><span class="special">}</span></code>
- of the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> body. On C++11 it
- is also possible (but not required) to use a semi-column <code class="computeroutput"><span class="special">;</span></code>
- instead of the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>
- macro. <sup>[<a name="scope_exit.Tutorial.capturing_variables.f0" href="#ftn.scope_exit.Tutorial.capturing_variables.f0" class="footnote">2</a>]</sup>
+ of the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> body.
       </p>
 <div class="important"><table border="0" summary="Important">
 <tr>
@@ -134,12 +131,13 @@
 <th align="left">Important</th>
 </tr>
 <tr><td align="left" valign="top"><p>
- In order to comply with the STL exception safety requirements, the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> body must never throw (because
- the library implementation executes the body within a destructor). This
- is true for all <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> macros
- (including <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
- and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>)
- on both C++03 and C++11.
+ In order to comply with the <a href="http://www.stlport.org/doc/exception_safety.html" target="_top">STL
+ exception safety requirements</a>, the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
+ body must never throw (because the library implementation executes the
+ body within a destructor call). This is true for all <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
+ macros (including <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ seen below) on both C++03 and C++11.
         </p></td></tr>
 </table></div>
 <p>
@@ -213,17 +211,10 @@
 <p>
       </p>
 <p>
- On C++11, it is possible (but not required) to directly use <code class="computeroutput"><span class="keyword">this</span></code> instead of the special symbol <code class="computeroutput"><span class="identifier">this_</span></code>. <sup>[<a name="scope_exit.Tutorial.capturing_the_object__this_.f0" href="#ftn.scope_exit.Tutorial.capturing_the_object__this_.f0" class="footnote">3</a>]</sup> For example (see also world_this.cpp):
- </p>
-<p>
- [world_this]
- </p>
-<p>
- It is never possible to capture the object <code class="computeroutput"><span class="identifier">this_</span></code>
- (or <code class="computeroutput"><span class="keyword">this</span></code>) by reference because
- C++ does not allow to take a reference to <code class="computeroutput"><span class="keyword">this</span></code>.
- If the enclosing member function is constant then the captured object will
- also be constant, otherwise the captured object will be mutable.
+ It is not possible to capture the object <code class="computeroutput"><span class="identifier">this_</span></code>
+ by reference because C++ does not allow to take a reference to <code class="computeroutput"><span class="keyword">this</span></code>. If the enclosing member function is
+ constant then the captured object will also be constant, otherwise the captured
+ object will be mutable.
       </p>
 </div>
 <div class="section scope_exit_Tutorial_capturing_no_variable">
@@ -232,12 +223,12 @@
       No Variable</a>
 </h3></div></div></div>
 <p>
- It is possible to declare <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
- code that captures no variable. In this case, the list of captured variables
- is replaced by the <code class="computeroutput"><span class="keyword">void</span></code> keyword
- (similarly to the C syntax that allows to declare a function with no parameter
- using <code class="literal"><span class="emphasis"><em>result-type function-name</em></span></code><code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span></code>).
- <sup>[<a name="scope_exit.Tutorial.capturing_no_variable.f0" href="#ftn.scope_exit.Tutorial.capturing_no_variable.f0" class="footnote">4</a>]</sup> For example, this can be useful when the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
+ A <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> declaration can also
+ capture no variable. In this case, the list of captured variables is replaced
+ by the <code class="computeroutput"><span class="keyword">void</span></code> keyword (similarly
+ to the C++ syntax that allows to declare a function with no parameter using
+ <code class="literal"><span class="emphasis"><em>result-type function-name</em></span></code><code class="computeroutput"><span class="special">(</span><span class="keyword">void</span><span class="special">)</span></code>).
+ <sup>[<a name="scope_exit.Tutorial.capturing_no_variable.f0" href="#ftn.scope_exit.Tutorial.capturing_no_variable.f0" class="footnote">2</a>]</sup> For example, this can be useful when the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
         body only needs to access global variables (see also world_void.cpp):
       </p>
 <p>
@@ -263,8 +254,9 @@
 <p>
       </p>
 <p>
- This same syntax is supported for both compilers with and without variadic
- macro support.
+ (Both compilers with and without variadic macros use this same syntax for
+ capturing no variable, see the <a class="link" href="No_Variadic_Macros.html" title="Annex: No Variadic Macros">No
+ Variadic Macros</a> section for more information.)
       </p>
 </div>
 <div class="section scope_exit_Tutorial_capturing_all_variables__c__11_only_">
@@ -274,14 +266,13 @@
 </h3></div></div></div>
 <p>
         On C++11 compliers, it is also possible to capture all the variables in scope
- without naming them one by one using the special macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ without naming them one-by-one using the special macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
         instead of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>.
- <sup>[<a name="scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" href="#ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" class="footnote">5</a>]</sup>
+ <sup>[<a name="scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" href="#ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" class="footnote">3</a>]</sup>
       </p>
 <p>
- Following the same syntax adopted by C++11 lambdas, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
- macro accepts a comma-separated list of captures which must start with either
- <code class="computeroutput"><span class="special">&amp;</span></code> or <code class="computeroutput"><span class="special">=</span></code>
+ Following the same syntax adopted by C++11 lambda functions, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> macro accepts
+ a comma-separated list of captures which must start with either <code class="computeroutput"><span class="special">&amp;</span></code> or <code class="computeroutput"><span class="special">=</span></code>
         to capture all variables in scope respectively by reference or by value (note
         that no variable name is specified by these leading captures). Additional
         captures of specific variables can follow the leading <code class="computeroutput"><span class="special">&amp;</span></code>
@@ -296,9 +287,10 @@
     <span class="comment">// This block must be no-throw.</span>
     <span class="identifier">person</span><span class="special">&amp;</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">persons_</span><span class="special">.</span><span class="identifier">back</span><span class="special">();</span>
     <span class="identifier">person</span><span class="special">::</span><span class="identifier">evolution_t</span> <span class="identifier">checkpoint</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">evolution</span><span class="special">;</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ALL</span><span class="special">(&amp;,</span> <span class="identifier">checkpoint</span><span class="special">,</span> <span class="identifier">this_</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Capture all by ref (C++11).</span>
- <span class="keyword">if</span><span class="special">(</span><span class="identifier">checkpoint</span> <span class="special">==</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">evolution</span><span class="special">)</span> <span class="identifier">this_</span><span class="special">-&gt;</span><span class="identifier">persons_</span><span class="special">.</span><span class="identifier">pop_back</span><span class="special">();</span>
- <span class="special">};</span> <span class="comment">// Use `;` instead of `SCOPE_EXIT_END` for `BOOST_SCOPE_EXIT_ALL`.</span>
+ <span class="comment">// Capture all by reference `&amp;`, but `checkpoint` and `this` (C++11 only).</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL</span><span class="special">(&amp;,</span> <span class="identifier">checkpoint</span><span class="special">,</span> <span class="keyword">this</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Use `this` (not `this_`).</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">checkpoint</span> <span class="special">==</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">evolution</span><span class="special">)</span> <span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">persons_</span><span class="special">.</span><span class="identifier">pop_back</span><span class="special">();</span>
+ <span class="special">};</span> <span class="comment">// Use `;` (not `SCOPE_EXIT_END`).</span>
 
     <span class="comment">// ...</span>
 
@@ -307,7 +299,8 @@
     <span class="comment">// Assign new identifier to the person.</span>
     <span class="identifier">person</span><span class="special">::</span><span class="identifier">id_t</span> <span class="keyword">const</span> <span class="identifier">prev_id</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">id</span><span class="special">;</span>
     <span class="identifier">p</span><span class="special">.</span><span class="identifier">id</span> <span class="special">=</span> <span class="identifier">next_id_</span><span class="special">++;</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ALL</span><span class="special">(=,</span> <span class="special">&amp;</span><span class="identifier">p</span><span class="special">,</span> <span class="keyword">this</span><span class="special">)</span> <span class="special">{</span> <span class="comment">// Capture all by value, `this` (C++11).</span>
+ <span class="comment">// Capture all by value `=`, but `p` (C++11 only).</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL</span><span class="special">(=,</span> <span class="special">&amp;</span><span class="identifier">p</span><span class="special">)</span> <span class="special">{</span>
         <span class="keyword">if</span><span class="special">(</span><span class="identifier">checkpoint</span> <span class="special">==</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">evolution</span><span class="special">)</span> <span class="special">{</span>
             <span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">next_id_</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">id</span><span class="special">;</span>
             <span class="identifier">p</span><span class="special">.</span><span class="identifier">id</span> <span class="special">=</span> <span class="identifier">prev_id</span><span class="special">;</span>
@@ -323,14 +316,46 @@
       </p>
 <p>
         The first <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a> declaration captures
- all variables in scope by reference but <code class="computeroutput"><span class="identifier">checkpoint</span></code>
- and <code class="computeroutput"><span class="identifier">this_</span></code> which are explicitly
- captured by value (in particular, <code class="computeroutput"><span class="identifier">p</span></code>
- and <code class="computeroutput"><span class="identifier">persons_</span></code> are captured
- by reference). The second <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
- declaration instead captures all variables in scope by value but <code class="computeroutput"><span class="identifier">p</span></code> which is captured by reference (in particular,
- <code class="computeroutput"><span class="identifier">checkpoint</span></code>, <code class="computeroutput"><span class="identifier">prev_id</span></code>, and <code class="computeroutput"><span class="keyword">this</span></code>
- are captured by value).
+ all variables in scope by reference but the variable <code class="computeroutput"><span class="identifier">checkpoint</span></code>
+ and the object <code class="computeroutput"><span class="keyword">this</span></code> which are
+ explicitly captured by value (in particular, <code class="computeroutput"><span class="identifier">p</span></code>
+ and <code class="computeroutput"><span class="identifier">persons_</span></code> are implicitly
+ captured by reference here). The second <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
+ declaration instead captures all variables in scope by value but <code class="computeroutput"><span class="identifier">p</span></code> which is explicitly captured by reference
+ (in particular, <code class="computeroutput"><span class="identifier">checkpoint</span></code>,
+ <code class="computeroutput"><span class="identifier">prev_id</span></code>, and <code class="computeroutput"><span class="keyword">this</span></code> are implicitly captured by value here).
+ </p>
+<p>
+ Note that the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro follows the C++11 lambda function syntax which is unfortunately different
+ from the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> macro
+ syntax. In particular:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro cannot capture data members without capturing the object <code class="computeroutput"><span class="keyword">this</span></code> while that is not the case for <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>. <sup>[<a name="scope_exit.Tutorial.capturing_all_variables__c__11_only_.f1" href="#ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f1" class="footnote">4</a>]</sup>
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro captures the object in scope using <code class="computeroutput"><span class="keyword">this</span></code>
+ instead of <code class="computeroutput"><span class="identifier">this_</span></code>. <sup>[<a name="scope_exit.Tutorial.capturing_all_variables__c__11_only_.f2" href="#ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f2" class="footnote">5</a>]</sup>
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ body is terminated by a semicolon <code class="computeroutput"><span class="special">;</span></code>
+ instead than by the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>
+ macro.
+ </li>
+</ol></div>
+<p>
+ If programmers define the configuration macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS.html" title="Macro BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS">BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS</a></code>
+ then the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code> macro
+ implementation will use C++11 lamda functions and the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ macro will follow the same syntax of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro, which is the C++11 lambda function syntax. However, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ will no longer be backward compatible and older code using <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ might no longer compile (if data members were explicitly captured).
       </p>
 </div>
 <div class="section scope_exit_Tutorial_template_workaround__gcc_">
@@ -343,7 +368,9 @@
         inside templates (see the Reference section
         for more information). As a workaround, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
         should be used instead of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
- in these cases: <sup>[<a name="scope_exit.Tutorial.template_workaround__gcc_.f0" href="#ftn.scope_exit.Tutorial.template_workaround__gcc_.f0" class="footnote">6</a>]</sup>
+ in these cases. <sup>[<a name="scope_exit.Tutorial.template_workaround__gcc_.f0" href="#ftn.scope_exit.Tutorial.template_workaround__gcc_.f0" class="footnote">6</a>]</sup> The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
+ macro has the exact same syntax of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>.
+ For example (see also world_tpl.cpp):
       </p>
 <p>
 </p>
@@ -364,8 +391,8 @@
 <p>
       </p>
 <p>
- The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
- macro has the exact same syntax of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>.
+ It is recommended to always use <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>
+ within templates so to maximize portability among different compilers.
       </p>
 </div>
 <div class="section scope_exit_Tutorial_same_line_expansions">
@@ -381,121 +408,144 @@
       </p>
 <p>
         Therefore, this library provides additional macros <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>,
         <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>,
         and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>
         which can be expanded multiple times on the same line as long as programmers
- specify a unique identifier as the macro's first parameter. The unique identifier
- can be any token (not just numeric) that can be successfully concatenated
- by the preprocessor (e.g., <code class="computeroutput"><span class="identifier">scope_exit_number_1_at_line_123</span></code>).
- The second parameter of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>
- shall be <code class="computeroutput"><span class="number">1</span></code> if the macro is used
- within a template (equivalent to <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL.html" title="Macro BOOST_SCOPE_EXIT_TPL">BOOST_SCOPE_EXIT_TPL</a></code>),
- or <code class="computeroutput"><span class="number">0</span></code> otherwise. Finally, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code> and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code> accept
- a capture list using the exact same syntax as <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
- and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
- respectively.
+ specify a unique identifiers as the macros' first parameters. The unique
+ identifier can be any token (not just numeric) that can be concatenated by
+ the C++ preprocessor (e.g., <code class="computeroutput"><span class="identifier">scope_exit_number_1_at_line_123</span></code>).
+ <sup>[<a name="scope_exit.Tutorial.same_line_expansions.f1" href="#ftn.scope_exit.Tutorial.same_line_expansions.f1" class="footnote">8</a>]</sup>
       </p>
 <p>
- For example (see also same_line.cpp):
+ The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>,
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>
+ macros accept a capture list using the exact same syntax as <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ respectively. For example (see also same_line.cpp):
       </p>
 <p>
 </p>
 <pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">SCOPE_EXIT_INC_DEC</span><span class="special">(</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span> <span class="special">\</span>
- <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="comment">/* unique ID */</span> <span class="special">\</span>
             <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
         <span class="identifier">variable</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
     <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span> <span class="special">\</span>
     <span class="special">\</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span> <span class="special">\</span>
- <span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="number">0</span> <span class="comment">/* no TPL */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="special">\</span>
+ <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">-=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">SCOPE_EXIT_INC_DEC_TPL</span><span class="special">(</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID_TPL</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="special">\</span>
+ <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
+ <span class="identifier">variable</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
+ <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span> <span class="special">\</span>
+ <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ID_TPL</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="special">\</span>
             <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
         <span class="identifier">variable</span> <span class="special">-=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
     <span class="special">}</span> <span class="identifier">BOOST_SCOPE_EXIT_END_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
 
 <span class="preprocessor">#define</span> <span class="identifier">SCOPE_EXIT_ALL_INC_DEC</span><span class="special">(</span><span class="identifier">variable</span><span class="special">,</span> <span class="identifier">offset</span><span class="special">)</span> <span class="special">\</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">inc</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="special">\</span>
             <span class="special">=,</span> <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
         <span class="identifier">variable</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
     <span class="special">};</span> <span class="special">\</span>
- <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="comment">/* unique ID */</span><span class="special">,</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SCOPE_EXIT_ALL_ID</span><span class="special">(</span><span class="identifier">BOOST_PP_CAT</span><span class="special">(</span><span class="identifier">dec</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">),</span> <span class="special">\</span>
             <span class="special">=,</span> <span class="special">&amp;</span><span class="identifier">variable</span><span class="special">)</span> <span class="special">{</span> <span class="special">\</span>
         <span class="identifier">variable</span> <span class="special">-=</span> <span class="identifier">offset</span><span class="special">;</span> <span class="special">\</span>
     <span class="special">};</span>
 
-<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span><span class="identifier">test_same_line</span><span class="special">)</span> <span class="special">{</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">delta</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">SCOPE_EXIT_INC_DEC_TPL</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">)</span> <span class="comment">// Multiple scope exits on same line.</span>
+ <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span>
     <span class="keyword">int</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">delta</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span>
 
     <span class="special">{</span>
         <span class="identifier">SCOPE_EXIT_INC_DEC</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">)</span> <span class="comment">// Multiple scope exits on same line.</span>
     <span class="special">}</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+ <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+
+ <span class="identifier">f</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">);</span>
 
 <span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_NO_LAMBDAS</span>
     <span class="special">{</span>
         <span class="identifier">SCOPE_EXIT_ALL_INC_DEC</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">delta</span><span class="special">)</span> <span class="comment">// Multiple scope exits on same line.</span>
     <span class="special">}</span>
- <span class="identifier">BOOST_CHECK</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
+ <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
 <span class="preprocessor">#endif</span> <span class="comment">// lambdas</span>
+
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">report_errors</span><span class="special">();</span>
 <span class="special">}</span>
 </pre>
 <p>
       </p>
 <p>
- As indicated by the example above, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ As shown by the example above, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ID.html" title="Macro BOOST_SCOPE_EXIT_ID">BOOST_SCOPE_EXIT_ID</a></code>,
+ <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_TPL_ID.html" title="Macro BOOST_SCOPE_EXIT_TPL_ID">BOOST_SCOPE_EXIT_TPL_ID</a></code>,
         <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END_ID.html" title="Macro BOOST_SCOPE_EXIT_END_ID">BOOST_SCOPE_EXIT_END_ID</a></code>,
         and <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL_ID.html" title="Macro BOOST_SCOPE_EXIT_ALL_ID">BOOST_SCOPE_EXIT_ALL_ID</a></code>
         macros are especially useful when it is necessary to invoke them multiple
- times within user-defined macros (because the preprocessor expands all nested
- macros on the same line).
+ times within user-defined macros (because the C++ preprocessor expands all
+ nested macros on the same line).
       </p>
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_variables.f0" href="#scope_exit.Tutorial.capturing_variables.f0" class="para">2</a>] </sup>
- The macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>
- can still be used on C++11 to write portable code that can be used on both
- C++03 and C++11 compilers. Using <code class="computeroutput"><span class="special">;</span></code>
- instead of <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_END.html" title="Macro BOOST_SCOPE_EXIT_END">BOOST_SCOPE_EXIT_END</a></code>
- on C++03 compilers will generate a (possibly cryptic) compiler error.
- </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_the_object__this_.f0" href="#scope_exit.Tutorial.capturing_the_object__this_.f0" class="para">3</a>] </sup>
- The special symbol <code class="computeroutput"><span class="identifier">this_</span></code>
- can still be used on C++11 to write portable code that can be used on both
- C++03 and C++11 compilers. Unfortunately, using <code class="computeroutput"><span class="keyword">this</span></code>
- instead of <code class="computeroutput"><span class="identifier">this_</span></code> on C++03
- compilers leads to undefined behaviour (it will likely generate a compiler
- error but that is not guaranteed).
- </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_no_variable.f0" href="#scope_exit.Tutorial.capturing_no_variable.f0" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_no_variable.f0" href="#scope_exit.Tutorial.capturing_no_variable.f0" class="para">2</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> Unfortunately, it is not possible
           to simply invoke the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
- macro with no parameters <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">()</span></code> because the preprocessor cannot detect
+ macro with no parameters as in <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">()</span></code> because the C++ preprocessor cannot detect
           emptiness of a macro parameter when the parameter can start with a non-alphanumeric
           symbol (which is the case when capturing a variable by reference <code class="computeroutput"><span class="special">&amp;</span><span class="identifier">variable</span></code>).
         </p></div>
-<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" href="#scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" class="para">5</a>] </sup>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" href="#scope_exit.Tutorial.capturing_all_variables__c__11_only_.f0" class="para">3</a>] </sup>
           <span class="bold"><strong>Rationale.</strong></span> The <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
- macro is only defined on C++11 compilers. Using <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
- on C++03 compilers will generate a (possibly cryptic) compiler error. Note
- that a new macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro is only defined on C++11 compilers for which the Boost.Config
+ macro <code class="computeroutput"><span class="identifier">BOOST_NO_LAMBDAS</span></code>
+ is not defined. Using <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ on C++03 compilers for which <code class="computeroutput"><span class="identifier">BOOST_NO_LAMBDAS</span></code>
+ is defined will generate (possibly cryptic) compiler errors. Note that
+ a new macro <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
           needed to be introduced instead of reusing <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
- because <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(&amp;)</span></code> and <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(=)</span></code> could not be distinguished from <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span></code> or
+ because <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(&amp;)</span></code> and <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(=)</span></code> cannot be distinguished from <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span></code> or
           <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT</span><span class="special">(</span><span class="identifier">this_</span><span class="special">)</span></code>
- using the preprocessor because the symbols <code class="computeroutput"><span class="special">&amp;</span></code>
+ using the C++ preprocessor given that the symbols <code class="computeroutput"><span class="special">&amp;</span></code>
           and <code class="computeroutput"><span class="special">=</span></code> are neither prefxied
- or postfixed by alphanumeric tokens (this is not an issue for <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> which always
- has <code class="computeroutput"><span class="special">&amp;</span></code> or <code class="computeroutput"><span class="special">=</span></code> as the first capture so the first capture
- token is never compared with neither <code class="computeroutput"><span class="keyword">void</span></code>
- or <code class="computeroutput"><span class="identifier">this_</span></code> for this macro).
+ nor postfixed by alphanumeric tokens (this is not an issue for <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code> which always
+ has the non-alphanumeric <code class="computeroutput"><span class="special">&amp;</span></code>
+ or <code class="computeroutput"><span class="special">=</span></code> as the first capture
+ so the first capture tokens are simply never compared with neither <code class="computeroutput"><span class="keyword">void</span></code> nor <code class="computeroutput"><span class="identifier">this_</span></code>
+ for this macro).
         </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f1" href="#scope_exit.Tutorial.capturing_all_variables__c__11_only_.f1" class="para">4</a>] </sup>
+ At present, there seems to be some discussion to allow C++11 lambda
+ functions to capture data members without capturing the object <code class="computeroutput"><span class="keyword">this</span></code>. If the C++11 standard were changed
+ to allow this, the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ macro syntax could be extended to be a superset of the <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT.html" title="Macro BOOST_SCOPE_EXIT">BOOST_SCOPE_EXIT</a></code>
+ macro while keeping full backward compatibility.
+ </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.capturing_all_variables__c__11_only_.f2" href="#scope_exit.Tutorial.capturing_all_variables__c__11_only_.f2" class="para">5</a>] </sup>
+ On compilers that support the use of the <code class="computeroutput"><span class="keyword">typename</span></code>
+ outside templates as allowed by the C++11 standard, <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ can use both <code class="computeroutput"><span class="keyword">this</span></code> and
+ <code class="computeroutput"><span class="identifier">this_</span></code> to capture the
+ object in scope (notably, this is not the case for the MSVC 10.0 compiler).
+ </p></div>
 <div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.template_workaround__gcc_.f0" href="#scope_exit.Tutorial.template_workaround__gcc_.f0" class="para">6</a>] </sup>
- GCC versions compliant with C++11 do not present this issue and given that
- <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
+ <span class="bold"><strong>Rationale.</strong></span> GCC versions compliant with
+ C++11 do not present this issue and given that <code class="computeroutput"><a class="link" href="../BOOST_SCOPE_EXIT_ALL.html" title="Macro BOOST_SCOPE_EXIT_ALL">BOOST_SCOPE_EXIT_ALL</a></code>
           is only available on C++11 compilers, there is no need for a <code class="computeroutput"><span class="identifier">BOOST_SCOPE_EXIT_ALL_TPL</span></code> macro.
         </p></div>
 <div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.same_line_expansions.f0" href="#scope_exit.Tutorial.same_line_expansions.f0" class="para">7</a>] </sup>
- <span class="bold"><strong>Rationale.</strong></span> This library's macros internally
+ <span class="bold"><strong>Rationale.</strong></span> The library macros internally
           use <code class="computeroutput"><span class="identifier">__LINE__</span></code> to generate
           unique identifiers. Therefore, if the same macro is expanded more than
           on time on the same line, the generated identifiers will no longer be unique
@@ -503,6 +553,12 @@
           and other compilers that provide the non-standard <code class="computeroutput"><span class="identifier">__COUNTER__</span></code>
           macro.)
         </p></div>
+<div class="footnote"><p><sup>[<a id="ftn.scope_exit.Tutorial.same_line_expansions.f1" href="#scope_exit.Tutorial.same_line_expansions.f1" class="para">8</a>] </sup>
+ Because there are restrictions on the set of tokens that the C++ preprocessor
+ can concatenate and because not all compilers correctly implement these
+ restrictions, it is in general recommended to specify unique identifiers
+ as a combination of alphanumeric tokens.
+ </p></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -515,7 +571,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="Getting_Started.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="Getting_Started.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Alternatives.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/scope_exit/doc/scope_exit.qbk
==============================================================================
--- trunk/libs/scope_exit/doc/scope_exit.qbk (original)
+++ trunk/libs/scope_exit/doc/scope_exit.qbk 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -33,9 +33,10 @@
 [def __Boost_Phoenix__ [@http://www.boost.org/libs/phoenix Boost.Phoenix]]
 [def __Boost_Typeof__ [@http://www.boost.org/libs/typeof Boost.Typeof]]
 [def __typeof_emulation__ [@http://www.boost.org/libs/typeof type-of emulation]]
-[def __BOOST_TYPEOF_REGISTER_TYPE__ [@http://www.boost.org/libs/typeof/refe.html#typeof.regtype BOOST_TYPEOF_REGISTER_TYPE]]
-[def __BOOST_TYPEOF_REGISTER_TEMPLATE__ [@http://www.boost.org/libs/typeof/refe.html#typeof.regtemp BOOST_TYPEOF_REGISTER_TEMPLATE]]
+[def __BOOST_TYPEOF_REGISTER_TYPE__ [@http://www.boost.org/libs/typeof BOOST_TYPEOF_REGISTER_TYPE]]
+[def __BOOST_TYPEOF_REGISTER_TEMPLATE__ [@http://www.boost.org/libs/typeof BOOST_TYPEOF_REGISTER_TEMPLATE]]
 [def __Boost_Preprocessor__ [@http://www.boost.org/libs/preprocessor Boost.Preprocessor]]
+[def __Boost_Config__ [@http://www.boost.org/libs/config Boost.Config]]
 [def __Boost_PointerContainer__ [@http://www.boost.org/libs/ptr_container Boost.PointerContainer]]
 [def __Boost_Multi_Index__ [@http://www.boost.org/libs/multi_index Boost.Multi-Index]]
 [def __ScopeGuard__ [@http://www.ddj.com/dept/cpp/184403758 ScopeGuard]]
@@ -54,7 +55,7 @@
 [import ../test/same_line.cpp]
 [import ../example/try_catch.cpp]
 [import ../example/scope_guard.cpp]
-[import ../example/world_lambda.cpp]
+[import ../example/world_cxx11_lambda.cpp]
 
 This library allows to execute arbitrary code when the enclosing scope exits.
 
@@ -62,14 +63,14 @@
 
 Nowadays, every C++ developer is familiar with the Resource Acquisition Is Initialization (__RAII__) technique.
 It binds resource acquisition and release to initialization and destruction of a variable that holds the resource.
-But there are times when writing a special class for such variable is not worth the effort.
-This is when the __Boost_ScopeExit__ comes into play.
+There are times when writing a special class for such a variable is not worth the effort.
+This is when __Boost_ScopeExit__ comes into play.
 
 Programmers can put resource acquisition directly in their code and next to it, they can write code that releases the resource using this library.
 For example (see also [@../../test/world.cpp =world.cpp=]):
 [footnote
 Older versions of this library used a __Boost_Preprocessor__ sequence to specify the list of captured variables.
-While maintaining full backward compatibility, it is now possible to specify the captured variables also as a comma-separated list (which is the preferred syntax).
+While maintaining full backward compatibility, it is now possible to specify the captured variables also using a comma-separated list (which is the preferred syntax).
 See the __No_Variadic_Macros__ section for more details.
 ]
 
@@ -89,7 +90,6 @@
 However, this library should be usable on any compiler that supports __Boost_Typeof__ except:
 
 * MSVC 7.1 and 8.0 fail to link if a function with __Boost_ScopeExit__ is included by multiple translation units.
-Furthermore, on MSVC it is possible to capture the object `this_` only with native __Boost_Typeof__ (and not in __typeof_emulation__ mode).
 * GCC 3.3 cannot compile __Boost_ScopeExit__ inside a template (see [@http://lists.boost.org/Archives/boost/2007/02/116235.php] for more details).
 
 See the library [@http://www.boost.org/development/tests/release/developer/scope_exit.html regression test results] for detailed information on supported compilers and platforms.
@@ -103,7 +103,7 @@
 Programmers can simply instruct the compiler where to find the library header files (`-I` option on GCC, `/I` option on MSVC, etc) and compile code using the library.
 
 The library implementation uses __Boost_Typeof__ to automatically deduce the types of the __Boost_ScopeExit__ captured variables (see the __Tutorial__ section).
-In order to compile code in __typeof_emulation__ mode, all types should be properly registered with __BOOST_TYPEOF_REGISTER_TYPE__ or __BOOST_TYPEOF_REGISTER_TEMPLATE__ macros, or appropriate __Boost_Typeof__ headers should be included.
+In order to compile code in __typeof_emulation__ mode, all types should be properly registered using __BOOST_TYPEOF_REGISTER_TYPE__ and __BOOST_TYPEOF_REGISTER_TEMPLATE__, or appropriate __Boost_Typeof__ headers should be included.
 
 [endsect]
 
@@ -137,22 +137,17 @@
 Unlike point =(1)=, an execution of the __Boost_ScopeExit__ body will be delayed until the end of the current scope. In this case it will be executed either after point =(4)= or on any exception.
 (On various versions of the GCC compiler, it is necessary to use [macroref BOOST_SCOPE_EXIT_TPL] instead of [macroref BOOST_SCOPE_EXIT] within templates, see later in this section for details.)
 
-The __Boost_ScopeExit__ declaration starts with the [macroref BOOST_SCOPE_EXIT] macro invocation which accepts a comma-separated list of captured variables (a __Boost_Preprocessor__ sequence is also accepted here for compilers that do not support variadic macros and for backward compatibility with older versions of this library, see the __No_Variadic_Macros__ section).
-If a capture starts with the ampersand sign `&`, a reference to the captured variable will be available inside the __Boost_ScopeExit__ body; otherwise, a copy of the variable will be made after the __Boost_ScopeExit__ declaration at point =(1)= and only the copy will be available inside the body (in this case, the captured variable's type must be `CopyConstructible`).
+The __Boost_ScopeExit__ declaration starts with the [macroref BOOST_SCOPE_EXIT] macro invocation which accepts a comma-separated list of captured variables (a __Boost_Preprocessor__ sequence is also accepted for compilers that do not support variadic macros and for backward compatibility with older versions of this library, see the __No_Variadic_Macros__ section).
+If a capture starts with the ampersand sign `&`, a reference to the captured variable will be available inside the __Boost_ScopeExit__ body; otherwise, a copy of the variable will be made after the __Boost_ScopeExit__ declaration at point =(1)= and only the copy will be available inside the body (in this case, the captured variable's type must be [@http://www.boost.org/doc/libs/release/doc/html/CopyConstructible.html `CopyConstructible`]).
 
-In the example above, the variables `commit` and `persons_` are captured by reference because the final value of the `commit` variable should be used to determine whether to execute rollback actions or not and the action should modify the `persons_` object, not its copy.
+In the example above, the variables `commit` and `persons_` are captured by reference because the final value of the `commit` variable should be used to determine whether to execute rollback actions or not, and the action should modify the `persons_` object, not its copy.
 This is the most common case but passing a variable by value is sometimes useful as well.
 
 Finally, the end of the __Boost_ScopeExit__ body must be marked by the [macroref BOOST_SCOPE_EXIT_END] macro which must follow the closing curly bracket `}` of the __Boost_ScopeExit__ body.
-On C++11 it is also possible (but not required) to use a semi-column `;` instead of the [macroref BOOST_SCOPE_EXIT_END] macro.
-[footnote
-The macro [macroref BOOST_SCOPE_EXIT_END] can still be used on C++11 to write portable code that can be used on both C++03 and C++11 compilers.
-Using `;` instead of [macroref BOOST_SCOPE_EXIT_END] on C++03 compilers will generate a (possibly cryptic) compiler error.
-]
 
 [important
-In order to comply with the STL exception safety requirements, the __Boost_ScopeExit__ body must never throw (because the library implementation executes the body within a destructor).
-This is true for all __Boost_ScopeExit__ macros (including [macroref BOOST_SCOPE_EXIT_TPL] and [macroref BOOST_SCOPE_EXIT_ALL]) on both C++03 and C++11.
+In order to comply with the [@http://www.stlport.org/doc/exception_safety.html STL exception safety requirements], the __Boost_ScopeExit__ body must never throw (because the library implementation executes the body within a destructor call).
+This is true for all __Boost_ScopeExit__ macros (including [macroref BOOST_SCOPE_EXIT_TPL] and [macroref BOOST_SCOPE_EXIT_ALL] seen below) on both C++03 and C++11.
 ]
 
 Consider a more complex example where `world::add_person` can save intermediate states at some point and roll back to the last saved state.
@@ -173,70 +168,81 @@
 However, the special symbol `this_` must be used instead of `this` in the __Boost_ScopeExit__ declaration and body to capture and access the object.
 For example (see also [@../../test/world_this.cpp =world_this.cpp=]):
 
-[world_this_]
-
-On C++11, it is possible (but not required) to directly use `this` instead of the special symbol `this_`.
-[footnote
-The special symbol `this_` can still be used on C++11 to write portable code that can be used on both C++03 and C++11 compilers.
-Unfortunately, using `this` instead of `this_` on C++03 compilers leads to undefined behaviour (it will likely generate a compiler error but that is not guaranteed).
-]
-For example (see also [@../../test/world_this.cpp =world_this.cpp=]):
-
 [world_this]
 
-It is never possible to capture the object `this_` (or `this`) by reference because C++ does not allow to take a reference to `this`.
+It is not possible to capture the object `this_` by reference because C++ does not allow to take a reference to `this`.
 If the enclosing member function is constant then the captured object will also be constant, otherwise the captured object will be mutable.
 
 [endsect]
 
 [section Capturing No Variable]
 
-It is possible to declare __Boost_ScopeExit__ code that captures no variable.
-In this case, the list of captured variables is replaced by the `void` keyword (similarly to the C syntax that allows to declare a function with no parameter using [^['result-type function-name]]`(void)`).
+A __Boost_ScopeExit__ declaration can also capture no variable.
+In this case, the list of captured variables is replaced by the `void` keyword (similarly to the C++ syntax that allows to declare a function with no parameter using [^['result-type function-name]]`(void)`).
 [footnote
 *Rationale.*
-Unfortunately, it is not possible to simply invoke the __Boost_ScopeExit__ macro with no parameters `BOOST_SCOPE_EXIT()` because the preprocessor cannot detect emptiness of a macro parameter when the parameter can start with a non-alphanumeric symbol (which is the case when capturing a variable by reference `&variable`).
+Unfortunately, it is not possible to simply invoke the __Boost_ScopeExit__ macro with no parameters as in `BOOST_SCOPE_EXIT()` because the C++ preprocessor cannot detect emptiness of a macro parameter when the parameter can start with a non-alphanumeric symbol (which is the case when capturing a variable by reference `&variable`).
 ]
 For example, this can be useful when the __Boost_ScopeExit__ body only needs to access global variables (see also [@../../test/world_void.cpp =world_void.cpp=]):
 
 [world_void]
 
-This same syntax is supported for both compilers with and without variadic macro support.
+(Both compilers with and without variadic macros use this same syntax for capturing no variable, see the __No_Variadic_Macros__ section for more information.)
 
 [endsect]
 
 [section Capturing All Variables (C++11 Only)]
 
-On C++11 compliers, it is also possible to capture all the variables in scope without naming them one by one using the special macro [macroref BOOST_SCOPE_EXIT_ALL] instead of [macroref BOOST_SCOPE_EXIT].
+On C++11 compliers, it is also possible to capture all the variables in scope without naming them one-by-one using the special macro [macroref BOOST_SCOPE_EXIT_ALL] instead of [macroref BOOST_SCOPE_EXIT].
 [footnote
 *Rationale.*
-The [macroref BOOST_SCOPE_EXIT_ALL] macro is only defined on C++11 compilers.
-Using [macroref BOOST_SCOPE_EXIT_ALL] on C++03 compilers will generate a (possibly cryptic) compiler error.
-Note that a new macro [macroref BOOST_SCOPE_EXIT_ALL] needed to be introduced instead of reusing [macroref BOOST_SCOPE_EXIT] because `BOOST_SCOPE_EXIT(&)` and `BOOST_SCOPE_EXIT(=)` could not be distinguished from `BOOST_SCOPE_EXIT(void)` or `BOOST_SCOPE_EXIT(this_)` using the preprocessor because the symbols `&` and `=` are neither prefxied or postfixed by alphanumeric tokens (this is not an issue for [macroref BOOST_SCOPE_EXIT_ALL] which always has `&` or `=` as the first capture so the first capture token is never compared with neither `void` or `this_` for this macro).
+The [macroref BOOST_SCOPE_EXIT_ALL] macro is only defined on C++11 compilers for which the __Boost_Config__ macro `BOOST_NO_LAMBDAS` is not defined.
+Using [macroref BOOST_SCOPE_EXIT_ALL] on C++03 compilers for which `BOOST_NO_LAMBDAS` is defined will generate (possibly cryptic) compiler errors.
+Note that a new macro [macroref BOOST_SCOPE_EXIT_ALL] needed to be introduced instead of reusing [macroref BOOST_SCOPE_EXIT] because `BOOST_SCOPE_EXIT(&)` and `BOOST_SCOPE_EXIT(=)` cannot be distinguished from `BOOST_SCOPE_EXIT(void)` or `BOOST_SCOPE_EXIT(this_)` using the C++ preprocessor given that the symbols `&` and `=` are neither prefxied nor postfixed by alphanumeric tokens (this is not an issue for [macroref BOOST_SCOPE_EXIT_ALL] which always has the non-alphanumeric `&` or `=` as the first capture so the first capture tokens are simply never compared with neither `void` nor `this_` for this macro).
 ]
 
-Following the same syntax adopted by C++11 lambdas, the [macroref BOOST_SCOPE_EXIT_ALL] macro accepts a comma-separated list of captures which must start with either `&` or `=` to capture all variables in scope respectively by reference or by value (note that no variable name is specified by these leading captures).
+Following the same syntax adopted by C++11 lambda functions, the [macroref BOOST_SCOPE_EXIT_ALL] macro accepts a comma-separated list of captures which must start with either `&` or `=` to capture all variables in scope respectively by reference or by value (note that no variable name is specified by these leading captures).
 Additional captures of specific variables can follow the leading `&` or `=` and they will override the default reference or value captures.
 For example (see also [@../../test/world_checkpoint_all.cpp =world_checkpoint_all.cpp=]):
 
 [world_checkpoint_all]
 
-The first __Boost_ScopeExit__ declaration captures all variables in scope by reference but `checkpoint` and `this_` which are explicitly captured by value (in particular, `p` and `persons_` are captured by reference).
-The second __Boost_ScopeExit__ declaration instead captures all variables in scope by value but `p` which is captured by reference (in particular, `checkpoint`, `prev_id`, and `this` are captured by value).
+The first __Boost_ScopeExit__ declaration captures all variables in scope by reference but the variable `checkpoint` and the object `this` which are explicitly captured by value (in particular, `p` and `persons_` are implicitly captured by reference here).
+The second __Boost_ScopeExit__ declaration instead captures all variables in scope by value but `p` which is explicitly captured by reference (in particular, `checkpoint`, `prev_id`, and `this` are implicitly captured by value here).
+
+Note that the [macroref BOOST_SCOPE_EXIT_ALL] macro follows the C++11 lambda function syntax which is unfortunately different from the [macroref BOOST_SCOPE_EXIT] macro syntax.
+In particular:
+
+# The [macroref BOOST_SCOPE_EXIT_ALL] macro cannot capture data members without capturing the object `this` while that is not the case for [macroref BOOST_SCOPE_EXIT].
+[footnote
+At present, there seems to be some discussion to allow C++11 lambda functions to capture data members without capturing the object `this`.
+If the C++11 standard were changed to allow this, the [macroref BOOST_SCOPE_EXIT_ALL] macro syntax could be extended to be a superset of the [macroref BOOST_SCOPE_EXIT] macro while keeping full backward compatibility.
+]
+# The [macroref BOOST_SCOPE_EXIT_ALL] macro captures the object in scope using `this` instead of `this_`.
+[footnote
+On compilers that support the use of the `typename` outside templates as allowed by the C++11 standard, [macroref BOOST_SCOPE_EXIT_ALL] can use both `this` and `this_` to capture the object in scope (notably, this is not the case for the MSVC 10.0 compiler).
+]
+# The [macroref BOOST_SCOPE_EXIT_ALL] body is terminated by a semicolon `;` instead than by the [macroref BOOST_SCOPE_EXIT_END] macro.
+
+If programmers define the configuration macro [macroref BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS] then the [macroref BOOST_SCOPE_EXIT] macro implementation will use C++11 lamda functions and the [macroref BOOST_SCOPE_EXIT] macro will follow the same syntax of [macroref BOOST_SCOPE_EXIT_ALL] macro, which is the C++11 lambda function syntax.
+However, [macroref BOOST_SCOPE_EXIT] will no longer be backward compatible and older code using [macroref BOOST_SCOPE_EXIT] might no longer compile (if data members were explicitly captured).
 
 [endsect]
 
 [section Template Workaround (GCC)]
 
 Various versions of the GCC compiler do not compile [macroref BOOST_SCOPE_EXIT] inside templates (see the __Reference__ section for more information).
-As a workaround, [macroref BOOST_SCOPE_EXIT_TPL] should be used instead of [macroref BOOST_SCOPE_EXIT] in these cases:
+As a workaround, [macroref BOOST_SCOPE_EXIT_TPL] should be used instead of [macroref BOOST_SCOPE_EXIT] in these cases.
 [footnote
+*Rationale.*
 GCC versions compliant with C++11 do not present this issue and given that [macroref BOOST_SCOPE_EXIT_ALL] is only available on C++11 compilers, there is no need for a `BOOST_SCOPE_EXIT_ALL_TPL` macro.
 ]
+The [macroref BOOST_SCOPE_EXIT_TPL] macro has the exact same syntax of [macroref BOOST_SCOPE_EXIT].
+For example (see also [@../../test/world_tpl.cpp =world_tpl.cpp=]):
 
 [world_tpl]
 
-The [macroref BOOST_SCOPE_EXIT_TPL] macro has the exact same syntax of [macroref BOOST_SCOPE_EXIT].
+It is recommended to always use [macroref BOOST_SCOPE_EXIT_TPL] within templates so to maximize portability among different compilers.
 
 [endsect]
 
@@ -245,31 +251,31 @@
 In general, it is not possible to expand the [macroref BOOST_SCOPE_EXIT], [macroref BOOST_SCOPE_EXIT_TPL], [macroref BOOST_SCOPE_EXIT_END], and [macroref BOOST_SCOPE_EXIT_ALL] macros multiple times on the same line.
 [footnote
 *Rationale.*
-This library's macros internally use `__LINE__` to generate unique identifiers.
+The library macros internally use `__LINE__` to generate unique identifiers.
 Therefore, if the same macro is expanded more than on time on the same line, the generated identifiers will no longer be unique and the code will not compile.
 (This restriction does not apply to MSVC and other compilers that provide the non-standard `__COUNTER__` macro.)
 ]
 
-Therefore, this library provides additional macros [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] which can be expanded multiple times on the same line as long as programmers specify a unique identifier as the macro's first parameter.
-The unique identifier can be any token (not just numeric) that can be successfully concatenated by the preprocessor (e.g., `scope_exit_number_1_at_line_123`).
-The second parameter of [macroref BOOST_SCOPE_EXIT_ID] shall be `1` if the macro is used within a template (equivalent to [macroref BOOST_SCOPE_EXIT_TPL]), or `0` otherwise.
-Finally, [macroref BOOST_SCOPE_EXIT_ID] and [macroref BOOST_SCOPE_EXIT_ALL_ID] accept a capture list using the exact same syntax as [macroref BOOST_SCOPE_EXIT] and [macroref BOOST_SCOPE_EXIT_ALL] respectively.
+Therefore, this library provides additional macros [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_TPL_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] which can be expanded multiple times on the same line as long as programmers specify a unique identifiers as the macros' first parameters.
+The unique identifier can be any token (not just numeric) that can be concatenated by the C++ preprocessor (e.g., `scope_exit_number_1_at_line_123`).
+[footnote
+Because there are restrictions on the set of tokens that the C++ preprocessor can concatenate and because not all compilers correctly implement these restrictions, it is in general recommended to specify unique identifiers as a combination of alphanumeric tokens.
+]
 
+The [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_TPL_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] macros accept a capture list using the exact same syntax as [macroref BOOST_SCOPE_EXIT] and [macroref BOOST_SCOPE_EXIT_ALL] respectively.
 For example (see also [@../../test/same_line.cpp =same_line.cpp=]):
 
 [same_line]
 
-As indicated by the example above, the [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] macros are especially useful when it is necessary to invoke them multiple times within user-defined macros (because the preprocessor expands all nested macros on the same line).
+As shown by the example above, the [macroref BOOST_SCOPE_EXIT_ID], [macroref BOOST_SCOPE_EXIT_TPL_ID], [macroref BOOST_SCOPE_EXIT_END_ID], and [macroref BOOST_SCOPE_EXIT_ALL_ID] macros are especially useful when it is necessary to invoke them multiple times within user-defined macros (because the C++ preprocessor expands all nested macros on the same line).
 
 [endsect]
 
 [endsect]
 
-[xinclude reference.xml]
-
 [section:Alternatives Annex: Alternatives]
 
-This section presents some alternatives and work related to __Boost_ScopeExit__.
+This section presents some alternative and related work to __Boost_ScopeExit__.
 
 [h5 Try-Catch]
 
@@ -281,10 +287,10 @@
 
 Note the following issues with this approach:
 
-* The `passwd` object is defined outside of the `try` block because this object is required inside the `catch` block to close the file.
-* The `passwd` object is not fully constructed until after the `open`
+# The `passwd` object is defined outside of the `try` block because this object is required inside the `catch` block to close the file.
+# The `passwd` object is not fully constructed until after the `open`
 member function returns.
-* If opening throws, the `passwd.close()` should not be called, hence the call to `passwd.is_open()`.
+# If opening throws, the `passwd.close()` should not be called, hence the call to `passwd.is_open()`.
 
 The __Boost_ScopeExit__ approach does not have any of these issues.
 For example (see also [@../../example/try_catch.cpp =try_catch.cpp=]):
@@ -331,7 +337,7 @@
 
 [h5 Scope Guards]
 
-Imagine that a new currency rate is introduced before performing a transaction:
+Imagine that a new currency rate is introduced before performing a transaction (see also []):
 
 [scope_guard_decl]
         
@@ -360,9 +366,9 @@
 
 Note the following issues with this approach:
 
-* __Boost_Lambda__ expressions are hard to write correctly (e.g., overloaded functions must be explicitly casted, as demonstrated in the example above).
-* The condition in the `if_` expression refers to `commit` variable indirectly through the `_1` placeholder reducing readability.
-* Setting a breakpoint inside `if_[...]` requires in-depth knowledge of __Boost_Lambda__ and debugging techniques.
+# __Boost_Lambda__ expressions are hard to write correctly (e.g., overloaded functions must be explicitly casted, as demonstrated in the example above).
+# The condition in the `if_` expression refers to `commit` variable indirectly through the `_1` placeholder reducing readability.
+# Setting a breakpoint inside `if_[...]` requires in-depth knowledge of __Boost_Lambda__ and debugging techniques.
 
 This code will look much better with C++11 lambdas:
 
@@ -386,14 +392,14 @@
 
 A curious reader may notice that the library does not implement `scope(success)` and `scope(failure)` of the __D__ language.
 Unfortunately, these are not possible in C++ because failure or success conditions cannot be determined by calling `std::uncaught_exception` (see [@http://www.gotw.ca/gotw/047.htm Guru of the Week #47] for more details about `std::uncaught_exception` and if it has any good use at all).
-However, this is not a big problem because these two __D__'s constructs can be expressed in terms of __D_scope_exit__ and a `bool commit` variable as explained in the __Tutorial__ section.
+However, this is not a big problem because these two __D__'s constructs can be expressed in terms of __D_scope_exit__ and a `bool commit` variable (similarly to some examples presented in the __Tutorial__ section).
 
 [h5 C++11 Lambdas]
 
 Using C++11 lambdas, it is relatively easy to implement the __Boost_ScopeExit__ construct.
-For example (see also [@../../example/world_lambda.cpp =world_lambda.cpp=]):
+For example (see also [@../../example/world_cxx11_lambda.cpp =world_cxx11_lambda.cpp=]):
 
-[world_lambda]
+[world_cxx11_lambda]
 
 However, this library allows to program the __Boost_ScopeExit__ construct in a way that is portable between C++03 and C++11 compilers.
 
@@ -406,6 +412,9 @@
 [h5 Sequence Syntax]
 
 Most modern compilers support variadic macros (notably, these include GCC, MSVC, and all C++11 compilers).
+[footnote
+A C++ compiler does not support variadic macros if the __Boost_Config__ macro `BOOST_NO_VARIADIC_MACROS` is defined for that compiler.
+]
 However, in the rare case that programmers need to use this library on a complier without variaidc macros, this library also allows to specify the capture list using a __Boost_Preprocessor__ sequence where tokens are separated by round parenthesis `()`:
 
     (capture1) (capture2) ... // All compilers.
@@ -414,16 +423,17 @@
 
     capture1, capture2, ... // Only compilers with variadic macros.
 
-For example, the following syntax is accepted on all compilers with and without variadic macros (see also [@../../test/world_seq.cpp =world_seq.cpp=]):
-
-[world_seq]
+For example, the following syntax is accepted on all compilers with and without variadic macros (see also [@../../test/world_seq.cpp =world_seq.cpp=] and [@../../test/world.cpp =world.cpp=]):
 
-Furthermore, older versions of this library used to only support the __Boost_Preprocessor__ sequence syntax so the above syntax is also supported for backward compatibility.
-However, in the current version of this library and on compilers with variadic macros, the comma-separated syntax we have seen so far is preferred because more readable (see also [@../../test/world.cpp =world.cpp=]):
-
-[world]
+[table
+[ [Boost.Preprocessor Sequence (All Compilers)] [Comma-Separated List (Variadic Macros Only)] ]
+[ [[world_seq]] [[world]] ]
+]
 
 Note how the same macros accept both syntaxes on compilers with variadic macros and only the __Boost_Preprocessor__ sequence syntax on compilers without variadic macros.
+Older versions of this library used to only support the __Boost_Preprocessor__ sequence syntax so this syntax is supported also for backward compatibility.
+However, in the current version of this library and on compilers with variadic macros, the comma-separated syntax is preferred because it is more readable.
+
 Finally, an empty capture list is always specified using `void` on compilers with and without variaidc macros (see also [@../../test/world_void.cpp =world_void.cpp=]):
 
 [world_void]
@@ -445,25 +455,27 @@
 
 [endsect]
 
+[xinclude reference.xml]
+
 [section:Acknowledgements Acknowledgements]
 
 Alexander Nasonov is the original library author.
 
 Lorenzo Caminiti added variadic macro support, capture of the object `this_`, empty captures using `void`, and `BOOST_SCOPE_EXIT_ALL`.
 
-/Thanks to the following people (in chronological order)./
+Thanks to the following people (in chronological order):
 
-Maxim Yegorushkin for sharing code where he used a local struct to clean up resources.
+Maxim Yegorushkin for sharing code where he used a local struct to clean up resources;
 
-Andrei Alexandrescu for pointing out the __D_scope_exit__ construct of the __D__ programming language.
+Andrei Alexandrescu for pointing out the __D_scope_exit__ construct of the __D__ programming language;
 
-Pavel Vozenilek and Maxim Yanchenko for reviews of early drafts of the library.
+Pavel Vozenilek and Maxim Yanchenko for reviews of early drafts of the library;
 
-Steven Watanabe for his valuable ideas.
+Steven Watanabe for his valuable ideas;
 
-Jody Hagins for good comments that helped to significantly improve the documentation.
+Jody Hagins for good comments that helped to significantly improve the documentation;
 
-Richard Webb for testing the library on MSVC compiler.
+Richard Webb for testing the library on MSVC compiler;
 
 Adam Butcher for a workaround to error C2355 when deducing the type of `this` on some MSVC versions.
 

Modified: trunk/libs/scope_exit/test/same_line.cpp
==============================================================================
--- trunk/libs/scope_exit/test/same_line.cpp (original)
+++ trunk/libs/scope_exit/test/same_line.cpp 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -17,28 +17,43 @@
 
 //[same_line
 #define SCOPE_EXIT_INC_DEC(variable, offset) \
- BOOST_SCOPE_EXIT_ID( \
- BOOST_PP_CAT(inc, __LINE__) /* unique ID */, 0 /* no TPL */, \
+ BOOST_SCOPE_EXIT_ID(BOOST_PP_CAT(inc, __LINE__), /* unique ID */ \
             &variable, offset) { \
         variable += offset; \
     } BOOST_SCOPE_EXIT_END_ID(BOOST_PP_CAT(inc, __LINE__)) \
     \
- BOOST_SCOPE_EXIT_ID( \
- BOOST_PP_CAT(dec, __LINE__) /* unique ID */, 0 /* no TPL */, \
+ BOOST_SCOPE_EXIT_ID(BOOST_PP_CAT(dec, __LINE__), \
+ &variable, offset) { \
+ variable -= offset; \
+ } BOOST_SCOPE_EXIT_END_ID(BOOST_PP_CAT(dec, __LINE__))
+
+#define SCOPE_EXIT_INC_DEC_TPL(variable, offset) \
+ BOOST_SCOPE_EXIT_ID_TPL(BOOST_PP_CAT(inc, __LINE__), \
+ &variable, offset) { \
+ variable += offset; \
+ } BOOST_SCOPE_EXIT_END_ID(BOOST_PP_CAT(inc, __LINE__)) \
+ \
+ BOOST_SCOPE_EXIT_ID_TPL(BOOST_PP_CAT(dec, __LINE__), \
             &variable, offset) { \
         variable -= offset; \
     } BOOST_SCOPE_EXIT_END_ID(BOOST_PP_CAT(dec, __LINE__))
 
 #define SCOPE_EXIT_ALL_INC_DEC(variable, offset) \
- BOOST_SCOPE_EXIT_ALL_ID(BOOST_PP_CAT(inc, __LINE__) /* unique ID */, \
+ BOOST_SCOPE_EXIT_ALL_ID(BOOST_PP_CAT(inc, __LINE__), \
             =, &variable) { \
         variable += offset; \
     }; \
- BOOST_SCOPE_EXIT_ALL_ID(BOOST_PP_CAT(dec, __LINE__) /* unique ID */, \
+ BOOST_SCOPE_EXIT_ALL_ID(BOOST_PP_CAT(dec, __LINE__), \
             =, &variable) { \
         variable -= offset; \
     };
 
+template<typename T>
+void f(T& x, T& delta) {
+ SCOPE_EXIT_INC_DEC_TPL(x, delta) // Multiple scope exits on same line.
+ BOOST_TEST(x == 0);
+}
+
 int main(void) {
     int x = 0, delta = 10;
 
@@ -47,6 +62,8 @@
     }
     BOOST_TEST(x == 0);
 
+ f(x, delta);
+
 #ifndef BOOST_NO_LAMBDAS
     {
         SCOPE_EXIT_ALL_INC_DEC(x, delta) // Multiple scope exits on same line.

Modified: trunk/libs/scope_exit/test/world_this.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_this.cpp (original)
+++ trunk/libs/scope_exit/test/world_this.cpp 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -35,7 +35,7 @@
     bool commit = false;
 
     persons_.push_back(a_person);
- //[world_this_
+ //[world_this
     BOOST_SCOPE_EXIT(&commit, this_) { // Capture object `this_`.
         if(!commit) this_->persons_.pop_back();
     } BOOST_SCOPE_EXIT_END

Modified: trunk/libs/scope_exit/test/world_void.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_void.cpp (original)
+++ trunk/libs/scope_exit/test/world_void.cpp 2012-04-09 16:32:17 EDT (Mon, 09 Apr 2012)
@@ -16,7 +16,9 @@
 struct person {};
 BOOST_TYPEOF_REGISTER_TYPE(person)
 
-struct world_t; BOOST_TYPEOF_REGISTER_TYPE(world_t)
+struct world_t;
+BOOST_TYPEOF_REGISTER_TYPE(world_t)
+
 //[world_void
 struct world_t {
     std::vector<person> persons;


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