Skip to content

Commit 2592957

Browse files
committed
Fixed compl handler signatures
1 parent 1957cc7 commit 2592957

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

include/boost/redis/connection.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef BOOST_REDIS_CONNECTION_HPP
88
#define BOOST_REDIS_CONNECTION_HPP
99

10-
#include "boost/redis/request.hpp"
1110
#include <boost/redis/adapter/any_adapter.hpp>
1211
#include <boost/redis/detail/connection_base.hpp>
1312
#include <boost/redis/logger.hpp>
@@ -19,6 +18,7 @@
1918
#include <boost/asio/any_completion_handler.hpp>
2019

2120
#include <chrono>
21+
#include <cstddef>
2222
#include <limits>
2323

2424
namespace boost::redis {
@@ -414,7 +414,7 @@ class connection {
414414
{
415415
return asio::async_initiate<
416416
CompletionToken, void(boost::system::error_code)>(
417-
[](auto handler, connection* self, request const* req, any_adapter adapter)
417+
[](auto handler, connection* self, request const* req, any_adapter&& adapter)
418418
{
419419
self->async_exec_impl(*req, std::move(adapter), std::move(handler));
420420
}, token, this, &req, std::move(adapter));
@@ -462,8 +462,8 @@ class connection {
462462
void
463463
async_exec_impl(
464464
request const& req,
465-
any_adapter adapter,
466-
asio::any_completion_handler<void(boost::system::error_code)> token);
465+
any_adapter&& adapter,
466+
asio::any_completion_handler<void(boost::system::error_code, std::size_t)> token);
467467

468468
basic_connection<executor_type> impl_;
469469
};

include/boost/redis/impl/connection.ipp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <boost/redis/connection.hpp>
8+
#include <cstddef>
89

910
namespace boost::redis {
1011

@@ -34,8 +35,8 @@ connection::async_run_impl(
3435
void
3536
connection::async_exec_impl(
3637
request const& req,
37-
any_adapter adapter,
38-
asio::any_completion_handler<void(boost::system::error_code)> token)
38+
any_adapter&& adapter,
39+
asio::any_completion_handler<void(boost::system::error_code, std::size_t)> token)
3940
{
4041
impl_.async_exec(req, std::move(adapter), std::move(token));
4142
}

0 commit comments

Comments
 (0)