Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75953 - in sandbox/closure/boost: . closure closure/aux_ closure/function functional
From: lorcaminiti_at_[hidden]
Date: 2011-12-15 03:46:54


Author: lcaminiti
Date: 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
New Revision: 75953
URL: http://svn.boost.org/trac/boost/changeset/75953

Log:
Renaming to closure.
Added:
   sandbox/closure/boost/closure/function.hpp
      - copied unchanged from r75952, /sandbox/closure/boost/closure/aux_/function.hpp
   sandbox/closure/boost/function.hpp
      - copied, changed from r75952, /sandbox/closure/boost/closure/function.hpp
   sandbox/closure/boost/functional/
      - copied from r75952, /sandbox/closure/boost/closure/function/
Removed:
   sandbox/closure/boost/closure/aux_/block.hpp
   sandbox/closure/boost/closure/aux_/exit.hpp
   sandbox/closure/boost/closure/aux_/function.hpp
   sandbox/closure/boost/closure/block.hpp
   sandbox/closure/boost/closure/exit.hpp
   sandbox/closure/boost/closure/function/
   sandbox/closure/boost/closure/typeof.hpp
Text files modified:
   sandbox/closure/boost/function.hpp | 40 ++++++++++++++++++++++++++++++++++++++++
   1 files changed, 40 insertions(+), 0 deletions(-)

