Namespaces
Variants
Views
Actions

std::unexpected

From cppreference.com
< cpp | error
Revision as of 01:39, 29 April 2012 by P12bot (Talk | contribs)

Template:cpp/error/sidebar

Defined in header <exception>
[[noreturn]] void unexpected();
(deprecated)

std::unexpected() is called by the C++ runtime when a dynamic exception specification is violated: an exception is thrown from a function whose exception specification forbids exceptions of this type.

std::unexpected() may also be called directly from the program.

In either case, std::unexpected calls the currently installed std::unexpected_handler. The default std::unexpected_handler calls std::terminate.

Contents

Parameters

(none)

Return value

(none)

Exceptions

noexcept specification:  
noexcept
  (since C++11)

See also

Template:cpp/error/dcl list unexpected handler