Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81573 - in trunk: boost libs/scope_exit/doc libs/scope_exit/example libs/scope_exit/test
From: marshall_at_[hidden]
Date: 2012-11-26 15:23:36


Author: marshall
Date: 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
New Revision: 81573
URL: http://svn.boost.org/trac/boost/changeset/81573

Log:
Removed usage of deprecated macros in Boost.ScopeExit
Text files modified:
   trunk/boost/scope_exit.hpp | 24 ++++++++++++------------
   trunk/libs/scope_exit/doc/scope_exit.qbk | 6 +++---
   trunk/libs/scope_exit/example/nova.hpp | 4 ++--
   trunk/libs/scope_exit/example/scope_guard.cpp | 2 +-
   trunk/libs/scope_exit/example/try_catch.cpp | 2 +-
   trunk/libs/scope_exit/example/world_cxx11_lambda.cpp | 2 +-
   trunk/libs/scope_exit/test/native.cpp | 2 +-
   trunk/libs/scope_exit/test/native_this.cpp | 2 +-
   trunk/libs/scope_exit/test/native_this_tpl.cpp | 2 +-
   trunk/libs/scope_exit/test/nova.hpp | 4 ++--
   trunk/libs/scope_exit/test/same_line.cpp | 4 ++--
   trunk/libs/scope_exit/test/same_line_seq.cpp | 2 +-
   trunk/libs/scope_exit/test/world.cpp | 2 +-
   trunk/libs/scope_exit/test/world_checkpoint.cpp | 2 +-
   trunk/libs/scope_exit/test/world_checkpoint_all.cpp | 4 ++--
   trunk/libs/scope_exit/test/world_checkpoint_all_seq.cpp | 2 +-
   trunk/libs/scope_exit/test/world_this.cpp | 2 +-
   trunk/libs/scope_exit/test/world_tpl.cpp | 2 +-
   18 files changed, 35 insertions(+), 35 deletions(-)

Modified: trunk/boost/scope_exit.hpp
==============================================================================
--- trunk/boost/scope_exit.hpp (original)
+++ trunk/boost/scope_exit.hpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -596,7 +596,7 @@
 #define BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits) \
     BOOST_PP_TUPLE_ELEM(2, 1, traits)
 
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
 
 namespace boost { namespace scope_exit { namespace aux {
 
@@ -677,7 +677,7 @@
 #endif // Lambdas.
 
 #if defined(BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS) && \
- !defined(BOOST_NO_LAMBDAS) // Use lambda for SCOPE_EXIT (not just _ALL).
+ !defined(BOOST_NO_CXX11_LAMBDAS) // Use lambda for SCOPE_EXIT (not just _ALL).
 
 #define BOOST_SCOPE_EXIT_AUX_IMPL(id, ty, traits) \
     BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, ty, traits)
@@ -758,7 +758,7 @@
 
 // PUBLIC //
 
-#if defined(BOOST_NO_VARIADIC_MACROS) // No variadic macros (sequences only).
+#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) // No variadic macros (sequences only).
 # define BOOST_SCOPE_EXIT_ID(id, void_or_seq) \
         BOOST_SCOPE_EXIT_AUX_IMPL(id, BOOST_PP_EMPTY(), \
                 BOOST_SCOPE_EXIT_AUX_TRAITS( \
@@ -773,7 +773,7 @@
 # define BOOST_SCOPE_EXIT_TPL(void_or_seq) \
         BOOST_SCOPE_EXIT_ID_TPL(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, \
                 void_or_seq)
-# if !defined(BOOST_NO_LAMBDAS)
+# if !defined(BOOST_NO_CXX11_LAMBDAS)
 # define BOOST_SCOPE_EXIT_ALL_ID(id, seq) \
             BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, \
                     /* C++11 allows to use typename outside templates so */ \
@@ -802,7 +802,7 @@
 # define BOOST_SCOPE_EXIT_TPL(...) \
         BOOST_SCOPE_EXIT_ID_TPL(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, \
                 __VA_ARGS__)
-# if !defined(BOOST_NO_LAMBDAS)
+# if !defined(BOOST_NO_CXX11_LAMBDAS)
 # define BOOST_SCOPE_EXIT_ALL_ID(id, ...) \
             BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, \
                     /* C++11 allows to use typename outside templates so */ \
@@ -820,7 +820,7 @@
 #endif // Variadics.
 
 #if defined(BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS) && \
- !defined(BOOST_NO_LAMBDAS) // Use lambdas for SCOPE_EXIT (not just ALL).
+ !defined(BOOST_NO_CXX11_LAMBDAS) // Use lambdas for SCOPE_EXIT (not just ALL).
 # define BOOST_SCOPE_EXIT_END_ID(id) \
         ; /* lambdas ended with just `;` */
 #else // Not using lambdas.
@@ -864,7 +864,7 @@
 @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
+<c>BOOST_NO_CXX11_VARIADIC_MACROS</c>)\, the capture list syntax is defined by the
 following grammar:
 @code
     capture_list:
@@ -883,7 +883,7 @@
             void | capture_sequence
 @endcode
 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
+C++11 compilers that support lambda functions (i.e.\, Boost.Config's <c>BOOST_NO_CXX11_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
@@ -1107,14 +1107,14 @@
 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>
+C++11 compilers that do not define the Boost.Config <c>BOOST_NO_CXX11_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
+<c>BOOST_NO_CXX11_VARIADIC_MACROS</c>)\, the capture list syntax is defined by the
 following grammar:
 @code
 capture_list:
@@ -1191,7 +1191,7 @@
 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).
+Boost.Config <c>BOOST_NO_CXX11_LAMBDAS</c> macro).
 
 @Params
 @Param{id,
@@ -1282,7 +1282,7 @@
 @brief Force to use C++11 lambda functions to implement scope exits.
 
 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
+the Boost.Config macro <c>BOOST_NO_CXX11_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.

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-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -213,8 +213,8 @@
 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 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.
+The [macroref BOOST_SCOPE_EXIT_ALL] macro is only defined on C++11 compilers for which the __Boost_Config__ macro `BOOST_NO_CXX11_LAMBDAS` is not defined.
+Using [macroref BOOST_SCOPE_EXIT_ALL] on C++03 compilers for which `BOOST_NO_CXX11_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).
 ]
 
@@ -430,7 +430,7 @@
 
 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.
+A C++ compiler does not support variadic macros if the __Boost_Config__ macro `BOOST_NO_CXX11_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 `()`:
 

Modified: trunk/libs/scope_exit/example/nova.hpp
==============================================================================
--- trunk/libs/scope_exit/example/nova.hpp (original)
+++ trunk/libs/scope_exit/example/nova.hpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -13,8 +13,8 @@
 // WARNING: This file must be included first in each compilation unit.
 
 // Force no variadic macros but avoiding macro redefinition warning/error.
-#ifndef BOOST_NO_VARIADIC_MACROS
-# define BOOST_NO_VARIADIC_MACROS
+#ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
 #endif
 
 #endif // #include guard

Modified: trunk/libs/scope_exit/example/scope_guard.cpp
==============================================================================
--- trunk/libs/scope_exit/example/scope_guard.cpp (original)
+++ trunk/libs/scope_exit/example/scope_guard.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/example/try_catch.cpp
==============================================================================
--- trunk/libs/scope_exit/example/try_catch.cpp (original)
+++ trunk/libs/scope_exit/example/try_catch.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/example/world_cxx11_lambda.cpp
==============================================================================
--- trunk/libs/scope_exit/example/world_cxx11_lambda.cpp (original)
+++ trunk/libs/scope_exit/example/world_cxx11_lambda.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_LAMBDAS
+#ifdef BOOST_NO_CXX11_LAMBDAS
 # error "lambda functions required"
 #else
 

Modified: trunk/libs/scope_exit/test/native.cpp
==============================================================================
--- trunk/libs/scope_exit/test/native.cpp (original)
+++ trunk/libs/scope_exit/test/native.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -150,7 +150,7 @@
 }
 
 void test_capture_all(void) {
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
     int i = 0, j = 1;
 
     {

Modified: trunk/libs/scope_exit/test/native_this.cpp
==============================================================================
--- trunk/libs/scope_exit/test/native_this.cpp (original)
+++ trunk/libs/scope_exit/test/native_this.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -23,7 +23,7 @@
             BOOST_TEST(this_->value_ == 0);
         } BOOST_SCOPE_EXIT_END
 
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
         BOOST_SCOPE_EXIT_ALL(&, this) {
             BOOST_TEST(this->value_ == 0);
         };

Modified: trunk/libs/scope_exit/test/native_this_tpl.cpp
==============================================================================
--- trunk/libs/scope_exit/test/native_this_tpl.cpp (original)
+++ trunk/libs/scope_exit/test/native_this_tpl.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -25,7 +25,7 @@
             BOOST_TEST(this_->value_ == 0);
         } BOOST_SCOPE_EXIT_END
 
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
         BOOST_SCOPE_EXIT_ALL(&, this) {
             BOOST_TEST(this->value_ == 0);
         };

Modified: trunk/libs/scope_exit/test/nova.hpp
==============================================================================
--- trunk/libs/scope_exit/test/nova.hpp (original)
+++ trunk/libs/scope_exit/test/nova.hpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -13,8 +13,8 @@
 // WARNING: This file must be included first in each compilation unit.
 
 // Force no variadic macros but avoiding macro redefinition warning/error.
-#ifndef BOOST_NO_VARIADIC_MACROS
-# define BOOST_NO_VARIADIC_MACROS
+#ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
 #endif
 
 #endif // #include guard

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-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 
@@ -64,7 +64,7 @@
 
     f(x, delta);
 
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
     {
         SCOPE_EXIT_ALL_INC_DEC(x, delta) // Multiple scope exits on same line.
     }

Modified: trunk/libs/scope_exit/test/same_line_seq.cpp
==============================================================================
--- trunk/libs/scope_exit/test/same_line_seq.cpp (original)
+++ trunk/libs/scope_exit/test/same_line_seq.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -59,7 +59,7 @@
 
     f(x, delta);
 
-#ifndef BOOST_NO_LAMBDAS
+#ifndef BOOST_NO_CXX11_LAMBDAS
     {
         SCOPE_EXIT_ALL_INC_DEC(x, delta)
     }

Modified: trunk/libs/scope_exit/test/world.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world.cpp (original)
+++ trunk/libs/scope_exit/test/world.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/test/world_checkpoint.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_checkpoint.cpp (original)
+++ trunk/libs/scope_exit/test/world_checkpoint.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/test/world_checkpoint_all.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_checkpoint_all.cpp (original)
+++ trunk/libs/scope_exit/test/world_checkpoint_all.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,9 +7,9 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#if defined(BOOST_NO_LAMBDAS)
+#if defined(BOOST_NO_CXX11_LAMBDAS)
 # error "lambda functions required"
-#elif defined(BOOST_NO_VARIADIC_MACROS)
+#elif defined(BOOST_NO_CXX11_VARIADIC_MACROS)
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/test/world_checkpoint_all_seq.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_checkpoint_all_seq.cpp (original)
+++ trunk/libs/scope_exit/test/world_checkpoint_all_seq.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_LAMBDAS
+#ifdef BOOST_NO_CXX11_LAMBDAS
 # error "lambda functions required"
 #else
 

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-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macros required"
 #else
 

Modified: trunk/libs/scope_exit/test/world_tpl.cpp
==============================================================================
--- trunk/libs/scope_exit/test/world_tpl.cpp (original)
+++ trunk/libs/scope_exit/test/world_tpl.cpp 2012-11-26 15:23:34 EST (Mon, 26 Nov 2012)
@@ -7,7 +7,7 @@
 // Home at http://www.boost.org/libs/scope_exit
 
 #include <boost/config.hpp>
-#ifdef BOOST_NO_VARIADIC_MACROS
+#ifdef BOOST_NO_CXX11_VARIADIC_MACROS
 # error "variadic macro required"
 #else
 


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