forked from boostorg/system
Compare commits
22 Commits
feature/dr
...
develop
Author | SHA1 | Date | |
---|---|---|---|
7a49a5d80d | |||
a0597f4872 | |||
485be93281 | |||
ee0b15efc4 | |||
09f4eb87e2 | |||
3e5ce27719 | |||
40bdcea2e5 | |||
19bcfebf37 | |||
6d58d0bb76 | |||
75e1a1e28b | |||
5feb280612 | |||
fc3ab6db97 | |||
91929719bd | |||
8d0fa396b8 | |||
671d0ad41b | |||
341f960e72 | |||
9b82082f76 | |||
3c293f8740 | |||
2feb94ac07 | |||
d09b2f5f1d | |||
27a5096b6c | |||
9cc66841c4 |
@ -205,22 +205,22 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 GCC 13 32 UBSAN",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
"Linux 24.04 GCC 13 32 UBSAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14,17,20,2b', ADDRMD: '32' } + ubsan,
|
||||
"g++-13-multilib",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 GCC 13 64 UBSAN",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
"Linux 24.04 GCC 13 64 UBSAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14,17,20,2b', ADDRMD: '64' } + ubsan,
|
||||
"g++-13-multilib",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 GCC 13 32 ASAN",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
"Linux 24.04 GCC 13 32 ASAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14,17,20,2b', ADDRMD: '32' } + asan,
|
||||
"g++-13-multilib",
|
||||
),
|
||||
@ -289,15 +289,15 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 Clang 16",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
"Linux 24.04 Clang 16",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-16', CXXSTD: '11,14,17,20,2b' },
|
||||
"clang-16",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.10 Clang 17",
|
||||
"cppalliance/droneubuntu2310:1",
|
||||
"Linux 24.04 Clang 17",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '11,14,17,20,2b' },
|
||||
"clang-17",
|
||||
),
|
||||
@ -316,6 +316,13 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
||||
"clang-18",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 24.10 Clang 19",
|
||||
"cppalliance/droneubuntu2410:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-19', CXXSTD: '11,14,17,20,2b' },
|
||||
"clang-19",
|
||||
),
|
||||
|
||||
macos_pipeline(
|
||||
"MacOS 10.15 Xcode 12.2 UBSAN",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,1z' } + ubsan,
|
||||
|
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
- toolset: gcc-13
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:23.04
|
||||
container: ubuntu:24.04
|
||||
install: g++-13
|
||||
- toolset: gcc-14
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
@ -135,13 +135,13 @@ jobs:
|
||||
- toolset: clang
|
||||
compiler: clang++-16
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
container: ubuntu:23.04
|
||||
container: ubuntu:24.04
|
||||
os: ubuntu-latest
|
||||
install: clang-16
|
||||
- toolset: clang
|
||||
compiler: clang++-17
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
container: ubuntu:23.10
|
||||
container: ubuntu:24.04
|
||||
os: ubuntu-latest
|
||||
install: clang-17
|
||||
- toolset: clang
|
||||
@ -151,34 +151,48 @@ jobs:
|
||||
os: ubuntu-latest
|
||||
install: clang-18
|
||||
- toolset: clang
|
||||
compiler: clang++-19
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-12
|
||||
container: ubuntu:24.10
|
||||
os: ubuntu-latest
|
||||
install: clang-19
|
||||
- toolset: clang
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-13
|
||||
- toolset: clang
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-14
|
||||
- toolset: clang
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
|
||||
container:
|
||||
image: ${{matrix.container}}
|
||||
volumes:
|
||||
- /node20217:/node20217:rw,rshared
|
||||
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Enable Node 16
|
||||
run: |
|
||||
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup container environment
|
||||
if: matrix.container
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install sudo python3 git g++
|
||||
apt-get -y install sudo python3 git g++ curl xz-utils
|
||||
|
||||
- name: Install nodejs20glibc2.17
|
||||
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
|
||||
run: |
|
||||
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
|
||||
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
|
||||
ldd /__e/node20/bin/node
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
@ -284,9 +298,10 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
@ -332,9 +347,10 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
@ -390,9 +406,10 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
|
25
build.jam
Normal file
25
build.jam
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright 2023-2024 René Ferdinand Rivera Morell
|
||||
# Copyright 2024 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/assert//boost_assert
|
||||
/boost/config//boost_config
|
||||
/boost/throw_exception//boost_throw_exception
|
||||
/boost/variant2//boost_variant2
|
||||
/boost/winapi//boost_winapi
|
||||
;
|
||||
|
||||
project /boost/system ;
|
||||
|
||||
explicit
|
||||
[ alias boost_system : build//boost_system ]
|
||||
[ alias all : boost_system test ]
|
||||
;
|
||||
|
||||
call-if : boost-library system
|
||||
: install boost_system
|
||||
;
|
@ -1,25 +1,20 @@
|
||||
# Boost System Library Build Jamfile
|
||||
|
||||
# (C) Copyright Beman Dawes 2002, 2006
|
||||
|
||||
# Copyright 2002, 2006 Beman Dawes
|
||||
# Copyright 2024 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# See library home page at https://www.boost.org/libs/system
|
||||
|
||||
project boost/system
|
||||
: source-location ../src
|
||||
: usage-requirements # pass these requirement to dependents (i.e. users)
|
||||
project
|
||||
: common-requirements
|
||||
<include>../include
|
||||
<library>$(boost_dependencies)
|
||||
<link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
|
||||
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
|
||||
<define>BOOST_SYSTEM_NO_LIB=1
|
||||
;
|
||||
|
||||
SOURCES = error_code ;
|
||||
|
||||
lib boost_system
|
||||
: $(SOURCES).cpp
|
||||
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
|
||||
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
|
||||
;
|
||||
|
||||
boost-install boost_system ;
|
||||
lib boost_system : ../src/$(SOURCES).cpp ;
|
||||
|
@ -73,7 +73,7 @@ inline char const * system_category_message_win32( int ev, char * buffer, std::s
|
||||
DWORD_ retval = boost::winapi::FormatMessageA(
|
||||
FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
|
||||
NULL,
|
||||
ev,
|
||||
static_cast<DWORD_>(ev),
|
||||
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
|
||||
buffer,
|
||||
static_cast<DWORD_>( len ),
|
||||
@ -94,7 +94,7 @@ inline char const * system_category_message_win32( int ev, char * buffer, std::s
|
||||
DWORD_ retval = boost::winapi::FormatMessageW(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER_ | FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
|
||||
NULL,
|
||||
ev,
|
||||
static_cast<DWORD_>(ev),
|
||||
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
|
||||
(LPWSTR_) &lpMsgBuf,
|
||||
0,
|
||||
@ -152,7 +152,7 @@ inline std::string system_category_message_win32( int ev )
|
||||
DWORD_ retval = boost::winapi::FormatMessageW(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER_ | FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
|
||||
NULL,
|
||||
ev,
|
||||
static_cast<DWORD_>(ev),
|
||||
MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
|
||||
(LPWSTR_) &lpMsgBuf,
|
||||
0,
|
||||
@ -176,7 +176,7 @@ inline std::string system_category_message_win32( int ev )
|
||||
return unknown_message_win32( ev );
|
||||
}
|
||||
|
||||
std::string buffer( r, char() );
|
||||
std::string buffer( static_cast<std::size_t>(r), char() );
|
||||
|
||||
r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, &buffer[0], r, NULL, NULL );
|
||||
|
||||
@ -187,12 +187,12 @@ inline std::string system_category_message_win32( int ev )
|
||||
|
||||
--r; // exclude null terminator
|
||||
|
||||
while( r > 0 && ( buffer[ r-1 ] == '\n' || buffer[ r-1 ] == '\r' ) )
|
||||
while( r > 0 && ( buffer[ static_cast<std::size_t>(r)-1 ] == '\n' || buffer[ static_cast<std::size_t>(r)-1 ] == '\r' ) )
|
||||
{
|
||||
--r;
|
||||
}
|
||||
|
||||
if( r > 0 && buffer[ r-1 ] == '.' )
|
||||
if( r > 0 && buffer[ static_cast<std::size_t>(r)-1 ] == '.' )
|
||||
{
|
||||
--r;
|
||||
}
|
||||
|
@ -332,40 +332,28 @@ public:
|
||||
|
||||
BOOST_CXX14_CONSTEXPR T& operator*() noexcept
|
||||
{
|
||||
T* p = operator->();
|
||||
|
||||
BOOST_ASSERT( p != 0 );
|
||||
|
||||
return *p;
|
||||
BOOST_ASSERT( has_value() );
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR T const& operator*() const noexcept
|
||||
{
|
||||
T const* p = operator->();
|
||||
|
||||
BOOST_ASSERT( p != 0 );
|
||||
|
||||
return *p;
|
||||
BOOST_ASSERT( has_value() );
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
BOOST_CXX14_CONSTEXPR T& operator*() & noexcept
|
||||
{
|
||||
T* p = operator->();
|
||||
|
||||
BOOST_ASSERT( p != 0 );
|
||||
|
||||
return *p;
|
||||
BOOST_ASSERT( has_value() );
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR T const& operator*() const & noexcept
|
||||
{
|
||||
T const* p = operator->();
|
||||
|
||||
BOOST_ASSERT( p != 0 );
|
||||
|
||||
return *p;
|
||||
BOOST_ASSERT( has_value() );
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
template<class U = T>
|
||||
@ -838,11 +826,8 @@ public:
|
||||
|
||||
BOOST_CXX14_CONSTEXPR U& operator*() const noexcept
|
||||
{
|
||||
U* p = operator->();
|
||||
|
||||
BOOST_ASSERT( p != 0 );
|
||||
|
||||
return *p;
|
||||
BOOST_ASSERT( has_value() );
|
||||
return *operator->();
|
||||
}
|
||||
|
||||
// error access
|
||||
|
@ -17,6 +17,9 @@ project
|
||||
|
||||
: requirements
|
||||
|
||||
<library>/boost/system//boost_system
|
||||
<library>/boost/core//boost_core
|
||||
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on
|
||||
|
@ -14,4 +14,4 @@ target_link_libraries(main Boost::system)
|
||||
enable_testing()
|
||||
add_test(main main)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
|
@ -23,4 +23,4 @@ target_link_libraries(quick Boost::system Boost::core)
|
||||
enable_testing()
|
||||
add_test(quick quick)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)
|
||||
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)
|
||||
|
Reference in New Issue
Block a user