Deleted: sandbox/closure/boost/closure/aux_/block.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/block.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,27 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-#ifndef BOOST_LOCAL_AUX_BLOCK_HPP_
-#define BOOST_LOCAL_AUX_BLOCK_HPP_
-
-#include "symbol.hpp"
-
-// Users can exit a local block (and not enclosing function) using `return;`.
-#define BOOST_LOCAL_AUX_BLOCK( \
- local_function_params_macro, parenthesized_binding) \
- void local_function_params_macro(parenthesized_binding) \
- /* user block code `{ ... }` here */
-
-#define BOOST_LOCAL_AUX_BLOCK_END(id) \
- /* user block code `{ ... }` here */ \
- /* ends the local function declaration */ \
- BOOST_LOCAL_FUNCTION_NAME(inline /* for optimization (never as tparam) */ \
- BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME(id)) \
- /* call local funciton and execute block's code imediately */ \
- BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME(id)(); \
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/aux_/exit.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/exit.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,52 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-#ifndef BOOST_LOCAL_AUX_EXIT_HPP_
-#define BOOST_LOCAL_AUX_EXIT_HPP_
-
-#include "symbol.hpp"
-#include <boost/function.hpp>
-#include <boost/preprocessor/cat.hpp>
-
-// PRIVATE //
-
-#define BOOST_LOCAL_AUX_EXIT_NAME_(name, id) \
- BOOST_LOCAL_AUX_INTERNAL_SYMBOL(BOOST_PP_CAT(BOOST_PP_CAT( \
- BOOST_PP_CAT(exit, BOOST_LOCAL_AUX_SYMBOL_INFIX), name), id))
-
-// PUBLIC //
-
-// Users can exit local scope (and not enclosing function) using `return;`
-// (same as with Boost.ScopeExit).
-#define BOOST_LOCAL_AUX_EXIT(local_function_params_macro, \
- parenthesized_binding) \
- void local_function_params_macro(parenthesized_binding) \
- /* user code block `{ ... }` here */
-
-#define BOOST_LOCAL_AUX_EXIT_END(id) \
- /* user code exit `{ ... }` here */ \
- /* ends the local function declaration */ \
- BOOST_LOCAL_FUNCTION_NAME(BOOST_LOCAL_AUX_EXIT_NAME_(function, id)) \
- /* guard resourse -- function invoked when guard obj goes out of scope */ \
- ::boost::local::aux::exit_guard BOOST_LOCAL_AUX_EXIT_NAME_(guard, id)( \
- BOOST_LOCAL_AUX_EXIT_NAME_(function, id));
-
-namespace boost { namespace local { namespace aux {
-
-// Resource destructor exec exit code when obj goes out of local scope.
-struct exit_guard {
- // Exit local functions are always void with no params (and no defaults).
- typedef ::boost::function<void ()> functor_type;
- explicit exit_guard(functor_type f): f_(f) {}
- ~exit_guard() { f_(); } // Invokes function when obj goes out of scope.
-private:
- functor_type f_;
-};
-
-}}} // namespace
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/aux_/function.hpp
==============================================================================
--- sandbox/closure/boost/closure/aux_/function.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,185 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-#if !BOOST_PP_IS_ITERATING
-# ifndef BOOST_LOCAL_AUX_FUNCTION_HPP_
-# define BOOST_LOCAL_AUX_FUNCTION_HPP_
-
-# include "file.hpp"
-# include "../config.hpp"
-# include <boost/call_traits.hpp>
-# include <boost/preprocessor/iteration/iterate.hpp>
-# include <boost/preprocessor/repetition/repeat.hpp>
-# include <boost/preprocessor/repetition/enum.hpp>
-# include <boost/preprocessor/punctuation/comma_if.hpp>
-# include <boost/preprocessor/arithmetic/sub.hpp>
-# include <boost/preprocessor/arithmetic/inc.hpp>
-# include <boost/preprocessor/cat.hpp>
-
-#define BOOST_LOCAL_AUX_arg_type(z, arg_n, unused) \
- BOOST_PP_CAT(A, arg_n)
-
-#define BOOST_LOCAL_AUX_arg_param_type(z, arg_n, unused) \
- typename ::boost::call_traits<BOOST_LOCAL_AUX_arg_type(z, arg_n, unused) \
- >::param_type
-
-#define BOOST_LOCAL_AUX_arg_name(z, arg_n, unused) \
- BOOST_PP_CAT(a, arg_n)
-
-#define BOOST_LOCAL_AUX_arg(z, arg_n, unused) \
- BOOST_LOCAL_AUX_arg_param_type(z, arg_n, unused) \
- BOOST_LOCAL_AUX_arg_name(z, arg_n, unused)
-
-#define BOOST_LOCAL_AUX_arg_tparam(z, arg_n, unused) \
- typename BOOST_LOCAL_AUX_arg_type(z, arg_n, unused)
-
-#define BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
- BOOST_PP_CAT(call_ptr, n)
-
-#define BOOST_LOCAL_AUX_call_name(z, n, unused) \
- BOOST_PP_CAT(call, n)
-
-#define BOOST_LOCAL_AUX_call_member(z, n, unused) \
- BOOST_PP_CAT(BOOST_LOCAL_AUX_call_name(z, n, unused), _)
-
-#define BOOST_LOCAL_AUX_call_typedef(z, n, arity) \
- typedef R (*BOOST_LOCAL_AUX_call_ptr(z, n, ~))(object_ptr \
- BOOST_PP_COMMA_IF(BOOST_PP_SUB(arity, n)) \
- BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, n), \
- BOOST_LOCAL_AUX_arg_param_type, ~));
-
-#define BOOST_LOCAL_AUX_call_param(z, n, unused) \
- BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
- BOOST_LOCAL_AUX_call_name(z, n, unused)
-
-#define BOOST_LOCAL_AUX_call_decl(z, n, unused) \
- BOOST_LOCAL_AUX_call_ptr(z, n, unused) \
- BOOST_LOCAL_AUX_call_member(z, n, unused);
-
-#define BOOST_LOCAL_AUX_call_init(z, n, unused) \
- BOOST_LOCAL_AUX_call_member(z, n, unused) = \
- BOOST_LOCAL_AUX_call_name(z, n, unuzed);
-
-#define BOOST_LOCAL_AUX_operator_call(z, defaults_n, arity) \
- /* precondition: object_ && call_function_ */ \
- inline R operator()(BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, defaults_n), \
- BOOST_LOCAL_AUX_arg, ~)) const { \
- /* run-time: do not assert preconditions here for efficiency */ \
- /* run-time: this function call is done via a function pointer */ \
- /* so unfortunately does not allow for compiler inlining */ \
- /* optimizations (an alternative using virtual function was also */ \
- /* investigated but also virtual functions cannot be optimized */ \
- /* plus they require virtual table lookups to the alternative */ \
- /* performed worst) */ \
- return BOOST_LOCAL_AUX_call_member(z, defaults_n, ~)(object_ \
- BOOST_PP_COMMA_IF(BOOST_PP_SUB(arity, defaults_n)) \
- BOOST_PP_ENUM_ ## z(BOOST_PP_SUB(arity, defaults_n), \
- BOOST_LOCAL_AUX_arg_name, ~)); \
- }
-
-namespace boost { namespace local { namespace aux {
-
-template<typename F, size_t defaults = 0>
-class function {
- // Empty template cannot be used directly (only via its specializations).
-};
-
-// Iterate within namespace.
-# define BOOST_PP_ITERATION_PARAMS_1 \
- (3, (0, BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX, \
- BOOST_LOCAL_AUX_FILE_FUNCTION_HPP))
-# include BOOST_PP_ITERATE() // Iterate over function arity.
-
-}}} // namespace boost::loca::aux
-
-#undef BOOST_LOCAL_AUX_arg_type
-#undef BOOST_LOCAL_AUX_arg_param_type
-#undef BOOST_LOCAL_AUX_arg_name
-#undef BOOST_LOCAL_AUX_arg
-#undef BOOST_LOCAL_AUX_arg_tparam
-#undef BOOST_LOCAL_AUX_call_ptr
-#undef BOOST_LOCAL_AUX_call_name
-#undef BOOST_LOCAL_AUX_call_member
-#undef BOOST_LOCAL_AUX_call_typedef
-#undef BOOST_LOCAL_AUX_call_param
-#undef BOOST_LOCAL_AUX_call_decl
-#undef BOOST_LOCAL_AUX_call_init
-#undef BOOST_LOCAL_AUX_operator_call
-
-# endif // #include guard
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-# define BOOST_LOCAL_AUX_arity BOOST_PP_FRAME_ITERATION(1)
-# define BOOST_PP_ITERATION_PARAMS_2 \
- (3, (0, BOOST_LOCAL_AUX_arity, \
- BOOST_LOCAL_AUX_FILE_FUNCTION_HPP))
-# include BOOST_PP_ITERATE() // Iterate over default params count.
-# undef BOOST_LOCAL_AUX_arity
-
-#elif BOOST_PP_ITERATION_DEPTH() == 2
-# define BOOST_LOCAL_AUX_defaults BOOST_PP_FRAME_ITERATION(2)
-
-// Iterating within namespce boost::local::aux.
-template<typename R
- BOOST_PP_COMMA_IF(BOOST_LOCAL_AUX_arity)
- BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity, BOOST_LOCAL_AUX_arg_tparam, ~)
->
-class function<
- R (BOOST_PP_ENUM(BOOST_LOCAL_AUX_arity, BOOST_LOCAL_AUX_arg_type, ~))
- , BOOST_LOCAL_AUX_defaults
-> {
- // The object type will actually be a local class which cannot be passed as
- // a template parameter so a generic `void*` pointer is used to hold the
- // object (this pointer will then be cased by the call-function implemented
- // by the local class itself). This is the trick used to pass a local
- // function as a template parameter. This trick uses function pointers for
- // the call-functions and function pointers cannot always be optimized by
- // the compiler (they cannot be inlined) thus this trick increased run-time
- // (another trick using virtual functions for the local class was also
- // investigated but also virtual functions cannot be inlined plus they
- // require virtual tables lookups so the virtual functions trick measured
- // worst run-time performance than the function pointer trick).
- typedef void* object_ptr;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_call_typedef, BOOST_LOCAL_AUX_arity)
-public:
- // run-time: use compiler-generated default constructor, copy constructor,
- // and copy operator (this class only has pointers as member variables and
- // they only need to be copied shallowly so the compiler-generator
- // operations work well) to allow for compiler optimization
-
- // Cannot be private but it should never be used by programmers directly
- // so used internal symbol.
- inline void BOOST_LOCAL_AUX_SYMBOL_INIT_CALL_FUNCTION_NAME(
- object_ptr object,
- BOOST_PP_ENUM(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC no dflt.
- BOOST_LOCAL_AUX_call_param, ~)
- ) {
- object_ = object;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults),
- BOOST_LOCAL_AUX_call_init, ~)
- unused_ = 0; // To avoid a GCC uninitialized variable error.
- }
-
- // Result operator(Arg1, ..., ArgN-1, ArgN) -- iff defaults >= 0
- // Result operator(Arg1, ..., ArgN-1) -- iff defaults >= 1
- // ... -- etc
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_operator_call, BOOST_LOCAL_AUX_arity)
-
-private:
- object_ptr object_;
- BOOST_PP_REPEAT(BOOST_PP_INC(BOOST_LOCAL_AUX_defaults), // INC for no dflt.
- BOOST_LOCAL_AUX_call_decl, ~)
-
- // run-time: this unused void* member variable allows for compiler
- // optimizations (at least on MSVC it reduces invocation time of about 50%)
- void* unused_;
-};
-
-# undef BOOST_LOCAL_AUX_defaults
-#endif // iteration
-

Deleted: sandbox/closure/boost/closure/block.hpp
==============================================================================
--- sandbox/closure/boost/closure/block.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,162 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-/** @file
- * @brief Local blocks allow to program code that is executed "in place" while
- * accessing some of the variables in scope as constants.
- */
-
-#ifndef BOOST_LOCAL_BLOCK_HPP_
-#define BOOST_LOCAL_BLOCK_HPP_
-
-#include "config.hpp"
-#include "function.hpp"
-#include "aux_/block.hpp"
-#include <boost/config.hpp> // For variadic macros.
-
-#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
-
-/**
- * @brief This macro starts the declaration of a local block.
- *
- * This macro must be used within a declarative context, it must be followed by
- * the local block body code and then by the @RefMacro{BOOST_LOCAL_BLOCK_END}
- * macro (see the @RefSect{Tutorial} section):
- * @code
- * { // Some declarative context.
- * ...
- * BOOST_LOCAL_BLOCK(bindings) {
- * ... // Body code.
- * } BOOST_LOCAL_BLOCK_END
- * ...
- * }
- * @endcode
- *
- * As usual, exceptions specifications can be optionally programmed before the
- * body code block (but the specifications will only apply the body code and
- * not to the library code automatically generated by the macro expansion,
- * see @RefSect2{Advanced_Topics, Advanced Topics}).
- *
- * Within templates, the special macro @RefMacro{BOOST_LOCAL_BLOCK_TPL} must be
- * used instead of @RefMacro{BOOST_LOCAL_BLOCK}.
- *
- * @Note A <c>return;</c> instruction from within a local block body jumps to
- * the end of the local block body and it does not return the enclosing scope.
- *
- * @Params
- * @Param{bindings,
- * On all C++ compilers\, the <em>sequencing macro syntax</em> defined by the
- * following grammar is used to specify the variables in scope to bind:
- * @code
- * bindings:
- * void_list | bound_list
- * void_list:
- * (void)
- * bound_list:
- * (bound_parameter1) (bound_parameter2) ...
- * bound_parameter:
- * [const] bind [(variable_type)] [&] variable_name
- * @endcode
- * Where the following lexical conventions have been used:
- * <c>token1 | token2</c> means either <c>token1</c> or <c>token2</c>;
- * <c>[token]</c> means either <c>token</c> or nothing (i.e.\, <c>token</c> is
- * optional).
- *
- * On C99 and later compilers that support variadic macros\, the above
- * grammar can be modified as follow to define the <em>variadic macro
- * syntax</em> that can also be used to specify the variables in scope to
- * bind:
- * @code
- * void_list:
- * void
- * bound_list:
- * bound_parameter1\, bound_parameter2\, ...
- * @endcode
- * Note that the variadic macro syntax uses commas <c>\,</c> instead of
- * parenthesis <c>()</c> to separate the parameters and therefore resembles
- * the usual C++ function parameter declaration syntax more closely than the
- * sequencing macro syntax. However\, the variadic macro syntax will only work
- * on C++ compilers that support variadic macros so it should be used with
- * care in order to avoid portability issues.
- *
- * Finally\, on C++ compilers that support empty macro parameters\, the above
- * grammars can be modified as follow to define the <em>empty macro
- * syntax</em> that can also be used to specify an empty list of variables to
- * bind:
- * @code
- * void_list:
- * ()
- * @endcode
- * Note that the empty macro parameter syntax uses the usual C++ syntax to
- * specify empty bound variable list but it will only work on compilers
- * that support empty macro parameters so it should be used with care in order
- * to avoid portability issues.
- * }
- * @EndParams
- *
- * When the object <c>this</c> is specified as the name of the variable to
- * bind, the body must use the special name <c>this_</c> to access the bound
- * object.
- * The special name <c>this_</c> is defined by the configuration macro
- * @RefMacro{BOOST_LOCAL_CONFIG_THIS_PARAM_NAME}.
- *
- * Both the variadic and empty macro syntaxes are always disabled when the
- * configuration macro @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT} is defined.
- *
- * @Note This macro cannot be used multiple times on the same line because it
- * internally uses the line number <c>__LINE__</c> to generate unique
- * identifiers.
- *
- * @See @RefSect{Tutorial} section, @RefSect2{Advanced_Topics, Advanced Topics}
- * section, @RefMacro{BOOST_LOCAL_BLOCK_TPL},
- * @RefMacro{BOOST_LOCAL_BLOCK_END},
- * @RefMacro{BOOST_LOCAL_CONFIG_THIS_PARAM_NAME},
- * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}.
- */
-#define BOOST_LOCAL_BLOCK(bindings) \
- BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS, bindings)
-/**
- * @brief This macro is the same as @RefMacro{BOOST_LOCAL_BLOCK} but
- * it must be used when declaring local blocks within templates.
- *
- * @See @RefMacro{BOOST_LOCAL_BLOCK}, @RefSect{Tutorial} section.
- */
-#define BOOST_LOCAL_BLOCK_TPL(bindings) \
- BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS_TPL, bindings)
-
-#else // BOOST_NO_VARIADIC_MACROS
-
-#include "aux_/preprocessor/variadic/to_seq.hpp"
-
-#define BOOST_LOCAL_BLOCK(...) \
- BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS, \
- BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__))
-
-#define BOOST_LOCAL_BLOCK_TPL(...) \
- BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS_TPL, \
- BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__))
-
-#endif // BOOST_NO_VARIADIC_MACROS
-
-/**
- * @brief This macro ends the definition of a local block.
- *
- * This macro must follow the local block body code <c>{ ... }</c> as
- * shown in the @RefMacro{BOOST_LOCAL_BLOCK} documentation.
- *
- * @Note This macro cannot be used multiple times on the same line because it
- * internally uses the line number <c>__LINE__</c> to generate unique
- * identifiers.
- *
- * @See @RefMacro{BOOST_LOCAL_BLOCK}, @RefSect{Tutorial} section.
- */
-#define BOOST_LOCAL_BLOCK_END \
- BOOST_LOCAL_AUX_BLOCK_END(__LINE__)
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/exit.hpp
==============================================================================
--- sandbox/closure/boost/closure/exit.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,164 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-/** @file
- * @brief Local exits allow to program code that is executed when the enclosing
- * scope is exited.
- */
-
-#ifndef BOOST_LOCAL_EXIT_HPP_
-#define BOOST_LOCAL_EXIT_HPP_
-
-#include "config.hpp"
-#include "function.hpp"
-#include "aux_/exit.hpp"
-#include <boost/config.hpp> // For variadic macros.
-
-#if defined(BOOST_NO_VARIADIC_MACROS) || defined(BOOST_LOCAL_CONFIG_COMPLIANT)
-
-/**
- * @brief This macro starts the declaration of a local exit.
- *
- * This macro must be used within a declarative context, it must be followed by
- * the local exit body code and then by the @RefMacro{BOOST_LOCAL_EXIT_END}
- * macro (see the @RefSect{Tutorial} section):
- * @code
- * { // Some declarative context.
- * ...
- * BOOST_LOCAL_EXIT(bindings) {
- * ... // Body code.
- * } BOOST_LOCAL_EXIT_END
- * ...
- * }
- * @endcode
- *
- * The execution of the local exit body code is guaranteed only if the program
- * does not terminate because of an uncaught exception.
- * As usual, exceptions specifications can be optionally programmed before the
- * body code block (but the specifications will only apply the body code and
- * not to the library code automatically generated by the macro expansion,
- * see @RefSect2{Advanced_Topics, Advanced Topics}).
- *
- * Within templates, the special macro @RefMacro{BOOST_LOCAL_EXIT_TPL} must be
- * used instead of @RefMacro{BOOST_LOCAL_EXIT}.
- *
- * @Note A <c>return;</c> instruction from within a local exit body jumps to
- * the end of the local exit body and it does not return the enclosing scope.
- *
- * @Params
- * @Param{bindings,
- * On all C++ compilers\, the <em>sequencing macro syntax</em> defined by the
- * following grammar is used to specify the variables in scope to bind:
- * @code
- * bindings:
- * void_list | bound_list
- * void_list:
- * (void)
- * bound_list:
- * (bound_parameter1) (bound_parameter2) ...
- * bound_parameter:
- * [const] bind [(variable_type)] [&] variable_name
- * @endcode
- * Where the following lexical conventions have been used:
- * <c>token1 | token2</c> means either <c>token1</c> or <c>token2</c>;
- * <c>[token]</c> means either <c>token</c> or nothing (i.e.\, <c>token</c> is
- * optional).
- *
- * On C99 and later compilers that support variadic macros\, the above
- * grammar can be modified as follow to define the <em>variadic macro
- * syntax</em> that can also be used to specify the variables in scope to
- * bind:
- * @code
- * void_list:
- * void
- * bound_list:
- * bound_parameter1\, bound_parameter2\, ...
- * @endcode
- * Note that the variadic macro syntax uses commas <c>\,</c> instead of
- * parenthesis <c>()</c> to separate the parameters and therefore resembles
- * the usual C++ function parameter declaration syntax more closely than the
- * sequencing macro syntax. However\, the variadic macro syntax will only work
- * on C++ compilers that support variadic macros so it should be used with
- * care in order to avoid portability issues.
- *
- * Finally\, on C++ compilers that support empty macro parameters\, the above
- * grammars can be modified as follow to define the <em>empty macro
- * syntax</em> that can can also be used to specify an empty list of variables
- * to bind:
- * @code
- * void_list:
- * ()
- * @endcode
- * Note that the empty macro parameter syntax uses the usual C++ syntax to
- * specify empty bound variable list but it will only work on compilers
- * that support empty macro parameters so it should be used with care in order
- * to avoid portability issues.
- * }
- * @EndParams
- *
- * When the object <c>this</c> is specified as the name of the variable to
- * bind, the body must use the special name <c>this_</c> to access the bound
- * object.
- * The special name <c>this_</c> is defined by the configuration macro
- * @RefMacro{BOOST_LOCAL_CONFIG_THIS_PARAM_NAME}.
- *
- * Both the variadic and empty macro syntaxes are always disabled when the
- * configuration macro @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT} is defined.
- *
- * @Note This macro cannot be used multiple times on the same line because it
- * internally uses the line number <c>__LINE__</c> to generate unique
- * identifiers.
- *
- * @See @RefSect{Tutorial} section, @RefSect2{Advanced_Topics, Advanced Topics}
- * section, @RefMacro{BOOST_LOCAL_EXIT_TPL}, @RefMacro{BOOST_LOCAL_EXIT_END},
- * @RefMacro{BOOST_LOCAL_CONFIG_THIS_PARAM_NAME},
- * @RefMacro{BOOST_LOCAL_CONFIG_COMPLIANT}.
- */
-#define BOOST_LOCAL_EXIT(binding_list) \
- BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS, binding_list)
-
-/**
- * @brief This macro is the same as @RefMacro{BOOST_LOCAL_EXIT} but
- * it must used when declaring local exits within templates.
- *
- * @See @RefMacro{BOOST_LOCAL_EXIT}, @RefSect{Tutorial} section.
- */
-#define BOOST_LOCAL_EXIT_TPL(binding_list) \
- BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS_TPL, binding_list)
-
-#else // BOOST_NO_VARIADIC_MACROS
-
-#include "aux_/preprocessor/variadic/to_seq.hpp"
-
-#define BOOST_LOCAL_EXIT(...) \
- BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS, \
- BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__))
-
-#define BOOST_LOCAL_EXIT_TPL(...) \
- BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS_TPL, \
- BOOST_LOCAL_AUX_PP_VARIADIC_TO_SEQ( \
- (void) /* for empty seq */, __VA_ARGS__))
-
-#endif // BOOST_NO_VARIADIC_MACROS
-
-/**
- * @brief This macro ends the definition of a local exit.
- *
- * This macro must follow the local exit body code <c>{ ... }</c> as
- * shown in the @RefMacro{BOOST_LOCAL_EXIT} documentation.
- *
- * @Note This macro cannot be used multiple times on the same line because it
- * internally uses the line number <c>__LINE__</c> to generate unique
- * identifiers.
- *
- * @See @RefMacro{BOOST_LOCAL_EXIT}, @RefSect{Tutorial} section.
- */
-#define BOOST_LOCAL_EXIT_END \
- BOOST_LOCAL_AUX_EXIT_END(__LINE__)
-
-#endif // #include guard
-

