Can I use std::current_exception during stack unwinding?
问题 Should it be possible to use std::current_exception inside destructors of objects that are destroyed during stack unwinding? Documentation on cppreference says: If called during exception handling (typically, in a catch clause), captures the current exception object (...) But it's not clear for me whether stack unwinding is a part of exception handling. In some highest-ranked answer on stackoverflow author assumes that it's possible. I did some test on my compiler (g++ (Ubuntu 4.8.2-19ubuntu1