forked from boostorg/config
67
.travis.yml
67
.travis.yml
@ -6,6 +6,8 @@ language: cpp
|
|||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
dist : xenial
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@ -26,6 +28,7 @@ matrix:
|
|||||||
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
compiler: g++-4.4
|
compiler: g++-4.4
|
||||||
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
||||||
addons:
|
addons:
|
||||||
@ -36,6 +39,7 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
compiler: g++-4.6
|
compiler: g++-4.6
|
||||||
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
||||||
addons:
|
addons:
|
||||||
@ -46,6 +50,7 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -55,6 +60,7 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -64,6 +70,7 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -117,10 +124,22 @@ matrix:
|
|||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
compiler: g++-9
|
||||||
|
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- g++-9
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -131,6 +150,7 @@ matrix:
|
|||||||
- llvm-toolchain-precise-3.5
|
- llvm-toolchain-precise-3.5
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -141,6 +161,7 @@ matrix:
|
|||||||
- llvm-toolchain-precise-3.6
|
- llvm-toolchain-precise-3.6
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -151,6 +172,7 @@ matrix:
|
|||||||
- llvm-toolchain-precise-3.7
|
- llvm-toolchain-precise-3.7
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -161,6 +183,7 @@ matrix:
|
|||||||
- llvm-toolchain-precise-3.8
|
- llvm-toolchain-precise-3.8
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -179,7 +202,7 @@ matrix:
|
|||||||
- clang-4.0
|
- clang-4.0
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-4.0
|
- llvm-toolchain-xenial-4.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-5.0
|
compiler: clang++-5.0
|
||||||
@ -190,11 +213,11 @@ matrix:
|
|||||||
- clang-5.0
|
- clang-5.0
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-5.0
|
- llvm-toolchain-xenial-5.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-libc++
|
compiler: clang++-libc++
|
||||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER="clang++-5.0 -stdlib=libc++" CXXSTD=03,11,14
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -202,7 +225,7 @@ matrix:
|
|||||||
- clang-5.0
|
- clang-5.0
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-5.0
|
- llvm-toolchain-xenial-5.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-6.0
|
compiler: clang++-6.0
|
||||||
@ -213,7 +236,7 @@ matrix:
|
|||||||
- clang-6.0
|
- clang-6.0
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-6.0
|
- llvm-toolchain-xenial-6.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-libc++
|
compiler: clang++-libc++
|
||||||
@ -225,11 +248,37 @@ matrix:
|
|||||||
- libc++-dev
|
- libc++-dev
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-6.0
|
- llvm-toolchain-xenial-6.0
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: clang++-7
|
||||||
|
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,1z
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-7
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-xenial-7
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: clang++-8
|
||||||
|
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-8
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-xenial-8
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,17,2a
|
||||||
|
osx_image: xcode10.2
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||||
osx_image: xcode9.1
|
osx_image: xcode9.4
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||||
@ -271,9 +320,7 @@ script:
|
|||||||
- if [ $TEST_INTEL ]; then source ~/.bashrc; fi
|
- if [ $TEST_INTEL ]; then source ~/.bashrc; fi
|
||||||
- |-
|
- |-
|
||||||
echo "using $TOOLSET : : $COMPILER : <cxxflags>$EXTRA_FLAGS <linkflags>$EXTRA_FLAGS ;" > ~/user-config.jam
|
echo "using $TOOLSET : : $COMPILER : <cxxflags>$EXTRA_FLAGS <linkflags>$EXTRA_FLAGS ;" > ~/user-config.jam
|
||||||
- IFS=','
|
- ./b2 libs/config/test//print_config_info toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
|
||||||
- for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL $CXXSTD_DIALECT && echo With Standard Version $CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done
|
|
||||||
- unset IFS
|
|
||||||
- ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
|
- ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
12
appveyor.bat
12
appveyor.bat
@ -1,12 +0,0 @@
|
|||||||
IF NOT DEFINED CXXSTD (
|
|
||||||
ECHO %ARGS:"=%
|
|
||||||
..\..\..\b2 config_info_travis_install %ARGS:"=%
|
|
||||||
config_info_travis
|
|
||||||
del config_info_travis.exe
|
|
||||||
)
|
|
||||||
IF DEFINED CXXSTD FOR %%A IN (%CXXSTD%) DO (
|
|
||||||
ECHO %ARGS:"=%
|
|
||||||
..\..\..\b2 -a -d2 config_info_travis_install %ARGS:"=% cxxstd=%%A
|
|
||||||
config_info_travis
|
|
||||||
del config_info_travis.exe
|
|
||||||
)
|
|
@ -22,6 +22,10 @@ environment:
|
|||||||
ARGS: --toolset=msvc-14.1 address-model=32
|
ARGS: --toolset=msvc-14.1 address-model=32
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest cxxflags=-permissive-
|
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest cxxflags=-permissive-
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
ARGS: --toolset=clang-win address-model=64
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
ARGS: --toolset=clang-win address-model=32
|
||||||
- ARGS: --toolset=msvc-9.0 address-model=32
|
- ARGS: --toolset=msvc-9.0 address-model=32
|
||||||
- ARGS: --toolset=msvc-10.0 address-model=32
|
- ARGS: --toolset=msvc-10.0 address-model=32
|
||||||
- ARGS: --toolset=msvc-11.0 address-model=32
|
- ARGS: --toolset=msvc-11.0 address-model=32
|
||||||
@ -65,5 +69,5 @@ build: off
|
|||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cd libs\config\test
|
- cd libs\config\test
|
||||||
- ..\appveyor.bat
|
- ..\..\..\b2 print_config_info %ARGS% cxxstd=%CXXSTD%
|
||||||
- ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD%
|
- ..\..\..\b2 -j3 %ARGS% cxxstd=%CXXSTD%
|
||||||
|
@ -22,3 +22,4 @@ obj power : power.cpp ;
|
|||||||
obj riscv : riscv.cpp ;
|
obj riscv : riscv.cpp ;
|
||||||
obj sparc : sparc.cpp ;
|
obj sparc : sparc.cpp ;
|
||||||
obj x86 : x86.cpp ;
|
obj x86 : x86.cpp ;
|
||||||
|
obj s390x : s390x.cpp ;
|
||||||
|
11
checks/architecture/s390x.cpp
Normal file
11
checks/architecture/s390x.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// s390x.cpp
|
||||||
|
//
|
||||||
|
// Copyright (c) 2012 Steven Watanabe
|
||||||
|
//
|
||||||
|
// 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)
|
||||||
|
|
||||||
|
#if !defined(__s390x__)
|
||||||
|
#error "Not S390x"
|
||||||
|
#endif
|
@ -99,7 +99,8 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
|||||||
#if defined(BOOST_MSVC) \
|
#if defined(BOOST_MSVC) \
|
||||||
|| defined(__BORLANDC__) \
|
|| defined(__BORLANDC__) \
|
||||||
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
||||||
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
|
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
|
||||||
|
|| (defined(BOOST_CLANG) && defined(BOOST_WINDOWS) && defined(_MSC_VER) && (__clang_major__ >= 4))
|
||||||
|
|
||||||
#ifndef BOOST_VERSION_HPP
|
#ifndef BOOST_VERSION_HPP
|
||||||
# include <boost/version.hpp>
|
# include <boost/version.hpp>
|
||||||
@ -203,6 +204,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
|||||||
// Metrowerks CodeWarrior 9.x
|
// Metrowerks CodeWarrior 9.x
|
||||||
# define BOOST_LIB_TOOLSET "cw9"
|
# define BOOST_LIB_TOOLSET "cw9"
|
||||||
|
|
||||||
|
# elif defined(BOOST_CLANG) && defined(BOOST_WINDOWS) && defined(_MSC_VER) && (__clang_major__ >= 4)
|
||||||
|
|
||||||
|
// Clang on Windows
|
||||||
|
# define BOOST_LIB_TOOLSET "clangw" BOOST_STRINGIZE(__clang_major__)
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif // BOOST_LIB_TOOLSET
|
#endif // BOOST_LIB_TOOLSET
|
||||||
|
|
||||||
|
@ -999,7 +999,7 @@ namespace std{ using ::type_info; }
|
|||||||
#if __has_cpp_attribute(nodiscard)
|
#if __has_cpp_attribute(nodiscard)
|
||||||
# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
|
# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
|
||||||
#endif
|
#endif
|
||||||
#if __has_cpp_attribute(no_unique_address)
|
#if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))
|
||||||
# define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
|
# define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]]
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
# the template defined in options_v2.jam.
|
# the template defined in options_v2.jam.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import feature ;
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
project
|
project
|
||||||
@ -114,7 +115,26 @@ obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
|
|||||||
|
|
||||||
explicit has_clang_implicit_fallthrough ;
|
explicit has_clang_implicit_fallthrough ;
|
||||||
|
|
||||||
|
exe config_info_printer : config_info.cpp ;
|
||||||
|
explicit config_info_printer ;
|
||||||
|
|
||||||
|
actions print-run
|
||||||
|
{
|
||||||
|
echo With Standard Version $(STANDARD:E=default)
|
||||||
|
echo =====================================================================
|
||||||
|
$(>)
|
||||||
|
}
|
||||||
|
|
||||||
|
rule print-run ( target : sources * : properties * )
|
||||||
|
{
|
||||||
|
STANDARD on $(target) = [ feature.get-values <cxxstd> : $(properties) ] ;
|
||||||
|
}
|
||||||
|
|
||||||
|
notfile print_config_info : @print-run : config_info_printer ;
|
||||||
|
explicit print_config_info ;
|
||||||
|
|
||||||
|
# Backwards compatibility:
|
||||||
exe config_info_travis : config_info.cpp ;
|
exe config_info_travis : config_info.cpp ;
|
||||||
install config_info_travis_install : config_info_travis : <location>. ;
|
install config_info_travis_install : config_info_travis : <location>. ;
|
||||||
explicit config_info_travis_install ;
|
explicit config_info_travis_install ;
|
||||||
explicit config_info_travis ;
|
|
||||||
|
@ -21,72 +21,78 @@
|
|||||||
|
|
||||||
namespace boost_no_cxx11_hdr_atomic {
|
namespace boost_no_cxx11_hdr_atomic {
|
||||||
|
|
||||||
int test()
|
void consume(std::memory_order)
|
||||||
{
|
{}
|
||||||
std::memory_order m = static_cast<std::memory_order>(std::memory_order_relaxed | std::memory_order_consume | std::memory_order_acquire | std::memory_order_release
|
|
||||||
| std::memory_order_acq_rel | std::memory_order_seq_cst);
|
|
||||||
(void)m;
|
|
||||||
|
|
||||||
std::atomic<int> a1;
|
int test()
|
||||||
std::atomic<unsigned> a2;
|
{
|
||||||
std::atomic<int*> a3;
|
consume(std::memory_order_relaxed);
|
||||||
a1.is_lock_free();
|
consume(std::memory_order_consume);
|
||||||
a1.store(1);
|
consume(std::memory_order_acquire);
|
||||||
a1.load();
|
consume(std::memory_order_release);
|
||||||
a1.exchange(2);
|
consume(std::memory_order_acq_rel);
|
||||||
int v;
|
consume(std::memory_order_seq_cst);
|
||||||
a1.compare_exchange_weak(v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
|
||||||
a1.compare_exchange_strong(v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
|
||||||
a1.fetch_add(2);
|
|
||||||
a1.fetch_sub(3);
|
|
||||||
a1.fetch_and(3);
|
|
||||||
a1.fetch_or(1);
|
|
||||||
a1.fetch_xor(1);
|
|
||||||
a1++;
|
|
||||||
++a1;
|
|
||||||
a1--;
|
|
||||||
--a1;
|
|
||||||
a1 += 2;
|
|
||||||
a1 -= 2;
|
|
||||||
a1 &= 1;
|
|
||||||
a1 |= 2;
|
|
||||||
a1 ^= 3;
|
|
||||||
|
|
||||||
a2 = 0u;
|
std::atomic<int> a1;
|
||||||
|
std::atomic<unsigned> a2;
|
||||||
|
std::atomic<int*> a3;
|
||||||
|
a1.is_lock_free();
|
||||||
|
a1.store(1);
|
||||||
|
a1.load();
|
||||||
|
a1.exchange(2);
|
||||||
|
int v;
|
||||||
|
a1.compare_exchange_weak(v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
||||||
|
a1.compare_exchange_strong(v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
||||||
|
a1.fetch_add(2);
|
||||||
|
a1.fetch_sub(3);
|
||||||
|
a1.fetch_and(3);
|
||||||
|
a1.fetch_or(1);
|
||||||
|
a1.fetch_xor(1);
|
||||||
|
a1++;
|
||||||
|
++a1;
|
||||||
|
a1--;
|
||||||
|
--a1;
|
||||||
|
a1 += 2;
|
||||||
|
a1 -= 2;
|
||||||
|
a1 &= 1;
|
||||||
|
a1 |= 2;
|
||||||
|
a1 ^= 3;
|
||||||
|
|
||||||
a3.store(&v);
|
a2 = 0u;
|
||||||
a3.fetch_add(1);
|
|
||||||
a3.fetch_sub(1);
|
|
||||||
++a3;
|
|
||||||
--a3;
|
|
||||||
a3++;
|
|
||||||
a3--;
|
|
||||||
a3 += 1;
|
|
||||||
a3 -= 1;
|
|
||||||
|
|
||||||
std::atomic_is_lock_free(&a1);
|
a3.store(&v);
|
||||||
// This produces linker errors on Mingw32 for some reason, probably not required anyway for most uses??
|
a3.fetch_add(1);
|
||||||
//std::atomic_init(&a1, 2);
|
a3.fetch_sub(1);
|
||||||
std::atomic_store(&a1, 3);
|
++a3;
|
||||||
std::atomic_store_explicit(&a1, 3, std::memory_order_relaxed);
|
--a3;
|
||||||
std::atomic_load(&a1);
|
a3++;
|
||||||
std::atomic_load_explicit(&a1, std::memory_order_relaxed);
|
a3--;
|
||||||
std::atomic_exchange(&a1, 3);
|
a3 += 1;
|
||||||
std::atomic_compare_exchange_weak(&a1, &v, 2);
|
a3 -= 1;
|
||||||
std::atomic_compare_exchange_strong(&a1, &v, 2);
|
|
||||||
std::atomic_compare_exchange_weak_explicit(&a1, &v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
|
||||||
std::atomic_compare_exchange_strong_explicit(&a1, &v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
|
||||||
|
|
||||||
std::atomic_flag f = ATOMIC_FLAG_INIT;
|
std::atomic_is_lock_free(&a1);
|
||||||
f.test_and_set(std::memory_order_relaxed);
|
// This produces linker errors on Mingw32 for some reason, probably not required anyway for most uses??
|
||||||
f.test_and_set();
|
//std::atomic_init(&a1, 2);
|
||||||
f.clear(std::memory_order_relaxed);
|
std::atomic_store(&a1, 3);
|
||||||
f.clear();
|
std::atomic_store_explicit(&a1, 3, std::memory_order_relaxed);
|
||||||
|
std::atomic_load(&a1);
|
||||||
|
std::atomic_load_explicit(&a1, std::memory_order_relaxed);
|
||||||
|
std::atomic_exchange(&a1, 3);
|
||||||
|
std::atomic_compare_exchange_weak(&a1, &v, 2);
|
||||||
|
std::atomic_compare_exchange_strong(&a1, &v, 2);
|
||||||
|
std::atomic_compare_exchange_weak_explicit(&a1, &v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
||||||
|
std::atomic_compare_exchange_strong_explicit(&a1, &v, 2, std::memory_order_relaxed, std::memory_order_relaxed);
|
||||||
|
|
||||||
std::atomic_thread_fence(std::memory_order_relaxed);
|
std::atomic_flag f = ATOMIC_FLAG_INIT;
|
||||||
std::atomic_signal_fence(std::memory_order_relaxed);
|
f.test_and_set(std::memory_order_relaxed);
|
||||||
|
f.test_and_set();
|
||||||
|
f.clear(std::memory_order_relaxed);
|
||||||
|
f.clear();
|
||||||
|
|
||||||
return 0;
|
std::atomic_thread_fence(std::memory_order_relaxed);
|
||||||
}
|
std::atomic_signal_fence(std::memory_order_relaxed);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ void quiet_warning(const CharT*){}
|
|||||||
|
|
||||||
int test()
|
int test()
|
||||||
{
|
{
|
||||||
#ifdef _<>_<EFBFBD>cpp_<EFBFBD>char8_<EFBFBD>t
|
#if defined(__cpp_char8_type) || defined(__cpp_char8_t)
|
||||||
// The change to char8_t in C++20 is a breaking change to the std:
|
// The change to char8_t in C++20 is a breaking change to the std:
|
||||||
const char8_t* c8 = u8"";
|
const char8_t* c8 = u8"";
|
||||||
#else
|
#else
|
||||||
|
@ -1231,25 +1231,6 @@ void print_boost_macros()
|
|||||||
PRINT_MACRO(BOOST_NO_USING_TEMPLATE);
|
PRINT_MACRO(BOOST_NO_USING_TEMPLATE);
|
||||||
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
|
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// END GENERATED BLOCK
|
// END GENERATED BLOCK
|
||||||
|
|
||||||
PRINT_MACRO(BOOST_INTEL);
|
PRINT_MACRO(BOOST_INTEL);
|
||||||
@ -1267,12 +1248,26 @@ void print_boost_macros()
|
|||||||
PRINT_MACRO(BOOST_FALLTHROUGH);
|
PRINT_MACRO(BOOST_FALLTHROUGH);
|
||||||
PRINT_MACRO(BOOST_MAY_ALIAS);
|
PRINT_MACRO(BOOST_MAY_ALIAS);
|
||||||
PRINT_MACRO(BOOST_NO_MAY_ALIAS);
|
PRINT_MACRO(BOOST_NO_MAY_ALIAS);
|
||||||
|
PRINT_MACRO(BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS);
|
||||||
|
PRINT_MACRO(BOOST_ATTRIBUTE_UNUSED);
|
||||||
|
PRINT_MACRO(BOOST_UNLIKELY);
|
||||||
|
PRINT_MACRO(BOOST_NORETURN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_sd6_macros()
|
void print_sd6_macros()
|
||||||
{
|
{
|
||||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0096r5.html
|
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0096r5.html
|
||||||
|
|
||||||
|
// C++20:
|
||||||
|
PRINT_MACRO(__cpp_aggregate_paren_init);
|
||||||
|
PRINT_MACRO(__cpp_char8_t);
|
||||||
|
PRINT_MACRO(__cpp_char8_type);
|
||||||
|
PRINT_MACRO(__cpp_conditional_explicit);
|
||||||
|
PRINT_MACRO(__cpp_coroutines);
|
||||||
|
PRINT_MACRO(__cpp_impl_destroying_delete);
|
||||||
|
PRINT_MACRO(__cpp_impl_three_way_comparison);
|
||||||
|
PRINT_MACRO(__cpp_nontype_template_parameter_class);
|
||||||
|
|
||||||
// C++17:
|
// C++17:
|
||||||
PRINT_MACRO(__cpp_hex_float);
|
PRINT_MACRO(__cpp_hex_float);
|
||||||
PRINT_MACRO(__cpp_inline_variables);
|
PRINT_MACRO(__cpp_inline_variables);
|
||||||
|
Reference in New Issue
Block a user