Compare commits

...

23 Commits

Author SHA1 Message Date
jzmaddock
a7276f0397 Merge pull request #451 from boostorg/issue399
GNU libstdc++3 _GTHREAD_USE_MUTEX_TIMEDLOCK is not used post gcc-6.
2022-11-09 12:51:56 +00:00
jzmaddock
2c2cac226a Update CI script version numbers. 2022-11-08 17:25:12 +00:00
jzmaddock
1c37e0c38d Back off gcc on MacOS 12 for now as there are inscrutable failures. 2022-11-08 13:18:05 +00:00
jzmaddock
c468ec13e2 Add more MacOS runners. 2022-11-07 17:40:45 +00:00
jzmaddock
deed857d16 Try gcc-11. 2022-11-07 17:02:26 +00:00
jzmaddock
3a54a8554a Correct CI script. 2022-11-07 13:30:53 +00:00
jzmaddock
704d2fa08d Add MacOS GCC test runner. 2022-11-07 13:21:10 +00:00
jzmaddock
5f089cc0aa GNU libstdc++3 _GTHREAD_USE_MUTEX_TIMEDLOCK is not used post gcc-6.
Fixes: https://github.com/boostorg/config/issues/399.
2022-11-06 18:45:30 +00:00
jzmaddock
2543ff1397 Merge pull request #445 from Lastique/patch-4
Add support for detecting libstdc++ 12
2022-10-05 17:49:43 +01:00
jzmaddock
902273e738 Merge pull request #442 from Lastique/feature/deprecated_symbols_markup
Add a BOOST_DEPRECATED macro for deprecated symbol markup
2022-10-05 13:26:35 +01:00
jzmaddock
0a17487c3a Merge pull request #441 from jcelerier/develop
Add a macro BOOST_DISABLE_EXPLICIT_SYMBOL_VISIBILITY to disable mandatory symbol visibility
2022-09-17 16:24:50 +01:00
jzmaddock
9f75ca8dfa Fix missing ] in docs. 2022-09-17 13:41:17 +01:00
Jean-Michaël Celerier
ea08901984 Add a macro BOOST_DISABLE_EXPLICIT_SYMBOL_VISIBILITY to disable mandatory symbol visibility 2022-09-12 13:29:11 -04:00
Andrey Semashev
ebb95cbf86 Add support for detecting libstdc++ 12 2022-08-31 10:13:16 +03:00
Peter Dimov
8e94132dad Merge pull request #444 from boostorg/pr/boost-clang-version
Update Clang version detection
2022-08-29 23:20:49 +03:00
Peter Dimov
5d6cf7a2eb Update Apple Clang versions 2022-08-29 20:18:02 +03:00
Peter Dimov
9eaeeb7844 Use __clang_patchlevel__ % 100, because __clang_patchlevel__ is 300080 for Android NDK r16b (refs boostorg/assert#28) 2022-08-29 20:13:53 +03:00
jzmaddock
acd45ca373 Merge pull request #443 from boostorg/ubuntu_18_deprecation
Remove Github testing of Ubuntu-18.04.
2022-08-23 17:22:40 +01:00
jzmaddock
9420e951bc Remove Github testing of Ubuntu-18.04.
As it's being deprecated on Github.
2022-08-23 13:15:56 +01:00
Andrey Semashev
a7a2d4ebf1 Added a BOOST_DEPRECATED macro for deprecated symbol markup.
BOOST_DEPRECATED can be used to mark functions, types and objects as
deprecated, with a message with a recommendation of replacement. Using
such marked symbols in code will generate compiler warnings, with the
specified message, if possible.

The warnings can be suppressed if BOOST_ALLOW_DEPRECATED_SYMBOLS is defined.
Additionally, added support BOOST_ALLOW_DEPRECATED macro that not only
allows for deprecated symbols but also deprecated headers (i.e. defining
BOOST_ALLOW_DEPRECATED is equivalent to defining both
BOOST_ALLOW_DEPRECATED_SYMBOLS and BOOST_ALLOW_DEPRECATED_HEADERS).
2022-08-14 16:15:51 +03:00
Glen Fernandes
e0638d9865 Bump versions to 1.81 2022-08-10 23:36:08 -04:00
jzmaddock
c35885ced4 Merge pull request #440 from boostorg/libcxx15
The std lib unary/binary_function base classes are deprecated/removed…
2022-07-11 19:44:04 +01:00
jzmaddock
f0af4a9184 The std lib unary/binary_function base classes are deprecated/removed from libcpp15.
Fixes https://github.com/boostorg/container_hash/issues/24.
2022-07-11 18:26:34 +01:00
16 changed files with 225 additions and 104 deletions

View File

@@ -19,16 +19,16 @@ def main(ctx):
linux_cxx("g++-4.7 03,11", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', }, globalenv=globalenv),
linux_cxx("g++-4.8 03,11", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', }, globalenv=globalenv),
linux_cxx("g++-4.9 03,11", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', }, globalenv=globalenv),
linux_cxx("g++-5 03,11,14,1z", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("g++-5 gnu-03,11,14,1z", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-6 03,11,14,1z", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("g++-6 gnu++03,11,14,1z Job 9", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-7 03,11,14,17", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', }, globalenv=globalenv),
linux_cxx("g++-7 gnu++03,11,14,17", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-8 03,11,14,17", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17', }, globalenv=globalenv),
linux_cxx("g++-8 gnu++03,11,14,17", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-9 03,11,14,17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
linux_cxx("g++-9 gnu++03,11,14,17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-5 03,11,14,1z", "g++-5", packages="g++-5", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("g++-5 gnu-03,11,14,1z", "g++-5", packages="g++-5", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-6 03,11,14,1z", "g++-6", packages="g++-6", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("g++-6 gnu++03,11,14,1z Job 9", "g++-6", packages="g++-6", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-7 03,11,14,17", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', }, globalenv=globalenv),
linux_cxx("g++-7 gnu++03,11,14,17", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-8 03,11,14,17", "g++-8", packages="g++-8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17', }, globalenv=globalenv),
linux_cxx("g++-8 gnu++03,11,14,17", "g++-8", packages="g++-8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-9 03,11,14,17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
linux_cxx("g++-9 gnu++03,11,14,17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("g++-10 03,11,14,17,20", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03,11,14,17,20', }, globalenv=globalenv),
linux_cxx("g++-10 gnu++03,11,14,17,20", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03,11,14,17,20', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu', }, globalenv=globalenv),
linux_cxx("clang++-3.5 03", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
@@ -39,8 +39,8 @@ def main(ctx):
linux_cxx("clang++-4.0 03", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("clang++-5.0 03", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("clang++-6.0 03", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("clang++-7 03,11", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("clang++-8 03,11", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
linux_cxx("clang++-7 03,11,14,17", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
linux_cxx("clang++-8 03,11,14,17", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
linux_cxx("clang++-9 03,11,14,17,2a", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
linux_cxx("clang++-10 03,11,14,17,20", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', }, globalenv=globalenv),
osx_cxx("XCode-11.7 03,11,17,2a", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),

View File

@@ -21,7 +21,7 @@ jobs:
matrix:
compiler: [ g++-11, g++-12, clang++-14 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -65,7 +65,7 @@ jobs:
matrix:
compiler: [ clang++-11, clang++-12, clang++-13 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -109,7 +109,7 @@ jobs:
matrix:
compiler: [ g++-9, g++-10, clang++-9, clang++-10 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -146,27 +146,21 @@ jobs:
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
ubuntu-bionic:
runs-on: ubuntu-18.04
macos_11:
runs-on: macos-11
strategy:
fail-fast: false
matrix:
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
toolset: [ clang, gcc-11, gcc-10, gcc-9 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update Dependencies
@@ -181,23 +175,20 @@ jobs:
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
- name: Config info
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
macos:
runs-on: macos-latest
macos_12:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
toolset: [ clang ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -235,7 +226,7 @@ jobs:
matrix:
toolset: [ msvc-14.0 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -273,7 +264,7 @@ jobs:
matrix:
toolset: [ msvc-14.2 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -311,7 +302,7 @@ jobs:
matrix:
toolset: [ msvc-14.3 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -349,7 +340,7 @@ jobs:
matrix:
toolset: [ clang-msvc-14.3 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -384,8 +375,8 @@ jobs:
matrix:
qemu_arch: [ aarch64, s390x, ppc64le ]
steps:
- uses: actions/checkout@v2.1.0
- uses: uraimo/run-on-arch-action@v2.0.5
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
@@ -420,8 +411,8 @@ jobs:
matrix:
qemu_arch: [ aarch64, ppc64le ]
steps:
- uses: actions/checkout@v2.1.0
- uses: uraimo/run-on-arch-action@v2.0.5
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
@@ -457,7 +448,7 @@ jobs:
matrix:
compiler: [ emcc ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
@@ -534,7 +525,7 @@ jobs:
matrix:
std: [ 11, 14, 17 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1

View File

@@ -1199,41 +1199,41 @@ struct foo{
Normally evaluates to nothing, but evaluates to return x; if the compiler
requires a return, even when it can never be reached.
]]
[[`BOOST_FALLTHROUGH`][
The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
between switch labels:
``
switch (x) {
case 40:
case 41:
if (truth_is_out_there) {
++x;
BOOST_FALLTHROUGH; // Use instead of/along with annotations in
// comments.
} else {
return x;
}
case 42:
...
``
As shown in the example above, the BOOST_FALLTHROUGH macro should be
followed by a semicolon. It is designed to mimic control-flow statements
like 'break;', so it can be placed in most places where 'break;' can, but
only if there are no statements on the execution path between it and the
next switch label.
[[`BOOST_FALLTHROUGH`][
The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
between switch labels:
``
switch (x) {
case 40:
case 41:
if (truth_is_out_there) {
++x;
BOOST_FALLTHROUGH; // Use instead of/along with annotations in
// comments.
} else {
return x;
}
case 42:
...
``
As shown in the example above, the BOOST_FALLTHROUGH macro should be
followed by a semicolon. It is designed to mimic control-flow statements
like 'break;', so it can be placed in most places where 'break;' can, but
only if there are no statements on the execution path between it and the
next switch label.
When compiled with Clang >3.2 in C++11 mode, the BOOST_FALLTHROUGH macro is
expanded to `[[clang::fallthrough]]` attribute, which is analysed when
performing switch labels fall-through diagnostic ('-Wimplicit-fallthrough').
See clang [@http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough
documentation on language extensions for details.]
When compiled with Clang >3.2 in C++11 mode, the BOOST_FALLTHROUGH macro is
expanded to `[[clang::fallthrough]]` attribute, which is analysed when
performing switch labels fall-through diagnostic ('-Wimplicit-fallthrough').
See clang [@http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough
documentation on language extensions for details.]
When used with unsupported compilers, the BOOST_FALLTHROUGH macro has no
effect on diagnostics.
When used with unsupported compilers, the BOOST_FALLTHROUGH macro has no
effect on diagnostics.
In either case this macro has no effect on runtime behavior and performance
of code.
]]
In either case this macro has no effect on runtime behavior and performance
of code.
]]
[[`BOOST_EXPLICIT_TEMPLATE_TYPE(t)`
`BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t,v)`
@@ -1405,11 +1405,11 @@ Usage example:
handle_error("ptr is NULL");
``
]]
[[`BOOST_ATTRIBUTE_UNUSED`][Expands to `__attribute__((unused))` when this is available -
[[`BOOST_ATTRIBUTE_UNUSED`][Expands to `__attribute__((unused))` when this is available -
can be used to disable compiler warnings relating to unused types or variables.]]
[[`BOOST_ATTRIBUTE_NODISCARD`][Expands to `[[nodiscard]]` when this is available -
[[`BOOST_ATTRIBUTE_NODISCARD`][Expands to `[[nodiscard]]` when this is available -
can be used to create a warning when a type or variable is unused.]]
[[`BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS`][Expands to `[[no_unique_address]]` when this is available -
[[`BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS`][Expands to `[[no_unique_address]]` when this is available -
can be used to indicate that a non-static data member need not have a unique address (for example empty classes).]]
[[`BOOST_MAY_ALIAS`, `BOOST_NO_MAY_ALIAS`][
`BOOST_MAY_ALIAS` expands to a type attribute that can be used to mark types that may
@@ -1423,6 +1423,27 @@ Usage example:
typedef unsigned int BOOST_MAY_ALIAS aliasing_uint;
``
]]
[[`BOOST_DEPRECATED(M)`][Expands to an attribute for a symbol that generates warnings when that
symbol is used in code. The warnings may contain a message `M`, which must be a string literal.
This attribute may be applied to types, functions or objects and is typically used to mark
parts of the API as deprecated with a recommendation of replacement.
Example:
``
BOOST_DEPRECATED("Use bar() instead.")
void foo();
template< typename T >
class BOOST_DEPRECATED("Use std::unique_ptr instead.") auto_ptr
{
};
BOOST_DEPRECATED("Use std::numeric_limits<int>::max() instead.")
const int max_int = 0x7fffffff;
``
The warnings issued by `BOOST_DEPRECATED` can be suppressed by defining
`BOOST_ALLOW_DEPRECATED_SYMBOLS` or `BOOST_ALLOW_DEPRECATED` macros.]]
[[`BOOST_PRAGMA_MESSAGE(M)`][Defined in header `<boost/config/pragma_message.hpp>`,
this macro expands to the equivalent of `#pragma message(M)`. `M` must be a string
literal.
@@ -1438,8 +1459,8 @@ this macro issues the message "This header is deprecated. Use `A` instead." via
Example: `BOOST_HEADER_DEPRECATED("<boost/config/workaround.hpp>")`
The messages issued by `BOOST_HEADER_DEPRECATED` can be suppressed by defining the macro
`BOOST_ALLOW_DEPRECATED_HEADERS`.]]
The messages issued by `BOOST_HEADER_DEPRECATED` can be suppressed by defining
`BOOST_ALLOW_DEPRECATED_HEADERS` or `BOOST_ALLOW_DEPRECATED` macros.]]
]
[endsect]
@@ -1664,6 +1685,15 @@ export/import of symbols from shared libraries.
['Deprecated. This macro is no longer necessary since BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
are now supplied. It is provided to support legacy code.]
]]
[[`BOOST_DISABLE_EXPLICIT_SYMBOL_VISIBILITY`][
Disables the effect of the BOOST_SYMBOL_EXPORT, BOOST_SYMBOL_IMPORT and BOOST_SYMBOL_VISIBLE macros,
in order to revert to the default compiler behaviour.
Note that this option should never be used if Boost libraries are being linking against dynamically,
or if you are building a shared library that exposes Boost types in its public API.
It is however advisable when statically-linking against Boost to prevent Boost symbols from leaking from the binary:
for instance because you are building a plug-in for a software which may itself use Boost which could cause
ODR conflicts.
]]
]
Typical usage:

View File

@@ -325,11 +325,18 @@
// All versions with __cplusplus above this value seem to support this:
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
#endif
//
// __builtin_unreachable:
#if defined(__has_builtin) && __has_builtin(__builtin_unreachable)
// Unreachable code markup
#if defined(__has_builtin)
#if __has_builtin(__builtin_unreachable)
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
#endif
#endif
// Deprecated symbol markup
#if __has_attribute(deprecated)
#define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif
#if (__clang_major__ == 3) && (__clang_minor__ == 0)
// Apparently a clang bug:

View File

@@ -4,14 +4,20 @@
#if !defined(__APPLE__)
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__ % 100)
#else
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__ % 100)
// https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
# if BOOST_CLANG_REPORTED_VERSION >= 130000
# if BOOST_CLANG_REPORTED_VERSION >= 140000
# define BOOST_CLANG_VERSION 140000
# elif BOOST_CLANG_REPORTED_VERSION >= 130100
# define BOOST_CLANG_VERSION 130000
# elif BOOST_CLANG_REPORTED_VERSION >= 130000
# define BOOST_CLANG_VERSION 120000
# elif BOOST_CLANG_REPORTED_VERSION >= 120005

View File

@@ -340,12 +340,18 @@
// Type aliasing hint. Supported since gcc 3.3.
#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
//
// __builtin_unreachable:
// Unreachable code markup
#if BOOST_GCC_VERSION >= 40500
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
#endif
// Deprecated symbol markup
#if BOOST_GCC_VERSION >= 40500
#define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
#define BOOST_DEPRECATED(msg) __attribute__((deprecated))
#endif
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "GNU C++ version " __VERSION__
#endif
@@ -359,7 +365,7 @@
// versions check:
// we don't know gcc prior to version 3.30:
#if (BOOST_GCC_VERSION< 30300)
#if (BOOST_GCC_VERSION < 30300)
# error "Compiler not configured - please reconfigure"
#endif
//

View File

@@ -86,6 +86,12 @@
# define BOOST_SYMBOL_VISIBLE __global
#endif
// Deprecated symbol markup
// Oracle Studio 12.4 supports deprecated attribute with a message; this is the first release that supports the attribute.
#if (__SUNPRO_CC >= 0x5130)
#define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif
#if (__SUNPRO_CC < 0x5130)
// C++03 features in 12.4:
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP

View File

@@ -107,6 +107,14 @@
# define BOOST_NO_RTTI
#endif
// Deprecated symbol markup
#if (_MSC_VER >= 1400)
#define BOOST_DEPRECATED(msg) __declspec(deprecated(msg))
#else
// MSVC 7.1 only supports the attribute without a message
#define BOOST_DEPRECATED(msg) __declspec(deprecated)
#endif
//
// TR1 features:
//

View File

@@ -270,6 +270,10 @@
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
#endif
// Deprecated symbol markup
#if __has_attribute(deprecated)
#define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif
// Unused attribute:
#if defined(__GNUC__) && (__GNUC__ >= 4)

View File

@@ -47,6 +47,22 @@
# define BOOST_SYMBOL_VISIBLE
#endif
//
// disable explicitly enforced visibility
//
#if defined(BOOST_DISABLE_EXPLICIT_SYMBOL_VISIBILITY)
#undef BOOST_SYMBOL_EXPORT
#define BOOST_SYMBOL_EXPORT
#undef BOOST_SYMBOL_IMPORT
#define BOOST_SYMBOL_IMPORT
#undef BOOST_SYMBOL_VISIBLE
#define BOOST_SYMBOL_VISIBLE
#endif
//
// look for long long by looking for the appropriate macros in <limits.h>.
// Note that we use limits.h rather than climits for maximal portability,
@@ -668,6 +684,23 @@ namespace std{ using ::type_info; }
# define BOOST_NORETURN
#endif
// BOOST_DEPRECATED -------------------------------------------//
// The macro can be used to mark deprecated symbols, such as functions, objects and types.
// Any code that uses these symbols will produce warnings, possibly with a message specified
// as an argument. The warnings can be suppressed by defining BOOST_ALLOW_DEPRECATED_SYMBOLS
// or BOOST_ALLOW_DEPRECATED.
#if !defined(BOOST_DEPRECATED) && __cplusplus >= 201402
#define BOOST_DEPRECATED(msg) [[deprecated(msg)]]
#endif
#if defined(BOOST_ALLOW_DEPRECATED_SYMBOLS) || defined(BOOST_ALLOW_DEPRECATED)
#undef BOOST_DEPRECATED
#endif
#if !defined(BOOST_DEPRECATED)
#define BOOST_DEPRECATED(msg)
#endif
// Branch prediction hints
// These macros are intended to wrap conditional expressions that yield true or false
//

View File

@@ -17,7 +17,7 @@
#include <boost/config/pragma_message.hpp>
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS)
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS) || defined(BOOST_ALLOW_DEPRECATED)
# define BOOST_HEADER_DEPRECATED(a)
#else
# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.")

View File

@@ -168,4 +168,13 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
#if _LIBCPP_VERSION >= 15000
//
// Unary function is now deprecated in C++11 and later:
//
#if __cplusplus >= 201103L
#define BOOST_NO_CXX98_FUNCTION_BASE
#endif
#endif
// --- end ---

View File

@@ -139,7 +139,9 @@
//
#ifdef __clang__
#if __has_include(<source_location>)
#if __has_include(<expected>)
# define BOOST_LIBSTDCXX_VERSION 120100
#elif __has_include(<source_location>)
# define BOOST_LIBSTDCXX_VERSION 110100
#elif __has_include(<compare>)
# define BOOST_LIBSTDCXX_VERSION 100100
@@ -457,7 +459,7 @@ extern "C" char *gets (char *__s);
# endif
#endif
#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX)
#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) && (__GNUC__ < 6)
// Timed mutexes are not always available:
# define BOOST_NO_CXX11_HDR_MUTEX
#endif

View File

@@ -19,7 +19,7 @@
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 108000
#define BOOST_VERSION 108100
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
#define BOOST_LIB_VERSION "1_80"
#define BOOST_LIB_VERSION "1_81"
#endif

View File

@@ -84,9 +84,9 @@ test-suite config
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on ]
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on : config_info_threaded ]
[ run config_info.cpp : : : <test-info>always_show_run_output <rtti>off <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on : config_info_no_rtti ]
[ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off
<target-os>vxworks:<build>no
: config_info_no_except ]
[ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off
<target-os>vxworks:<build>no
: config_info_no_except ]
[ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ]
[ run abi/abi_test.cpp abi/main.cpp ]
[ run limits_test.cpp ]
@@ -113,11 +113,12 @@ test-suite config
[ run helper_macros_test.cpp ]
[ compile pragma_message_test.cpp ]
[ compile header_deprecated_test.cpp ]
[ compile symbol_deprecated_test.cpp ]
[ compile boost_override_test.cpp ]
;
obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
<toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ;
<toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ;
explicit has_clang_implicit_fallthrough ;
@@ -128,9 +129,9 @@ explicit math_info_printer ;
actions print-run
{
echo With Standard Version $(STANDARD:E=default)
echo =====================================================================
$(>)
echo With Standard Version $(STANDARD:E=default)
echo =====================================================================
$(>)
}
rule print-run ( target : sources * : properties * )
@@ -147,4 +148,3 @@ explicit print_math_info ;
exe config_info_travis : config_info.cpp ;
install config_info_travis_install : config_info_travis : <location>. ;
explicit config_info_travis_install ;

View File

@@ -0,0 +1,19 @@
// Copyright 2022 Andrey Semashev.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
BOOST_DEPRECATED("Use bar() instead.")
void foo();
template< typename T >
class BOOST_DEPRECATED("Use std::unique_ptr instead.") my_auto_ptr
{
};
BOOST_DEPRECATED("Use std::numeric_limits<int>::max() instead.")
const int max_int = 0x7fffffff;