Namespaces
Variants
Views
Actions

std::make_exception_ptr

From cppreference.com
< cpp‎ | error
Revision as of 14:08, 12 November 2012 by P12 (Talk | contribs)

 
 
 
Error handling
Exception handling
make_exception_ptr
(C++11)
Exception handling failures
(deprecated)
(deprecated)
(C++11)(deprecated)
(deprecated)
Exception categories
Error codes
Error codes
Assertions
system_error facility
(C++11)
(C++11)
 
Defined in header <exception>
template< class E >
std::exception_ptr make_exception_ptr( E e )
(since C++11)

Creates an std::exception_ptr that holds a reference to a copy of e, as if by executing

try {
    throw e;
} catch(...) {
    return std::current_exception();
}

Contents

Parameters

(none)

Return value

An instance of std::exception_ptr holding a reference to the copy of e, or to an instance of std::bad_alloc or to an instance of std::bad_exception (see std::current_exception).

Exceptions

noexcept specification:  
noexcept
  

See also

Template:cpp/error/dcl list current exception