Skip to content

Commit

Permalink
Update boost-1.86
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Aug 15, 2024
1 parent 3982360 commit 8095593
Show file tree
Hide file tree
Showing 677 changed files with 1,599 additions and 20,547 deletions.
47 changes: 36 additions & 11 deletions third_party/boost/.github/workflows/commit-bot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
name: Commit Bot

# Instructions
#
# - One-time setup: create a personal access token with permissions. Then configure it here
# as secrets.CI_PAT. https://github.com/boostorg/boost/settings/secrets/actions
# The reason is explained in https://github.com/orgs/community/discussions/25702
# "If an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run"
#
# - Processing of either the 'master' or 'develop' branch may be stopped by creating the variables
# vars.block_master or vars.block_develop with any value.
# https://github.com/boostorg/boost/settings/variables/actions
#

# To avoid infinite loops, don't trigger on "push"
on:
schedule:
Expand All @@ -19,12 +31,26 @@ jobs:
- name: Check for module updates
id: branches
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
branches="${{ github.ref_name }}"
else
branches="master develop"
fi
echo "branches=$branches" >> $GITHUB_OUTPUT
set -xe
branches=""
if [[ "${{ github.event_name }}" == "push" ]]; then
if [[ ! -n "${{ vars.block_master }}" && "${{ github.ref_name }}" == "master" ]]; then
branches="master"
elif [[ ! -n "${{ vars.block_develop }}" && "${{ github.ref_name }}" == "develop" ]]; then
branches="develop"
else
branches="${{ github.ref_name }}"
fi
else
# from a schedule:
if [[ ! -n "${{ vars.block_master }}" ]]; then
branches="master"
fi
if [[ ! -n "${{ vars.block_develop }}" ]]; then
branches="${branches} develop"
fi
fi
echo "branches=$branches" >> $GITHUB_OUTPUT
- name: Checkout master repository
uses: actions/checkout@v4
Expand All @@ -45,11 +71,11 @@ jobs:
- name: Check for module updates
run: |
branches="${{ steps.branches.outputs.branches }}"
# Set up Git
# Set up Git
git config --global user.name "boost-commitbot"
git config --global user.email "[email protected]"
# Update each branch
for branch in $branches; do
cd $branch
Expand All @@ -74,7 +100,7 @@ jobs:
echo "$submodule_name ($commit_id): OK"
else
echo "$submodule_name: $previous_commit_id -> $commit_id"
set -x
set -x
set +e
git submodule update --init "$submodule_path"
git submodule update --remote "$submodule_path"
Expand Down Expand Up @@ -104,4 +130,3 @@ jobs:
github_token: ${{ secrets.CI_PAT }}
branch: develop
directory: develop

25 changes: 24 additions & 1 deletion third_party/boost/libs/asio/doc/history.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,30 @@

[section:history Revision History]

[heading Asio 1.31.0 / Boost 1.86 beta]
[heading Asio 1.32.0 / Boost 1.86]

* Fixed an issue in `co_composed` caused by a missing `decay`.
* Fixed an issue in `co_composed` due to a missing reference in a cast to a base
class type.
* Changed to use the standard C++20 coroutine feature test macro by default.
* Changed to use `std::aligned_alloc` on Android, when available.
* Fixed an integer conversion warning in `ip::address_v6`, on iOS/tvOS.
* Added missing include of `<malloc.h>` required for `_alloca`.
* Changed to use a standard feature test macro to check if the standard library
supports `std::invoke_result`.
* Fixed handling of `file_base::append` in Windows file support.
* Fixed some warnings in IP address to string conversion.
* Added support for using `co_spawn` when exceptions are disabled.
* Fixed `spawn.hpp` header to be self-contained.
* Enabled TLS v1.3 options for WolfSSL.
* Fixed `experimental::coro` implementation to use the correct cancellation
slot.
* Fixed `io_context::strand::wrap()` so that its return value has an associated
executor.
* Marked `constexpr` global variables as `inline`.
* Documentation fixes.

[heading Asio 1.31.0]

* Changed the `default_completion_token` trait's primary template to select
`deferred` as the default completion token. As a result, most asynchronous
Expand Down
2 changes: 1 addition & 1 deletion third_party/boost/libs/asio/doc/overview/cancellation.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ occur.

