Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit702dd54

Browse files
gjasnydeanberris
authored andcommitted
Make compatible with boost::chrono
In Visual Studio 2013 the std::chrono implementation is quitebuggy. Therefore we fall back to boost::chrono byspecifying -DBOOST_ASIO_DISABLE_STD_CHRONO. This changemakes cppnetlib compatible with that flag.
1 parenta5252b9 commit702dd54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,13 @@ struct http_async_connection
179179

180180
auto self =this->shared_from_this();
181181
if (timeout_ >0) {
182+
#if defined(BOOST_ASIO_HAS_STD_CHRONO)
182183
timer_.expires_from_now(std::chrono::seconds(timeout_));
184+
#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
185+
timer_.expires_from_now(boost::chrono::seconds(timeout_));
186+
#else
187+
#error Need a chrono implementation
188+
#endif
183189
timer_.async_wait(request_strand_.wrap([=] (boost::system::error_codeconst &ec) {
184190
self->handle_timeout(ec);
185191
}));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp