Namespaces
Variants

std::nested_exception:: nested_ptr

From cppreference.net
Utilities library
std:: exception_ptr nested_ptr ( ) const noexcept ;
(C++11 起)
(C++26 起为 constexpr)

返回指向存储的异常(如果有)的指针。

返回值

若存储了异常,则返回指向该存储异常的 std::exception_ptr ;否则返回默认初始化的 std::exception_ptr

示例