On Thu, May 22, 2014 at 8:24 AM, Arindam Mukherjee
I was wondering what behaviour or idiom does boost::throw_exception enable. I must be dense but the documentation here (http://www.boost.org/doc/libs/1_55_0/libs/exception/doc/throw_exception.html) does not immediately ring a bell. Is it meant to somehow help write code that runs both in environments where exceptions are enabled and where they are not?
1) It enables library developers to write code that can run in both environments. 2) It enables users of libraries that throw by boost::throw_exception to write programs targeting exception-free environments. 3) It enables the rest of the Boost Exception functionality: exception_ptr and transporting arbitrary data in exception objects. Note that in 2) the program itself is specifically designed to target exception-free environments, the developer being aware of the exact conditions under which libraries call boost::throw_exception. -- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode