current_exception_cast.hpp
Go to the documentation of this file.
00001 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
00002 
00003 //Distributed under the Boost Software License, Version 1.0. (See accompanying
00004 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00005 
00006 #ifndef UUID_7E83C166200811DE885E826156D89593
00007 #define UUID_7E83C166200811DE885E826156D89593
00008 
00009 namespace
00010 boost
00011     {
00012     template <class E>
00013     inline
00014     E *
00015     current_exception_cast()
00016         {
00017         try
00018             {
00019             throw;
00020             }
00021         catch(
00022         E & e )
00023             {
00024             return &e;
00025             }
00026         catch(
00027         ...)
00028             {
00029             return 0;
00030             }
00031         }
00032     }
00033 
00034 #endif


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:28