std::make_exception_ptr
Defined in header <exception> | ? | ? |
---|---|---|
template< class E > std::exception_ptr make_exception_ptr( E e ); | ? | (since C++11) |
创建std::exception_ptr
的副本的引用。e
这就像执行以下代码一样:
二次
try {
throw e;
} catch(...) {
return std::current_exception();
}
二次
参数
%280%29
返回值
的实例std::exception_ptr
保存对e
的实例std::bad_alloc
的实例std::bad_exception
28%见std::current_exception
29%。
例外
noexcept
规格:
noexcept
注记
该参数是通过值传递的,并受切片的限制。
另见
current_exception (C++11) | captures the current exception in a std::exception_ptr (function) |
---|
? cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com