Furthermore, a stronger guarantee always satisfies the requirements of a weaker
guarantee. The `partial` guarantee still satisfies the `terminal` guarantee.
The `total` guarantee satisfies both `partial` and `total`. This means that
The `total` guarantee satisfies both `partial` and `terminal`. This means that
when an operation supports a given cancellation type as its strongest
guarantee, it should honour cancellation requests for any of the weaker
guarantees.
Expand Down
1 change: 1 addition & 0 deletions third_party/boost/libs/asio/doc/reference.dox
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ PREDEFINED = GENERATING_DOCUMENTATION \
BOOST_ASIO_CONSTEXPR=constexpr \
BOOST_ASIO_NOEXCEPT=noexcept \
BOOST_ASIO_NODISCARD= \
BOOST_ASIO_INLINE_VARIABLE= \
BOOST_ASIO_COMPLETION_SIGNATURE=typename \
BOOST_ASIO_COMPLETION_HANDLER_FOR(s)=typename \
BOOST_ASIO_COMPLETION_TOKEN_FOR(s)=typename \
Expand Down
5 changes: 5 additions & 0 deletions third_party/boost/libs/asio/doc/tutorial.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,11 @@ Just as it would with a call from a single thread, concurrent calls to boost::as
``''''''`` boost::asio::io_context io;
``''''''`` printer p(io);
``''''''`` std::thread t([&]{ io.run(); });
``''''''`` io.run();
``''''''`` t.join();

``''''''`` return 0;
``''''''``}

See the [link boost_asio.tutorial.tuttimer5.src full source listing]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ boost::asio::io_context::run() will continue to execute while there is "work" le
do. The background thread will not exit until all asynchronous operations have
completed.

\until join
\until }

See the \ref tuttimer5src "full source listing" \n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct partial_as_tuple
* asynchronous operation's default completion token (or boost::asio::deferred
* if no default is available).
*/
constexpr partial_as_tuple as_tuple;
BOOST_ASIO_INLINE_VARIABLE constexpr partial_as_tuple as_tuple;

} // namespace asio
} // namespace boost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ class co_composed_promise

Handler handler(std::move(a.promise_.state_.handler_));
std::tuple<decay_t<Args>...> result(
std::move(static_cast<std::tuple<Args&&...>>(a.result_)));
std::move(static_cast<std::tuple<Args&&...>&>(a.result_)));

co_composed_handler_base<Executors, Handler,
Return>(std::move(composed_handler));
Expand Down Expand Up @@ -1104,7 +1104,7 @@ class initiate_co_composed<Implementation, void(), Signatures...>
};

template <typename... Signatures, typename Implementation, typename Executors>
inline initiate_co_composed<Implementation, Executors, Signatures...>
inline initiate_co_composed<decay_t<Implementation>, Executors, Signatures...>
make_initiate_co_composed(Implementation&& implementation,
composed_io_executors<Executors>&& executors)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ inline auto operator|(Head head, Tail&& tail)
/**
* See the documentation for boost::asio::deferred_t for a usage example.
*/
constexpr deferred_t deferred;
BOOST_ASIO_INLINE_VARIABLE constexpr deferred_t deferred;

} // namespace asio
} // namespace boost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class detached_t
/**
* See the documentation for boost::asio::detached_t for a usage example.
*/
constexpr detached_t detached;
BOOST_ASIO_INLINE_VARIABLE constexpr detached_t detached;

} // namespace asio
} // namespace boost
Expand Down
34 changes: 25 additions & 9 deletions third_party/boost/libs/asio/include/boost/asio/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,19 @@
# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
#endif // !defined(BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)

// Support for inline variables.
#if !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
# if !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
# if (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
# define BOOST_ASIO_HAS_INLINE_VARIABLES 1
# define BOOST_ASIO_INLINE_VARIABLE inline
# endif // (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
# endif // !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
#endif // !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
#if !defined(BOOST_ASIO_INLINE_VARIABLE)
# define BOOST_ASIO_INLINE_VARIABLE
#endif // !defined(BOOST_ASIO_INLINE_VARIABLE)

// Default alignment.
#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
# define BOOST_ASIO_DEFAULT_ALIGN __STDCPP_DEFAULT_NEW_ALIGNMENT__
Expand All @@ -362,7 +375,9 @@
# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) \
&& !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
# if defined(__APPLE__)
# if defined(__ANDROID__) && (__ANDROID_API__ >= 28)
# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
# elif defined(__APPLE__)
# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
Expand Down Expand Up @@ -532,9 +547,9 @@
# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
# else // defined(BOOST_ASIO_MSVC)
# if (__cplusplus >= 201703)
# if (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
# endif // (__cplusplus >= 201703)
# endif // (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
# endif // defined(BOOST_ASIO_MSVC)
# endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
#endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
Expand Down Expand Up @@ -1275,7 +1290,10 @@
// Support the co_await keyword on compilers known to allow it.
#if !defined(BOOST_ASIO_HAS_CO_AWAIT)
# if !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
# if defined(BOOST_ASIO_MSVC)
# if (__cplusplus >= 202002) \
&& (__cpp_impl_coroutine >= 201902) && (__cpp_lib_coroutine >= 201902)
# define BOOST_ASIO_HAS_CO_AWAIT 1
# elif defined(BOOST_ASIO_MSVC)
# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__)
# define BOOST_ASIO_HAS_CO_AWAIT 1
# elif (_MSC_FULL_VER >= 190023506)
Expand Down Expand Up @@ -1386,11 +1404,9 @@
// Standard library support for snprintf.
#if !defined(BOOST_ASIO_HAS_SNPRINTF)
# if !defined(BOOST_ASIO_DISABLE_SNPRINTF)
# if defined(__apple_build_version__)
# if (__clang_major__ >= 14)
# define BOOST_ASIO_HAS_SNPRINTF 1
# endif // (__clang_major__ >= 14)
# endif // defined(__apple_build_version__)
# if defined(__APPLE__)
# define BOOST_ASIO_HAS_SNPRINTF 1
# endif // defined(__APPLE__)
# endif // !defined(BOOST_ASIO_DISABLE_SNPRINTF)
#endif // !defined(BOOST_ASIO_HAS_SNPRINTF)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// || defined(__MACH__) && defined(__APPLE__)

#if defined(_MSC_VER) && (_MSC_VER >= 1800)
# include <malloc.h>
#endif // defined(_MSC_VER) && (_MSC_VER >= 1800)

#include <boost/asio/detail/push_options.hpp>

namespace boost {
Expand Down Expand Up @@ -2583,9 +2587,11 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
|| if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
#if defined(BOOST_ASIO_HAS_SNPRINTF)
snprintf(if_name + 1, sizeof(if_name) - 1, "%lu", scope_id);
#else // defined(BOOST_ASIO_HAS_SNPRINTF)
#elif defined(BOOST_ASIO_HAS_SECURE_RTL)
sprintf_s(if_name + 1, sizeof(if_name) -1, "%lu", scope_id);
#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
sprintf(if_name + 1, "%lu", scope_id);
#endif // defined(BOOST_ASIO_HAS_SNPRINTF)
#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
strcat(dest, if_name);
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ boost::system::error_code win_iocp_file_service::open(
if ((open_flags & file_base::sync_all_on_write) != 0)
flags |= FILE_FLAG_WRITE_THROUGH;

impl.offset_ = 0;
HANDLE handle = ::CreateFileA(path, access, share, 0, disposition, flags, 0);
if (handle != INVALID_HANDLE_VALUE)
{
Expand All @@ -111,10 +112,18 @@ boost::system::error_code win_iocp_file_service::open(
return ec;
}
}
else if ((open_flags & file_base::append) != 0)
}
if (disposition == OPEN_ALWAYS || disposition == OPEN_EXISTING)
{
if ((open_flags & file_base::append) != 0)
{
if (::SetFilePointer(handle, 0, 0, FILE_END)
== INVALID_SET_FILE_POINTER)
LARGE_INTEGER distance, new_offset;
distance.QuadPart = 0;
if (::SetFilePointerEx(handle, distance, &new_offset, FILE_END))
{
impl.offset_ = static_cast<uint64_t>(new_offset.QuadPart);
}
else
{
DWORD last_error = ::GetLastError();
::CloseHandle(handle);
Expand All @@ -128,7 +137,6 @@ boost::system::error_code win_iocp_file_service::open(
handle_service_.assign(impl, handle, ec);
if (ec)
::CloseHandle(handle);
impl.offset_ = 0;
BOOST_ASIO_ERROR_LOCATION(ec);
return ec;
}
Expand Down
Loading

0 comments on commit 8095593

Please sign in to comment.