STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
error_code Class Reference

Public Types

typedef error_code _Myt
 

Public Member Functions

 error_code () _NOEXCEPT
 
 error_code (int _Val, const error_category &_Cat) _NOEXCEPT
 
template<class _Enum , class = typename enable_if<is_error_code_enum<_Enum>::value, void>::type>
 error_code (_Enum _Errcode) _NOEXCEPT
 
void assign (int _Val, const error_category &_Cat) _NOEXCEPT
 
template<class _Enum >
enable_if< is_error_code_enum< _Enum >::value, error_code >::type & operator= (_Enum _Errcode) _NOEXCEPT
 
void clear () _NOEXCEPT
 
int value () const _NOEXCEPT
 
const error_categorycategory () const _NOEXCEPT
 
error_condition default_error_condition () const _NOEXCEPT
 
string message () const
 
 operator bool () const _NOEXCEPT
 

Private Attributes

int _Myval
 
const error_category_Mycat
 

Member Typedef Documentation

Constructor & Destructor Documentation

error_code::error_code ( )
inline
227  : _Myval(0),
229  { // construct non-error
230  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:712
int _Myval
Definition: system_error:289
const error_category * _Mycat
Definition: system_error:290
error_code::error_code ( int  _Val,
const error_category _Cat 
)
inline
233  : _Myval(_Val), _Mycat(&_Cat)
234  { // construct from error code and category
235  }
_In_ int _Val
Definition: vcruntime_string.h:62
int _Myval
Definition: system_error:289
const error_category * _Mycat
Definition: system_error:290
template<class _Enum , class = typename enable_if<is_error_code_enum<_Enum>::value, void>::type>
error_code::error_code ( _Enum  _Errcode)
inline
241  : _Myval(0), _Mycat(0)
242  { // construct from enumerated error code
243  *this = make_error_code(_Errcode); // using ADL
244  }
int _Myval
Definition: system_error:289
const error_category * _Mycat
Definition: system_error:290
error_code make_error_code(_Errc) _NOEXCEPT
Definition: system_error:473

Member Function Documentation

void error_code::assign ( int  _Val,
const error_category _Cat 
)
inline
247  { // assign error code and category
248  _Myval = _Val;
249  _Mycat = &_Cat;
250  }
_In_ int _Val
Definition: vcruntime_string.h:62
int _Myval
Definition: system_error:289
const error_category * _Mycat
Definition: system_error:290
const error_category& error_code::category ( ) const
inline
272  { // get category
273  return (*_Mycat);
274  }
const error_category * _Mycat
Definition: system_error:290
void error_code::clear ( )
inline
261  { // assign non-error
262  _Myval = 0;
263  _Mycat = &system_category();
264  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:712
int _Myval
Definition: system_error:289
const error_category * _Mycat
Definition: system_error:290
error_condition error_code::default_error_condition ( ) const
inline
468  { // make error_condition for error code
469  return (category().default_error_condition(value()));
470  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:271
error_condition default_error_condition() const _NOEXCEPT
Definition: system_error:467
string error_code::message ( ) const
inline
279  { // get name of error code
280  return (category().message(value()));
281  }
int value() const _NOEXCEPT
Definition: system_error:266
const error_category & category() const _NOEXCEPT
Definition: system_error:271
string message() const
Definition: system_error:278
error_code::operator bool ( ) const
inlineexplicit
284  { // test for actual error
285  return (value() != 0);
286  }
int value() const _NOEXCEPT
Definition: system_error:266
template<class _Enum >
enable_if<is_error_code_enum<_Enum>::value, error_code>::type& error_code::operator= ( _Enum  _Errcode)
inline
255  { // assign enumerated error code
256  *this = make_error_code(_Errcode); // using ADL
257  return (*this);
258  }
error_code make_error_code(_Errc) _NOEXCEPT
Definition: system_error:473
int error_code::value ( ) const
inline
267  { // get error code
268  return (_Myval);
269  }
int _Myval
Definition: system_error:289

Member Data Documentation

const error_category* error_code::_Mycat
private
int error_code::_Myval
private

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