mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Squashed 'src/beast/' changes from c00cd37..06f74f0
06f74f0 Set version to 1.0.0-b26 68f535f Tidy up warnings and tests: 4ee5fa9 Set version to 1.0.0-b25 229d390 Update README.md for CppCast 2017 c3e3a55 Fix deflate setup bug 439a224 WebSocket server examples and test tidying: 29565c8 Remove unnecessary include caa3b39 Fix 32-bit arm7 warnings 0474cc5 Better handler_ptr (API Change): ca38657 Fixes for websocket echo server: 797631c Set version to 1.0.0-b24 a450968 Add permessage-deflate WebSocket extension: 67e965e Make decorator copyable 42899fc Add optional yield_to arguments 61aef03 Simplify Travis package install specification 9d0d7c9 bjam use clang on MACOSX git-subtree-dir: src/beast git-subtree-split: 06f74f05f7de51d7f791a17c2b06840183332cbe
This commit is contained in:
@@ -39,15 +39,6 @@ P(DeducedHandler&& h, Args&&... args)
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Handler>
|
||||
template<class DeducedHandler, class... Args>
|
||||
handler_ptr<T, Handler>::
|
||||
handler_ptr(int, DeducedHandler&& handler, Args&&... args)
|
||||
: p_(new P(std::forward<DeducedHandler>(handler),
|
||||
std::forward<Args>(args)...))
|
||||
{
|
||||
}
|
||||
|
||||
template<class T, class Handler>
|
||||
handler_ptr<T, Handler>::
|
||||
~handler_ptr()
|
||||
@@ -82,6 +73,27 @@ handler_ptr(handler_ptr const& other)
|
||||
++p_->n;
|
||||
}
|
||||
|
||||
template<class T, class Handler>
|
||||
template<class... Args>
|
||||
handler_ptr<T, Handler>::
|
||||
handler_ptr(Handler&& handler, Args&&... args)
|
||||
: p_(new P{std::move(handler),
|
||||
std::forward<Args>(args)...})
|
||||
{
|
||||
static_assert(! std::is_array<T>::value,
|
||||
"T must not be an array type");
|
||||
}
|
||||
|
||||
template<class T, class Handler>
|
||||
template<class... Args>
|
||||
handler_ptr<T, Handler>::
|
||||
handler_ptr(Handler const& handler, Args&&... args)
|
||||
: p_(new P{handler, std::forward<Args>(args)...})
|
||||
{
|
||||
static_assert(! std::is_array<T>::value,
|
||||
"T must not be an array type");
|
||||
}
|
||||
|
||||
template<class T, class Handler>
|
||||
auto
|
||||
handler_ptr<T, Handler>::
|
||||
@@ -112,27 +124,6 @@ invoke(Args&&... args)
|
||||
p_->handler(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<
|
||||
class T, class CompletionHandler, class... Args>
|
||||
handler_ptr<T, CompletionHandler>
|
||||
make_handler_ptr(
|
||||
CompletionHandler&& handler, Args&&... args)
|
||||
{
|
||||
return handler_ptr<T, CompletionHandler>{0,
|
||||
std::move(handler),
|
||||
std::forward<Args>(args)...};
|
||||
}
|
||||
|
||||
template<
|
||||
class T, class CompletionHandler, class... Args>
|
||||
handler_ptr<T, CompletionHandler>
|
||||
make_handler_ptr(
|
||||
CompletionHandler const& handler, Args&&... args)
|
||||
{
|
||||
return handler_ptr<T, CompletionHandler>{0,
|
||||
handler, std::forward<Args>(args)...};
|
||||
}
|
||||
|
||||
} // beast
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user