Skip to content

Commit c41351d

Browse files
committed
Fixed build error and updated asio
1 parent 468a76d commit c41351d

33 files changed

+767
-86
lines changed

include/asio.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include "asio/handler_continuation_hook.hpp"
6363
#include "asio/handler_invoke_hook.hpp"
6464
#include "asio/handler_type.hpp"
65+
#include "asio/high_resolution_timer.hpp"
6566
#include "asio/io_context.hpp"
6667
#include "asio/io_context_strand.hpp"
6768
#include "asio/io_service.hpp"
@@ -117,12 +118,14 @@
117118
#include "asio/signal_set_service.hpp"
118119
#include "asio/socket_acceptor_service.hpp"
119120
#include "asio/socket_base.hpp"
121+
#include "asio/steady_timer.hpp"
120122
#include "asio/strand.hpp"
121123
#include "asio/stream_socket_service.hpp"
122124
#include "asio/streambuf.hpp"
123125
#include "asio/system_context.hpp"
124126
#include "asio/system_error.hpp"
125127
#include "asio/system_executor.hpp"
128+
#include "asio/system_timer.hpp"
126129
#include "asio/thread.hpp"
127130
#include "asio/thread_pool.hpp"
128131
#include "asio/time_traits.hpp"

include/asio/buffer.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
#include "asio/detail/throw_exception.hpp"
2929
#include "asio/detail/type_traits.hpp"
3030

31-
#if defined(ASIO_MSVC)
31+
#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1700)
3232
# if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
3333
# if !defined(ASIO_DISABLE_BUFFER_DEBUGGING)
3434
# define ASIO_ENABLE_BUFFER_DEBUGGING
3535
# endif // !defined(ASIO_DISABLE_BUFFER_DEBUGGING)
3636
# endif // defined(_HAS_ITERATOR_DEBUGGING)
37-
#endif // defined(ASIO_MSVC)
37+
#endif // defined(ASIO_MSVC) && (ASIO_MSVC >= 1700)
3838

3939
#if defined(__GNUC__)
4040
# if defined(_GLIBCXX_DEBUG)
@@ -1920,7 +1920,8 @@ inline std::size_t buffer_copy_1(const mutable_buffer& target,
19201920
std::size_t target_size = target.size();
19211921
std::size_t source_size = source.size();
19221922
std::size_t n = target_size < source_size ? target_size : source_size;
1923-
memcpy(target.data(), source.data(), n);
1923+
if (n > 0)
1924+
memcpy(target.data(), source.data(), n);
19241925
return n;
19251926
}
19261927

include/asio/coroutine.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class coroutine_ref
289289
bail_out_of_coroutine: \
290290
break; \
291291
} \
292-
else case 0:
292+
else /* fall-through */ case 0:
293293

294294
#define ASIO_CORO_YIELD_IMPL(n) \
295295
for (_coro_value = (n);;) \
@@ -301,12 +301,12 @@ class coroutine_ref
301301
else \
302302
switch (_coro_value ? 0 : 1) \
303303
for (;;) \
304-
case -1: if (_coro_value) \
304+
/* fall-through */ case -1: if (_coro_value) \
305305
goto terminate_coroutine; \
306306
else for (;;) \
307-
case 1: if (_coro_value) \
307+
/* fall-through */ case 1: if (_coro_value) \
308308
goto bail_out_of_coroutine; \
309-
else case 0:
309+
else /* fall-through */ case 0:
310310

311311
#define ASIO_CORO_FORK_IMPL(n) \
312312
for (_coro_value = -(n);; _coro_value = (n)) \

0 commit comments

Comments
 (0)