2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-03 09:42:16 +00:00

Compare commits

...

10 Commits

Author SHA1 Message Date
Peter Dimov
d0264d6813 Merge branch 'develop' into feature/appveyor 2023-09-13 13:30:52 +03:00
Peter Dimov
cf06d84362 Merge pull request #394 from Lastique/patch-6
Update declval.hpp include
2023-09-13 12:36:52 +03:00
Peter Dimov
ccc5e3142c Further increase test timeout 2023-09-13 11:08:17 +03:00
Peter Dimov
97060416f1 Remove MinGW from Appveyor because of an internal compiler error 2023-09-13 10:06:26 +03:00
Peter Dimov
88e32fd1ac Add cxxstd=11 to MinGW on Appveyor 2023-09-13 01:55:20 +03:00
Andrey Semashev
5f41e68838 Update declval.hpp include.
The header is part of Boost.TypeTraits, so use the appropriate header path.
2023-09-11 21:15:28 +03:00
Peter Dimov
7d570f70d8 Remove msvc-12.0 from Appveyor 2023-09-11 19:32:44 +03:00
Peter Dimov
e62d29f917 Merge branch 'feature/pr-393' into develop 2023-09-11 19:14:36 +03:00
Peter Dimov
09f01fbb05 Merge branch 'invoke_swap' of https://github.com/Flamefire/thread into feature/pr-393 2023-09-11 17:06:57 +03:00
Alexander Grund
27cb703930 Use boost::core::invoke_swap instead of deprecated boost::swap 2023-09-11 09:30:45 +02:00
4 changed files with 18 additions and 17 deletions

View File

@@ -18,9 +18,6 @@ image: Visual Studio 2015
environment:
matrix:
- TOOLSET: msvc-12.0
VARIANT: release
- TOOLSET: msvc-14.0
ADDRMD: 32
VARIANT: debug
@@ -45,20 +42,24 @@ environment:
TOOLSET: gcc
VARIANT: release
- ADDPATH: C:\mingw\bin;
TOOLSET: gcc
VARIANT: debug
# The following configurations fail with
# ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
# https://sourceforge.net/p/mingw-w64/bugs/694/
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756
#
# - ADDPATH: C:\mingw\bin;
# TOOLSET: gcc
# CXXSTD: 11
# VARIANT: debug
#
# - ADDPATH: C:\cygwin64\bin;
# TOOLSET: gcc
# VARIANT: debug
#
# - ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
# TOOLSET: gcc
# VARIANT: debug
#
# - ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
# TOOLSET: gcc
# VARIANT: debug,release

View File

@@ -18,7 +18,7 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/throw_exception.hpp>
#include <boost/core/swap.hpp>
#include <boost/core/invoke_swap.hpp>
#include <boost/config/abi_prefix.hpp>
@@ -105,8 +105,8 @@ namespace boost
void swap(externally_locked& rhs) //BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR)
{
swap(obj_, rhs.obj_);
swap(mtx_, rhs.mtx_);
boost::core::invoke_swap(obj_, rhs.obj_);
boost::core::invoke_swap(mtx_, rhs.mtx_);
}
/**
@@ -245,8 +245,8 @@ namespace boost
void swap(externally_locked& rhs) BOOST_NOEXCEPT
{
swap(obj_, rhs.obj_);
swap(mtx_, rhs.mtx_);
boost::core::invoke_swap(obj_, rhs.obj_);
boost::core::invoke_swap(mtx_, rhs.mtx_);
}
/**
* Requires: The lk parameter must be locking the associated mtx.

View File

@@ -17,8 +17,8 @@
#include <boost/thread/lock_algorithms.hpp>
#include <boost/thread/lock_factories.hpp>
#include <boost/thread/strict_lock.hpp>
#include <boost/core/swap.hpp>
#include <boost/utility/declval.hpp>
#include <boost/core/invoke_swap.hpp>
#include <boost/type_traits/declval.hpp>
//#include <boost/type_traits.hpp>
//#include <boost/thread/detail/is_nothrow_default_constructible.hpp>
//#if ! defined BOOST_NO_CXX11_HDR_TYPE_TRAITS
@@ -582,7 +582,7 @@ namespace boost
unique_lock<mutex_type> lk1(mtx_, defer_lock);
unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
lock(lk1,lk2);
boost::swap(value_, rhs.value_);
boost::core::invoke_swap(value_, rhs.value_);
}
/**
* Swap with the underlying value type
@@ -592,7 +592,7 @@ namespace boost
void swap(value_type & rhs)
{
strict_lock<mutex_type> lk(mtx_);
boost::swap(value_, rhs);
boost::core::invoke_swap(value_, rhs);
}
/**

View File

@@ -14,7 +14,7 @@
#define BOOST_THREAD_TEST_TIME_MS 75
#else
// Windows, Cygwin, macOS all need this
#define BOOST_THREAD_TEST_TIME_MS 250
#define BOOST_THREAD_TEST_TIME_MS 400
#endif
#endif