mirror of
https://github.com/boostorg/config.git
synced 2025-10-04 11:40:59 +02:00
Add BOOST_NOEXCEPT and allies. Apply to Boost.Timer. Correct several Boost.timer boo boos detected while testing BOOST_NOEXCEPT.
[SVN r74895]
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
|
||||
[#config_defects]
|
||||
|
||||
[section Macros that describe defects]
|
||||
[section Macros that describe C++03 defects]
|
||||
|
||||
The following macros all describe features that are required by the C++ standard,
|
||||
The following macros all describe features that are required by the C++03 standard,
|
||||
if one of the following macros is defined, then it represents a defect in the
|
||||
compiler's conformance with the standard.
|
||||
compiler's conformance with the 2003 standard.
|
||||
|
||||
|
||||
[table
|
||||
@@ -514,11 +514,10 @@ standard).
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Macros that describe possible C++0x features]
|
||||
[section Macros that describe possible C++ future features]
|
||||
|
||||
The following macros describe features that are likely to be included in the
|
||||
upcoming ISO C++ standard, C++0x, but have not yet been approved for inclusion
|
||||
in the language.
|
||||
The following macros describe features that may be included in some future
|
||||
ISO C++ standard, but have not yet been approved for inclusion in the language.
|
||||
|
||||
|
||||
[table
|
||||
@@ -531,9 +530,9 @@ The compiler supports concepts.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Macros that describe C++0x features not supported]
|
||||
[section Macros that describe C++11 features not supported]
|
||||
|
||||
The following macros describe features in the upcoming ISO C++ standard, C++0x,
|
||||
The following macros describe features in the 2011 ISO C++ standard, formerly known as C++0x,
|
||||
that are not yet supported by a particular compiler or library.
|
||||
|
||||
[table
|
||||
@@ -641,6 +640,76 @@ variadic macros.
|
||||
|
||||
[endsect]
|
||||
|
||||
[#config_11_for_03]
|
||||
|
||||
[section Macros that allow use of C++11 features with C++03 compilers]
|
||||
|
||||
The following macros allow use of C++11 features even with compilers that do not yet
|
||||
provide compliant C++11 support.
|
||||
|
||||
[table
|
||||
[[Macro ][Section ][ Description ]]
|
||||
|
||||
[[`BOOST_CONSTEXPR`][
|
||||
Some compilers don't support the use of `constexpr`. This macro expands to nothing on those compilers, and `constexpr`
|
||||
elsewhere. For example, when defining a constexpr function or constructor replace:
|
||||
``
|
||||
constexpr tuple();
|
||||
``
|
||||
with:
|
||||
``
|
||||
BOOST_CONSTEXPR tuple();
|
||||
``
|
||||
]]
|
||||
[[`BOOST_CONSTEXPR_OR_CONST`][
|
||||
Some compilers don't support the use of `constexpr`. This macro expands to `const` on those compilers, and `constexpr`
|
||||
elsewhere. For example, when defining const expr variables replace:
|
||||
``
|
||||
static constexpr UIntType xor_mask = a;
|
||||
``
|
||||
with:
|
||||
``
|
||||
static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a;
|
||||
``
|
||||
]]
|
||||
[[`BOOST_STATIC_CONSTEXPR`][
|
||||
This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`For example, when defining const expr variables replace:
|
||||
``
|
||||
static constexpr UIntType xor_mask = a;
|
||||
``
|
||||
with:
|
||||
``
|
||||
BOOST_STATIC_CONSTEXPR UIntType xor_mask = a;
|
||||
``
|
||||
]]
|
||||
[[
|
||||
``
|
||||
BOOST_NOEXCEPT
|
||||
BOOST_NOEXCEPT_IF(Predicate)
|
||||
BOOST_NOEXCEPT_EXPR(Expression)
|
||||
``
|
||||
][
|
||||
If `BOOST_NO_NOEXCEPT` is defined (i.e. C++03 compliant compilers) these macros are defined as:
|
||||
[:
|
||||
``
|
||||
#define BOOST_NOEXCEPT
|
||||
#define BOOST_NOEXCEPT_IF(Predicate)
|
||||
#define BOOST_NOEXCEPT_EXPR(Expression) false
|
||||
``
|
||||
]
|
||||
If `BOOST_NO_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) they are defined as:
|
||||
[:
|
||||
``
|
||||
#define BOOST_NOEXCEPT noexcept
|
||||
#define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
|
||||
#define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
|
||||
``
|
||||
]
|
||||
]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
||||
[#config_helpers]
|
||||
|
||||
[section Boost Helper Macros]
|
||||
@@ -820,38 +889,6 @@ the arguments is itself a macro (see 16.3.1 in C++ standard). This is normally
|
||||
used to create a mangled name in combination with a predefined macro such a
|
||||
\_\_LINE__.
|
||||
]]
|
||||
[[`BOOST_CONSTEXPR`][
|
||||
Some compilers don't support the use of `constexpr`. This macro expands to nothing on those compilers, and `constexpr`
|
||||
elsewhere. For example, when defining a constexpr function or constructor replace:
|
||||
``
|
||||
constexpr tuple();
|
||||
``
|
||||
with:
|
||||
``
|
||||
BOOST_CONSTEXPR tuple();
|
||||
``
|
||||
]]
|
||||
[[`BOOST_CONSTEXPR_OR_CONST`][
|
||||
Some compilers don't support the use of `constexpr`. This macro expands to `const` on those compilers, and `constexpr`
|
||||
elsewhere. For example, when defining const expr variables replace:
|
||||
``
|
||||
static constexpr UIntType xor_mask = a;
|
||||
``
|
||||
with:
|
||||
``
|
||||
static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a;
|
||||
``
|
||||
]]
|
||||
[[`BOOST_STATIC_CONSTEXPR`][
|
||||
This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`For example, when defining const expr variables replace:
|
||||
``
|
||||
static constexpr UIntType xor_mask = a;
|
||||
``
|
||||
with:
|
||||
``
|
||||
BOOST_STATIC_CONSTEXPR UIntType xor_mask = a;
|
||||
``
|
||||
]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
Reference in New Issue
Block a user