I have an object of type std::exception_ptr
, and I want to call what()
on it, but it seems there is no way to do this (As explaned in this answer: How do I make a call to what() on std::exception_ptr).
After searching over internet, it seems that I can not do anything with it other than re-throwing it and catching it in a std::exception&
to be able to do this.
It is a bit strange for me, but I want to check: What can do with a std::exception_ptr
other then re-throwing it to get the detail of expectation?
Is there any change in C++14 or other versions of C++