Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::terminate_handler

      From cppreference.com
      <cpp‎ |error
       
       
      Diagnostics library
       
      Defined in header<exception>
      typedefvoid(*terminate_handler)();

      std::terminate_handler is the function pointer type (pointer to function that takes no arguments and returnsvoid), which is installed and queried by the functionsstd::set_terminate andstd::get_terminate and called bystd::terminate.

      Astd::terminate_handler shall terminate execution of the program without returning to the caller, otherwise the behavior is undefined.

      The C++ implementation provides a defaultstd::terminate_handler function, which callsstd::abort(). If the null pointer value is installed (by means ofstd::set_terminate), the implementation may restore the default handler instead.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      function called when exception handling fails
      (function)[edit]
      changes the function to be called bystd::terminate
      (function)[edit]
      obtains the current terminate_handler
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/error/terminate_handler&oldid=173427"

      [8]ページ先頭

      ©2009-2025 Movatter.jp