Skip to content

Commit a368d42

Browse files
committed
Workaround for VS2015
1 parent 62cc5ce commit a368d42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testing/internal/tcpserver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ auto with_read_callback(const char *name, std::function<void(const std::string &
6969
return [name, fun = std::move(fun)](sock_p sock) {
7070
auto buf = std::make_shared<std::string>();
7171
asio::async_read(*sock, asio::dynamic_buffer(*buf),
72-
[sock, buf, name, fun = std::move(fun)](err_t read_err, std::size_t len) {
72+
[sock, buf, name, fun
73+
#if !defined(_MSC_VER) || _MSC_VER > 1930
74+
= std::move(fun)
75+
#endif
76+
](err_t read_err, std::size_t len) {
7377
INFO("Test " << name << "\t– read " << len
7478
<< " bytes, outcome: " << read_err.message())
7579
if (read_err) REQUIRE(read_err == asio::error::eof);

0 commit comments

Comments
 (0)