forked from ytsaurus/ytsaurus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update contrib/restricted/boost/system to 1.82.0
- Loading branch information
1 parent
2a79bc7
commit 0bd2968
Showing
8 changed files
with
189 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
contrib/restricted/boost/system/include/boost/system/detail/mutex.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#ifndef BOOST_SYSTEM_DETAIL_MUTEX_HPP_INCLUDED | ||
#define BOOST_SYSTEM_DETAIL_MUTEX_HPP_INCLUDED | ||
|
||
// Copyright 2023 Peter Dimov | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/config.hpp> | ||
|
||
#if defined(BOOST_SYSTEM_DISABLE_THREADS) | ||
|
||
namespace boost | ||
{ | ||
namespace system | ||
{ | ||
namespace detail | ||
{ | ||
|
||
struct mutex | ||
{ | ||
void lock() | ||
{ | ||
} | ||
|
||
void unlock() | ||
{ | ||
} | ||
}; | ||
|
||
} // namespace detail | ||
} // namespace system | ||
} // namespace boost | ||
|
||
#elif defined(BOOST_MSSTL_VERSION) && BOOST_MSSTL_VERSION >= 140 | ||
|
||
// Under the MS STL, std::mutex::mutex() is not constexpr, as is | ||
// required by the standard, which leads to initialization order | ||
// issues. However, shared_mutex is based on SRWLock and its | ||
// default constructor is constexpr, so we use that instead. | ||
|
||
#include <shared_mutex> | ||
|
||
namespace boost | ||
{ | ||
namespace system | ||
{ | ||
namespace detail | ||
{ | ||
|
||
typedef std::shared_mutex mutex; | ||
|
||
} // namespace detail | ||
} // namespace system | ||
} // namespace boost | ||
|
||
#else | ||
|
||
#include <mutex> | ||
|
||
namespace boost | ||
{ | ||
namespace system | ||
{ | ||
namespace detail | ||
{ | ||
|
||
using std::mutex; | ||
|
||
} // namespace detail | ||
} // namespace system | ||
} // namespace boost | ||
|
||
#endif | ||
|
||
namespace boost | ||
{ | ||
namespace system | ||
{ | ||
namespace detail | ||
{ | ||
|
||
template<class Mtx> class lock_guard | ||
{ | ||
private: | ||
|
||
Mtx& mtx_; | ||
|
||
private: | ||
|
||
lock_guard( lock_guard const& ); | ||
lock_guard& operator=( lock_guard const& ); | ||
|
||
public: | ||
|
||
explicit lock_guard( Mtx& mtx ): mtx_( mtx ) | ||
{ | ||
mtx_.lock(); | ||
} | ||
|
||
~lock_guard() | ||
{ | ||
mtx_.unlock(); | ||
} | ||
}; | ||
|
||
} // namespace detail | ||
} // namespace system | ||
} // namespace boost | ||
|
||
#endif // #ifndef BOOST_SYSTEM_DETAIL_MUTEX_HPP_INCLUDED |
21 changes: 21 additions & 0 deletions
21
contrib/restricted/boost/system/include/boost/system/detail/requires_cxx11.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef BOOST_SYSTEM_DETAIL_REQUIRES_CXX11_HPP_INCLUDED | ||
#define BOOST_SYSTEM_DETAIL_REQUIRES_CXX11_HPP_INCLUDED | ||
|
||
// Copyright 2023 Peter Dimov | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/config.hpp> | ||
#include <boost/config/pragma_message.hpp> | ||
|
||
#if defined(BOOST_NO_CXX11_CONSTEXPR) || \ | ||
defined(BOOST_NO_CXX11_NOEXCEPT) || \ | ||
defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || \ | ||
defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ | ||
defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) | ||
|
||
BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.System 1.82 and will be removed in Boost.System 1.84.") | ||
|
||
#endif | ||
|
||
#endif // #ifndef BOOST_SYSTEM_DETAIL_REQUIRES_CXX11_HPP_INCLUDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters