/
usr
/
include
/
boost
/
beast
/
core
/
/usr/include/boost/beast/core
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
impl/
-
0755
rm
async_base.hpp
26461
0644
edit
dl
rm
basic_stream.hpp
55342
0644
edit
dl
rm
bind_handler.hpp
4172
0644
edit
dl
rm
buffered_read_stream.hpp
11877
0644
edit
dl
rm
buffers_adaptor.hpp
6783
0644
edit
dl
rm
buffers_cat.hpp
3383
0644
edit
dl
rm
buffers_prefix.hpp
6152
0644
edit
dl
rm
buffers_range.hpp
4211
0644
edit
dl
rm
buffers_suffix.hpp
3971
0644
edit
dl
rm
buffers_to_string.hpp
1770
0644
edit
dl
rm
buffer_traits.hpp
5757
0644
edit
dl
rm
detect_ssl.hpp
22345
0644
edit
dl
rm
error.hpp
2257
0644
edit
dl
rm
file.hpp
1028
0644
edit
dl
rm
file_base.hpp
5015
0644
edit
dl
rm
file_posix.hpp
4222
0644
edit
dl
rm
file_stdio.hpp
3849
0644
edit
dl
rm
file_win32.hpp
4248
0644
edit
dl
rm
flat_buffer.hpp
15427
0644
edit
dl
rm
flat_static_buffer.hpp
8706
0644
edit
dl
rm
flat_stream.hpp
12603
0644
edit
dl
rm
make_printable.hpp
2803
0644
edit
dl
rm
multi_buffer.hpp
18153
0644
edit
dl
rm
ostream.hpp
2690
0644
edit
dl
rm
rate_policy.hpp
4592
0644
edit
dl
rm
read_size.hpp
1844
0644
edit
dl
rm
role.hpp
1322
0644
edit
dl
rm
saved_handler.hpp
3788
0644
edit
dl
rm
span.hpp
4787
0644
edit
dl
rm
static_buffer.hpp
8515
0644
edit
dl
rm
static_string.hpp
25720
0644
edit
dl
rm
stream_traits.hpp
16399
0644
edit
dl
rm
string.hpp
1941
0644
edit
dl
rm
string_param.hpp
3459
0644
edit
dl
rm
string_type.hpp
1092
0644
edit
dl
rm
tcp_stream.hpp
853
0644
edit
dl
rm
Edit:
/usr/include/boost/beast/core/saved_handler.hpp
(3788B)
// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/boostorg/beast // #ifndef BOOST_BEAST_CORE_SAVED_HANDLER_HPP #define BOOST_BEAST_CORE_SAVED_HANDLER_HPP #include <boost/beast/core/detail/config.hpp> namespace boost { namespace beast { /** An invocable, nullary function object which holds a completion handler. This container can hold a type-erased instance of any completion handler, or it can be empty. When the container holds a value, the implementation maintains an instance of `net::executor_work_guard` for the handler's associated executor. Memory is dynamically allocated to store the completion handler, and the allocator may optionally be specified. Otherwise, the implementation uses the handler's associated allocator. */ class saved_handler { class base; template<class, class> class impl; base* p_ = nullptr; public: /// Default Constructor saved_handler() = default; /// Copy Constructor (deleted) saved_handler(saved_handler const&) = delete; /// Copy Assignment (deleted) saved_handler& operator=(saved_handler const&) = delete; /// Destructor BOOST_BEAST_DECL ~saved_handler(); /// Move Constructor BOOST_BEAST_DECL saved_handler(saved_handler&& other) noexcept; /// Move Assignment BOOST_BEAST_DECL saved_handler& operator=(saved_handler&& other) noexcept; /// Returns `true` if `*this` contains a completion handler. bool has_value() const noexcept { return p_ != nullptr; } /** Store a completion handler in the container. Requires `this->has_value() == false`. @param handler The completion handler to store. The implementation takes ownership of the handler by performing a decay-copy. @param alloc The allocator to use. */ template<class Handler, class Allocator> void emplace(Handler&& handler, Allocator const& alloc); /** Store a completion handler in the container. Requires `this->has_value() == false`. The implementation will use the handler's associated allocator to obtian storage. @param handler The completion handler to store. The implementation takes ownership of the handler by performing a decay-copy. */ template<class Handler> void emplace(Handler&& handler); /** Discard the saved handler, if one exists. If `*this` contains an object, it is destroyed. @returns `true` if an object was destroyed. */ BOOST_BEAST_DECL bool reset() noexcept; /** Unconditionally invoke the stored completion handler. Requires `this->has_value() == true`. Any dynamic memory used is deallocated before the stored completion handler is invoked. The executor work guard is also reset before the invocation. */ BOOST_BEAST_DECL void invoke(); /** Conditionally invoke the stored completion handler. Invokes the stored completion handler if `this->has_value() == true`, otherwise does nothing. Any dynamic memory used is deallocated before the stored completion handler is invoked. The executor work guard is also reset before the invocation. @return `true` if the invocation took place. */ BOOST_BEAST_DECL bool maybe_invoke(); }; } // beast } // boost #include <boost/beast/core/impl/saved_handler.hpp> #ifdef BOOST_BEAST_HEADER_ONLY #include <boost/beast/core/impl/saved_handler.ipp> #endif #endif
Save
cmd:
run