2016-06-15 2 views

답변

20

TL; DR : std::copy_exception 최종 C++ 11 표준에 <exception>std::make_exception_ptr로 개명되었다.


위원회

은 (아마도 boost::copy_exception의 표준에 복사) 이름 copy_exception는 다음과 같은 이유로 오해의 소지가되었다는 것을 결정했다. 인수로 지정된 인수로 exception_ptr 호출하면

template <class E> 
exception_ptr copy_exception(E e) { 
    try { 
     throw e; 
    } catch (...) { 
     return current_exception(); 
    } 
} 

이, 함수가 exception_ptr의 사본에 다른 exception_ptr 포인팅을 반환하는 경우로

copy_exception 함수는 인수의 사본에 exception_ptr를 반환 대신에 exception_ptr 인수가 가리키는 부분을 가리키는 대신. 이 경우 이름이 copy_exception 이었기 때문에이 함수의 이름이 std::make_exception_ptr으로 변경되어 최종 C++ 11 표준이되었습니다. 이 문제에 대한 자세한 내용과 토론은 C++ Standard Library Defect Report 1130을 참조하십시오.

std::make_exception_ptr 함수는 <exception>에 정의됩니다.

관련 문제