Compare commits

...

9 Commits

Author SHA1 Message Date
Peter Dimov
6e945160d7 Merge pull request #122 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-01-23 02:21:12 +02:00
Peter Dimov
9d354e5704 Update ci.yml 2026-01-22 22:05:12 +02:00
Andrey Semashev
be80ba1f89 Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 19:45:48 +03:00
Peter Dimov
2fcaa8818b Update revision history 2025-11-18 10:53:38 +02:00
Peter Dimov
3de75e7f57 Remove unused spinlock implementations again 2025-11-14 16:11:10 +02:00
Peter Dimov
f48fe044f3 Switch back to spinlock_gcc_atomic.hpp under Clang; Clang 3.5, 3.6, clang-cl 9 have trouble with ATOMIC_FLAG_INIT 2025-11-14 15:35:13 +02:00
Peter Dimov
8a27c4de9c Revert "Remove unused spinlock implementations"
This reverts commit 9f5a48ab3b.
2025-11-14 15:29:06 +02:00
Peter Dimov
0caaead2ec Add back old Clangs to Appveyor and Drone 2025-11-14 15:11:39 +02:00
Peter Dimov
907965333f Update revision history 2025-10-29 17:15:19 +02:00
8 changed files with 158 additions and 23 deletions

View File

@@ -226,6 +226,20 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
"g++-15-multilib",
),
linux_pipeline(
"Linux 16.04 Clang 3.5",
"cppalliance/droneubuntu1604:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-3.5', CXXSTD: '11' },
"clang-3.5",
),
linux_pipeline(
"Linux 16.04 Clang 3.6",
"cppalliance/droneubuntu1604:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-3.6', CXXSTD: '11,14' },
"clang-3.6",
),
linux_pipeline(
"Linux 16.04 Clang 3.7",
"cppalliance/droneubuntu1604:1",

View File

@@ -84,7 +84,7 @@ jobs:
- toolset: gcc-15
cxxstd: "11,14,17,20,23,2c"
os: ubuntu-latest
container: ubuntu:25.04
container: ubuntu:25.10
install: g++-15-multilib
address-model: 32,64
- toolset: clang
@@ -192,18 +192,24 @@ jobs:
- toolset: clang
compiler: clang++-20
cxxstd: "11,14,17,20,23,2c"
container: ubuntu:25.04
container: ubuntu:24.04
os: ubuntu-latest
install: clang-20
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-13
compiler: clang++-21
cxxstd: "11,14,17,20,23,2c"
container: ubuntu:25.10
os: ubuntu-latest
install: clang-21
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-14
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-15
- toolset: clang
cxxstd: "11,14,17,20,23,2c"
os: macos-26
runs-on: ${{matrix.os}}
@@ -283,7 +289,7 @@ jobs:
- toolset: clang-win
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
os: windows-2025
- toolset: gcc
cxxstd: "11,14,17,2a"
addrmd: 64
@@ -327,11 +333,8 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
- os: ubuntu-latest
- os: macos-latest
runs-on: ${{matrix.os}}
@@ -375,11 +378,8 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
- os: ubuntu-latest
- os: macos-latest
runs-on: ${{matrix.os}}
@@ -433,11 +433,8 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
- os: macos-13
- os: macos-14
- os: macos-15
- os: ubuntu-latest
- os: macos-latest
runs-on: ${{matrix.os}}

View File

@@ -197,7 +197,6 @@ install:
- git submodule init libs/core
- git submodule init libs/move
- git submodule init libs/predef
- git submodule init libs/static_assert
- git submodule init libs/throw_exception
- git submodule init libs/type_traits
- git submodule init libs/detail

View File

@@ -21,6 +21,10 @@ environment:
TOOLSET: msvc-14.1
CXXSTD: 14,17
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: clang-win
CXXSTD: 14,17,latest
ADDRMD: 64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: msvc-14.2
CXXSTD: 14

View File

@@ -13,6 +13,24 @@ http://www.boost.org/LICENSE_1_0.txt
:toc-title:
:idprefix: changelog_
## Changes in 1.90.0
* The functionality enabled by the deprecated macros
`BOOST_SP_ENABLE_DEBUG_HOOKS`, `BOOST_SP_USE_STD_ALLOCATOR`,
and `BOOST_SP_USE_QUICK_ALLOCATOR` has been removed.
* The header `<boost/smart_ptr/detail/quick_allocator.hpp>` has
been marked deprecated and will be removed in a future release.
* Configurations that define `BOOST_NO_CXX11_HDR_ATOMIC` are no
longer supported; a conforming {cpp}11 `<atomic>` is now required.
* The deprecated macros `BOOST_AC_USE_SPINLOCK`, `BOOST_AC_USE_PTHREADS`,
`BOOST_SP_USE_SPINLOCK`, and `BOOST_SP_USE_PTHREADS` are no longer
functional.
* Platform-specific implementations of `atomic_count`, `sp_counted_base`
and `spinlock` are no longer used and have been removed.
* Configurations that define `BOOST_NO_CXX11_HDR_MUTEX` are no
longer supported; a conforming {cpp}11 `<mutex>` is now required.
* Some unused headers in `boost/smart_ptr/detail/` have been removed.
## Changes in 1.88.0
* Fix `operator<<` for wide streams (accidentally broken in 1.87.0)

View File

@@ -29,6 +29,16 @@
//
#include <boost/smart_ptr/detail/deprecated_macros.hpp>
#include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
#if defined(__clang__)
// Old Clang versions have trouble with ATOMIC_FLAG_INIT
# include <boost/smart_ptr/detail/spinlock_gcc_atomic.hpp>
#else
# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
#endif
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED

View File

@@ -0,0 +1,94 @@
#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ATOMIC_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ATOMIC_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// Copyright 2008, 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/smart_ptr/detail/yield_k.hpp>
#if defined(BOOST_SP_REPORT_IMPLEMENTATION)
#include <boost/config/pragma_message.hpp>
BOOST_PRAGMA_MESSAGE("Using __atomic spinlock")
#endif
namespace boost
{
namespace detail
{
class spinlock
{
public:
// `bool` alignment is required for Apple PPC32
// https://github.com/boostorg/smart_ptr/issues/105
// https://github.com/PurpleI2P/i2pd/issues/1726
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590
union
{
unsigned char v_;
bool align_;
};
public:
bool try_lock()
{
return __atomic_test_and_set( &v_, __ATOMIC_ACQUIRE ) == 0;
}
void lock()
{
for( unsigned k = 0; !try_lock(); ++k )
{
boost::detail::yield( k );
}
}
void unlock()
{
__atomic_clear( &v_, __ATOMIC_RELEASE );
}
public:
class scoped_lock
{
private:
spinlock & sp_;
scoped_lock( scoped_lock const & );
scoped_lock & operator=( scoped_lock const & );
public:
explicit scoped_lock( spinlock & sp ): sp_( sp )
{
sp.lock();
}
~scoped_lock()
{
sp_.unlock();
}
};
};
} // namespace detail
} // namespace boost
#define BOOST_DETAIL_SPINLOCK_INIT {{0}}
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ATOMIC_HPP_INCLUDED

View File

@@ -11,7 +11,6 @@ add_subdirectory(../../../assert boostorg/assert)
add_subdirectory(../../../config boostorg/config)
add_subdirectory(../../../core boostorg/core)
add_subdirectory(../../../move boostorg/move)
add_subdirectory(../../../static_assert boostorg/static_assert)
add_subdirectory(../../../throw_exception boostorg/throw_exception)
add_subdirectory(../../../type_traits boostorg/type_traits)