Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
boost::fibers::asio::yield_t Class Reference

#include <yield.hpp>

Public Member Functions

 yield_t ()=default
 
yield_t operator[] (boost::system::error_code &ec) const
 

Public Attributes

boost::system::error_code * ec_ { nullptr }
 

Detailed Description

Definition at line 22 of file yield.hpp.

Constructor & Destructor Documentation

◆ yield_t()

boost::fibers::asio::yield_t::yield_t ( )
default

Member Function Documentation

◆ operator[]()

yield_t boost::fibers::asio::yield_t::operator[] ( boost::system::error_code & ec) const
inline
static yield_t yield;
boost::system::error_code myec;
func(yield[myec]);
thread_local yield_t yield
Definition yield.hpp:52

yield[myec] returns an instance of yield_t whose ec_ points to myec. The expression yield[myec] "binds" myec to that (anonymous) yield_t instance, instructing func() to store any error_code it might produce into myec rather than throwing boost::system::system_error.

Definition at line 38 of file yield.hpp.

38 {
39 yield_t tmp;
40 tmp.ec_ = & ec;
41 return tmp;
42 }

Member Data Documentation

◆ ec_

boost::system::error_code* boost::fibers::asio::yield_t::ec_ { nullptr }

Definition at line 46 of file yield.hpp.

46{ nullptr };

The documentation for this class was generated from the following file: