asio 0.1.5 Main Page | Class Index | Member Index | Tutorial

set_error_if_t Class Template Reference

Class template to set a variable to the error if an expression is true. More...

List of all members.

Public Member Functions

 set_error_if_t (Target &target, Expr expr)
 Constructor.

template<typename Error> bool operator() (const Error &err)
 Evaluate the expression.


Private Attributes

Target & target_
 The target variable to set to the error.

Expr expr_
 The expression which, if true, will result in the variable being set.


Detailed Description

template<typename Target, typename Expr>
class asio::set_error_if_t< Target, Expr >

Class template to set a variable to the error if an expression is true.


Constructor & Destructor Documentation

set_error_if_t Target &  target,
Expr  expr
 

Constructor.


Member Function Documentation

bool operator() const Error &  err  ) 
 

Evaluate the expression.


Member Data Documentation

Target& target_ [private]
 

The target variable to set to the error.

Expr expr_ [private]
 

The expression which, if true, will result in the variable being set.