Skip to content

Commit

Permalink
add new asio
Browse files Browse the repository at this point in the history
  • Loading branch information
weidonglian committed Jul 31, 2024
1 parent 415955c commit 01ae20e
Show file tree
Hide file tree
Showing 658 changed files with 0 additions and 35,180 deletions.
23 changes: 0 additions & 23 deletions third_party/asio/asio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// asio.hpp
// ~~~~~~~~
//
<<<<<<< HEAD
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
=======
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
>>>>>>> 142038d (add asio new version)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -19,22 +15,15 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

<<<<<<< HEAD
=======
#include "asio/any_completion_executor.hpp"
#include "asio/any_completion_handler.hpp"
#include "asio/any_io_executor.hpp"
>>>>>>> 142038d (add asio new version)
#include "asio/append.hpp"
#include "asio/as_tuple.hpp"
#include "asio/associated_allocator.hpp"
#include "asio/associated_cancellation_slot.hpp"
#include "asio/associated_executor.hpp"
<<<<<<< HEAD
#include "asio/associated_cancellation_slot.hpp"
=======
#include "asio/associated_immediate_executor.hpp"
>>>>>>> 142038d (add asio new version)
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
#include "asio/awaitable.hpp"
Expand Down Expand Up @@ -70,36 +59,24 @@
#include "asio/buffered_write_stream_fwd.hpp"
#include "asio/buffered_write_stream.hpp"
#include "asio/buffers_iterator.hpp"
<<<<<<< HEAD
#include "asio/cancellation_signal.hpp"
#include "asio/cancellation_state.hpp"
#include "asio/cancellation_type.hpp"
=======
#include "asio/cancel_after.hpp"
#include "asio/cancel_at.hpp"
#include "asio/cancellation_signal.hpp"
#include "asio/cancellation_state.hpp"
#include "asio/cancellation_type.hpp"
#include "asio/co_composed.hpp"
>>>>>>> 142038d (add asio new version)
#include "asio/co_spawn.hpp"
#include "asio/completion_condition.hpp"
#include "asio/compose.hpp"
#include "asio/composed.hpp"
#include "asio/connect.hpp"
#include "asio/connect_pipe.hpp"
<<<<<<< HEAD
=======
#include "asio/consign.hpp"
>>>>>>> 142038d (add asio new version)
#include "asio/coroutine.hpp"
#include "asio/deadline_timer.hpp"
#include "asio/defer.hpp"
#include "asio/deferred.hpp"
<<<<<<< HEAD
=======
#include "asio/default_completion_token.hpp"
>>>>>>> 142038d (add asio new version)
#include "asio/detached.hpp"
#include "asio/dispatch.hpp"
#include "asio/error.hpp"
Expand Down
70 changes: 0 additions & 70 deletions third_party/asio/asio/any_io_executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// any_io_executor.hpp
// ~~~~~~~~~~~~~~~~~~~
//
<<<<<<< HEAD
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
=======
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
>>>>>>> 142038d (add asio new version)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -91,20 +87,6 @@ class any_io_executor :
#endif // !defined(GENERATING_DOCUMENTATION)

/// Default constructor.
<<<<<<< HEAD
ASIO_DECL any_io_executor() ASIO_NOEXCEPT;

/// Construct in an empty state. Equivalent effects to default constructor.
ASIO_DECL any_io_executor(nullptr_t) ASIO_NOEXCEPT;

/// Copy constructor.
ASIO_DECL any_io_executor(const any_io_executor& e) ASIO_NOEXCEPT;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
ASIO_DECL any_io_executor(any_io_executor&& e) ASIO_NOEXCEPT;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
=======
ASIO_DECL any_io_executor() noexcept;

/// Construct in an empty state. Equivalent effects to default constructor.
Expand All @@ -115,7 +97,6 @@ class any_io_executor :

/// Move constructor.
ASIO_DECL any_io_executor(any_io_executor&& e) noexcept;
>>>>>>> 142038d (add asio new version)

/// Construct to point to the same target as another any_executor.
#if defined(GENERATING_DOCUMENTATION)
Expand All @@ -124,35 +105,22 @@ class any_io_executor :
#else // defined(GENERATING_DOCUMENTATION)
template <typename OtherAnyExecutor>
any_io_executor(OtherAnyExecutor e,
<<<<<<< HEAD
typename constraint<
conditional<
=======
constraint_t<
conditional_t<
>>>>>>> 142038d (add asio new version)
!is_same<OtherAnyExecutor, any_io_executor>::value
&& is_base_of<execution::detail::any_executor_base,
OtherAnyExecutor>::value,
typename execution::detail::supportable_properties<
0, supportable_properties_type>::template
is_valid_target<OtherAnyExecutor>,
false_type
<<<<<<< HEAD
>::type::value
>::type = 0)
: base_type(ASIO_MOVE_CAST(OtherAnyExecutor)(e))
=======
>::value
> = 0)
: base_type(static_cast<OtherAnyExecutor&&>(e))
>>>>>>> 142038d (add asio new version)
{
}
#endif // defined(GENERATING_DOCUMENTATION)

<<<<<<< HEAD
=======
/// Construct to point to the same target as another any_executor.
#if defined(GENERATING_DOCUMENTATION)
template <class... OtherSupportableProperties>
Expand Down Expand Up @@ -184,32 +152,21 @@ class any_io_executor :
/// Construct to point to the same target as another any_executor.
ASIO_DECL any_io_executor(std::nothrow_t, any_io_executor&& e) noexcept;

>>>>>>> 142038d (add asio new version)
/// Construct a polymorphic wrapper for the specified executor.
#if defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
any_io_executor(Executor e);
#else // defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
any_io_executor(Executor e,
<<<<<<< HEAD
typename constraint<
conditional<
=======
constraint_t<
conditional_t<
>>>>>>> 142038d (add asio new version)
!is_same<Executor, any_io_executor>::value
&& !is_base_of<execution::detail::any_executor_base,
Executor>::value,
execution::detail::is_valid_target_executor<
Executor, supportable_properties_type>,
false_type
<<<<<<< HEAD
>::type::value
>::type = 0)
: base_type(ASIO_MOVE_CAST(Executor)(e))
=======
>::value
> = 0)
: base_type(static_cast<Executor&&>(e))
Expand All @@ -235,27 +192,16 @@ class any_io_executor :
>::value
> = 0) noexcept
: base_type(std::nothrow, static_cast<Executor&&>(e))
>>>>>>> 142038d (add asio new version)
{
}
#endif // defined(GENERATING_DOCUMENTATION)

/// Assignment operator.
ASIO_DECL any_io_executor& operator=(
<<<<<<< HEAD
const any_io_executor& e) ASIO_NOEXCEPT;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move assignment operator.
ASIO_DECL any_io_executor& operator=(
any_io_executor&& e) ASIO_NOEXCEPT;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
=======
const any_io_executor& e) noexcept;

/// Move assignment operator.
ASIO_DECL any_io_executor& operator=(any_io_executor&& e) noexcept;
>>>>>>> 142038d (add asio new version)

/// Assignment operator that sets the polymorphic wrapper to the empty state.
ASIO_DECL any_io_executor& operator=(nullptr_t);
Expand All @@ -264,11 +210,7 @@ class any_io_executor :
ASIO_DECL ~any_io_executor();

/// Swap targets with another polymorphic wrapper.
<<<<<<< HEAD
ASIO_DECL void swap(any_io_executor& other) ASIO_NOEXCEPT;
=======
ASIO_DECL void swap(any_io_executor& other) noexcept;
>>>>>>> 142038d (add asio new version)

/// Obtain a polymorphic wrapper with the specified property.
/**
Expand All @@ -281,15 +223,9 @@ class any_io_executor :
*/
template <typename Property>
any_io_executor require(const Property& p,
<<<<<<< HEAD
typename constraint<
traits::require_member<const base_type&, const Property&>::is_valid
>::type = 0) const
=======
constraint_t<
traits::require_member<const base_type&, const Property&>::is_valid
> = 0) const
>>>>>>> 142038d (add asio new version)
{
return static_cast<const base_type&>(*this).require(p);
}
Expand All @@ -305,15 +241,9 @@ class any_io_executor :
*/
template <typename Property>
any_io_executor prefer(const Property& p,
<<<<<<< HEAD
typename constraint<
traits::prefer_member<const base_type&, const Property&>::is_valid
>::type = 0) const
=======
constraint_t<
traits::prefer_member<const base_type&, const Property&>::is_valid
> = 0) const
>>>>>>> 142038d (add asio new version)
{
return static_cast<const base_type&>(*this).prefer(p);
}
Expand Down
39 changes: 0 additions & 39 deletions third_party/asio/asio/append.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// append.hpp
// ~~~~~~~~~~
//
<<<<<<< HEAD
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
=======
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
>>>>>>> 142038d (add asio new version)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -20,14 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include "asio/detail/config.hpp"
<<<<<<< HEAD

#if (defined(ASIO_HAS_STD_TUPLE) \
&& defined(ASIO_HAS_VARIADIC_TEMPLATES)) \
|| defined(GENERATING_DOCUMENTATION)

=======
>>>>>>> 142038d (add asio new version)
#include <tuple>
#include "asio/detail/type_traits.hpp"

Expand All @@ -44,17 +32,9 @@ class append_t
public:
/// Constructor.
template <typename T, typename... V>
<<<<<<< HEAD
ASIO_CONSTEXPR explicit append_t(
ASIO_MOVE_ARG(T) completion_token,
ASIO_MOVE_ARG(V)... values)
: token_(ASIO_MOVE_CAST(T)(completion_token)),
values_(ASIO_MOVE_CAST(V)(values)...)
=======
constexpr explicit append_t(T&& completion_token, V&&... values)
: token_(static_cast<T&&>(completion_token)),
values_(static_cast<V&&>(values)...)
>>>>>>> 142038d (add asio new version)
{
}

Expand All @@ -67,25 +47,13 @@ class append_t
/// arguments should be passed additional values after the results of the
/// operation.
template <typename CompletionToken, typename... Values>
<<<<<<< HEAD
ASIO_NODISCARD inline ASIO_CONSTEXPR append_t<
typename decay<CompletionToken>::type, typename decay<Values>::type...>
append(ASIO_MOVE_ARG(CompletionToken) completion_token,
ASIO_MOVE_ARG(Values)... values)
{
return append_t<
typename decay<CompletionToken>::type, typename decay<Values>::type...>(
ASIO_MOVE_CAST(CompletionToken)(completion_token),
ASIO_MOVE_CAST(Values)(values)...);
=======
ASIO_NODISCARD inline constexpr
append_t<decay_t<CompletionToken>, decay_t<Values>...>
append(CompletionToken&& completion_token, Values&&... values)
{
return append_t<decay_t<CompletionToken>, decay_t<Values>...>(
static_cast<CompletionToken&&>(completion_token),
static_cast<Values&&>(values)...);
>>>>>>> 142038d (add asio new version)
}

} // namespace asio
Expand All @@ -94,11 +62,4 @@ append(CompletionToken&& completion_token, Values&&... values)

#include "asio/impl/append.hpp"

<<<<<<< HEAD
#endif // (defined(ASIO_HAS_STD_TUPLE)
// && defined(ASIO_HAS_VARIADIC_TEMPLATES))
// || defined(GENERATING_DOCUMENTATION)

=======
>>>>>>> 142038d (add asio new version)
#endif // ASIO_APPEND_HPP
Loading

0 comments on commit 01ae20e

Please sign in to comment.