Realistic 3D camera system
3D camera system components
|
Class used to specify that an asynchronous operation should return a future. More...
#include <use_future.hpp>
Public Types | |
typedef Allocator | allocator_type |
Public Member Functions | |
ASIO_CONSTEXPR | use_future_t () |
Construct using default-constructed allocator. More... | |
use_future_t (const Allocator &allocator) | |
Construct using specified allocator. More... | |
template<typename OtherAllocator > | |
use_future_t< OtherAllocator > | operator[] (const OtherAllocator &allocator) const |
Specify an alternate allocator. More... | |
allocator_type | get_allocator () const |
Obtain allocator. More... | |
Class used to specify that an asynchronous operation should return a future.
The use_future_t class is used to indicate that an asynchronous operation should return a std::future object. A use_future_t object may be passed as a handler to an asynchronous operation, typically using the special value asio::use_future
. For example:
The initiating function (async_read_some in the above example) returns a future that will receive the result of the operation. If the operation completes with an error_code indicating failure, it is converted into a system_error and passed back to the caller via the future.
Definition at line 41 of file use_future.hpp.
typedef Allocator asio::use_future_t< Allocator >::allocator_type |
The allocator type. The allocator is used when constructing the std::promise
object for a given asynchronous operation.
Definition at line 46 of file use_future.hpp.
|
inline |
Construct using default-constructed allocator.
Definition at line 49 of file use_future.hpp.
|
inlineexplicit |
Construct using specified allocator.
Definition at line 54 of file use_future.hpp.
|
inline |
Obtain allocator.
Definition at line 67 of file use_future.hpp.
|
inline |
Specify an alternate allocator.
Definition at line 61 of file use_future.hpp.