summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/scope_exit.hpp')
-rw-r--r--3rdParty/Boost/src/boost/scope_exit.hpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/3rdParty/Boost/src/boost/scope_exit.hpp b/3rdParty/Boost/src/boost/scope_exit.hpp
index de502f4..961b29c 100644
--- a/3rdParty/Boost/src/boost/scope_exit.hpp
+++ b/3rdParty/Boost/src/boost/scope_exit.hpp
@@ -590,19 +590,19 @@ msvc_register_type<T, Organizer> typeof_register_type(const T&,
BOOST_SCOPE_EXIT_AUX_TRAITS_ALL_OP(BOOST_PP_LIST_FIRST(captures), \
BOOST_SCOPE_EXIT_AUX_TRAITS(BOOST_PP_LIST_REST(captures)))
#define BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits) \
BOOST_PP_TUPLE_ELEM(2, 0, traits)
#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 {
template<typename This = void>
struct guard { // With object `this_` (for backward compatibility).
explicit guard(This _this) : this_(_this) {}
~guard() { if(f_) f_(this_); }
template<typename Lambda>
void operator=(Lambda f) { f_ = f; }
@@ -671,19 +671,19 @@ private:
, \
BOOST_PP_TUPLE_EAT(2) \
)(id, ty) \
BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), this_) \
) mutable /* can change value captures (as with SCOPE_EXIT) */ -> void
#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)
#else // Not using lambdas.
// ty: EMPTY() | typename
#define BOOST_SCOPE_EXIT_AUX_IMPL(id, ty, traits) \
BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_TAG_DECL, id, \
@@ -752,34 +752,34 @@ private:
ty BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id):: \
BOOST_SCOPE_EXIT_AUX_THIS_T(id) this_ \
) \
)
#endif // Using lambdas.
// 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( \
BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(void_or_seq)))
# define BOOST_SCOPE_EXIT_ID_TPL(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, \
void_or_seq)
# 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 */ \
/* always typename here and no need for ..._ALL_TPL */ \
/* (if a C++11 compiler does not implement this use of */ \
/* typename, always use `this` instead of `this_`) */ \
typename, \
BOOST_SCOPE_EXIT_AUX_TRAITS_ALL( \
BOOST_LOCAL_FUNCTION_DETAIL_PP_NON_VOID_LIST(seq)))
@@ -796,37 +796,37 @@ private:
BOOST_SCOPE_EXIT_AUX_IMPL(id, typename, \
BOOST_SCOPE_EXIT_AUX_TRAITS( \
BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(__VA_ARGS__)))
# define BOOST_SCOPE_EXIT(...) \
BOOST_SCOPE_EXIT_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, \
__VA_ARGS__)
# 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 */ \
/* always typename here and no need for ..._ALL_TPL */ \
/* (if a C++11 compiler does not implement this use of */ \
/* typename, always use `this` instead of `this_`) */ \
typename, \
BOOST_SCOPE_EXIT_AUX_TRAITS_ALL( \
BOOST_LOCAL_FUNCTION_DETAIL_PP_NON_VOID_LIST( \
__VA_ARGS__)))
# define BOOST_SCOPE_EXIT_ALL(...) \
BOOST_SCOPE_EXIT_ALL_ID( \
BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, __VA_ARGS__)
# endif
#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.
# define BOOST_SCOPE_EXIT_END_ID(id) \
} BOOST_SCOPE_EXIT_AUX_GUARD(id)(BOOST_SCOPE_EXIT_AUX_ARGS.value);
#endif // Using lambdas.
#define BOOST_SCOPE_EXIT_END \
BOOST_SCOPE_EXIT_END_ID(BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER)
@@ -858,38 +858,38 @@ the exit of the enclosing scope:
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}.
@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:
void | capture_tuple | capture_sequence
capture_tuple:
capture\, capture\, ...
capture_sequence:
(capture) (capture) ...
capture:
[&]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\, 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
capture:
[&]variable | this_ | this
@endcode
(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;
@@ -1101,26 +1101,26 @@ A part from that, this macro works like @RefMacro{BOOST_SCOPE_EXIT} (see @RefMac
}; // Use `;` instead of `BOOST_SCOPE_EXIT_END` (C++11 only).
...
}
@endcode
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>
+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:
capture_tuple | capture_sequence
capture_tuple:
{& | =} [\, capture\, capture\, ...]
capture_sequence:
{(&) | (=)} [(capture) (capture) ...]
capture:
@@ -1185,19 +1185,19 @@ for a <c>BOOST_SCOPE_EXIT_ALL_TPL</c> macro).
@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
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,
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
@@ -1276,19 +1276,19 @@ portably use <c>__LINE__</c> to internally generate unique identifiers).
@See @RefMacro{BOOST_SCOPE_EXIT_ID}, @RefMacro{BOOST_SCOPE_EXIT_ID_TPL},
@RefMacro{BOOST_SCOPE_EXIT_END}.
*/
#define BOOST_SCOPE_EXIT_END_ID(id)
/**
@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.
@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