Deleted: sandbox/closure/boost/closure/typeof.hpp
==============================================================================
--- sandbox/closure/boost/closure/typeof.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
+++ (empty file)
@@ -1,56 +0,0 @@
-
-// Copyright (C) 2009-2011 Lorenzo Caminiti
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
-// copy at http://www.boost.org/LICENSE_1_0.txt).
-
-/** @file
- * @brief Deduce the type of variables that are bound to local functions,
- * local blocks, and local exits.
- */
-
-#ifndef BOOST_LOCAL_TYPEOF_HPP_
-#define BOOST_LOCAL_TYPEOF_HPP_
-
-#include "aux_/symbol.hpp"
-
-// Bound variable name. Expand to qualified bound type (i.e., bound variable
-// type with extra const and/or & for const and/or reference binds).
-// Can be used with local functions, blocks, and exits. It accepts `this`.
-/**
- * @brief This macro expands to the fully qualified type of a variable bound
- * to to local functions, local blocks, and local exits.
- *
- * The type is fully qualified in that it contains the extra constant and
- * reference qualifiers when they are specified for binding by constant and by
- * reference.
- * For example, if a variable named <c>t</c> of type <c>T</c> is:
- * @li Bound by value using <c>bind t</c> then
- * <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>T</c>.
- * @li Bound by constant value using <c>const bind t</c>
- * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>const T</c>.
- * @li Bound by reference using <c>bind& t</c>
- * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>T&</c>.
- * @li Bound by constant reference using <c>const bind& t</c>
- * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>const T&</c>.
- *
- * Within local functions, local blocks, and local exits, this macro can be
- * used to deduce the bound variable types to declare local variables, check
- * concepts (using Boost.ConceptCheck), etc (see @RefSect2{Advanced_Topics,
- * Advanced Topics} section).
- *
- * @Params
- * @Param{bound_variable_name,
- * The name of the bound variable for which the type is being deduced.
- * }
- * @EndParams
- *
- * @See @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS}, @RefMacro{BOOST_LOCAL_BLOCK},
- * @RefMacro{BOOST_LOCAL_EXIT}, @RefSect2{Advanced_Topics, Advanced Topics}
- * section.
- */
-#define BOOST_LOCAL_TYPEOF(bound_variable_name) \
- BOOST_LOCAL_AUX_SYMBOL_TYPEOF_TYPE(bound_variable_name)
-
-#endif // #include guard
-

Copied: sandbox/closure/boost/function.hpp (from r75952, /sandbox/closure/boost/closure/function.hpp)
==============================================================================
--- /sandbox/closure/boost/closure/function.hpp (original)
+++ sandbox/closure/boost/function.hpp 2011-12-15 03:46:53 EST (Thu, 15 Dec 2011)
@@ -13,6 +13,7 @@
 #define BOOST_LOCAL_FUNCTION_HPP_
 
 #include "config.hpp"
+#include <boost/closure/aux_/symbol.hpp>
 #include "aux_/function_macros/params.hpp"
 #include "aux_/function_macros/name.hpp"
 #include <boost/preprocessor/facilities/empty.hpp>
@@ -228,5 +229,44 @@
 #define BOOST_LOCAL_FUNCTION_NAME(name) \
     BOOST_LOCAL_AUX_FUNCTION_NAME(name)
 
+/** @todo make this accept this_ and error on this */
+// Bound variable name. Expand to qualified bound type (i.e., bound variable
+// type with extra const and/or & for const and/or reference binds).
+// Can be used with local functions, blocks, and exits. It accepts `this`.
+/**
+ * @brief This macro expands to the fully qualified type of a variable bound
+ * to to local functions, local blocks, and local exits.
+ *
+ * The type is fully qualified in that it contains the extra constant and
+ * reference qualifiers when they are specified for binding by constant and by
+ * reference.
+ * For example, if a variable named <c>t</c> of type <c>T</c> is:
+ * @li Bound by value using <c>bind t</c> then
+ * <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>T</c>.
+ * @li Bound by constant value using <c>const bind t</c>
+ * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>const T</c>.
+ * @li Bound by reference using <c>bind& t</c>
+ * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>T&</c>.
+ * @li Bound by constant reference using <c>const bind& t</c>
+ * then <c>BOOST_LOCAL_TYPEOF(t)</c> is <c>const T&</c>.
+ *
+ * Within local functions, local blocks, and local exits, this macro can be
+ * used to deduce the bound variable types to declare local variables, check
+ * concepts (using Boost.ConceptCheck), etc (see @RefSect2{Advanced_Topics,
+ * Advanced Topics} section).
+ *
+ * @Params
+ * @Param{bound_variable_name,
+ * The name of the bound variable for which the type is being deduced.
+ * }
+ * @EndParams
+ *
+ * @See @RefMacro{BOOST_LOCAL_FUNCTION_PARAMS}, @RefMacro{BOOST_LOCAL_BLOCK},
+ * @RefMacro{BOOST_LOCAL_EXIT}, @RefSect2{Advanced_Topics, Advanced Topics}
+ * section.
+ */
+#define BOOST_LOCAL_TYPEOF(bound_variable_name) \
+ BOOST_LOCAL_AUX_SYMBOL_TYPEOF_TYPE(bound_variable_name)
+
 #endif // #include guard
 


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