//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_0C5D492E909711DCB658AD4556D89593 #define UUID_0C5D492E909711DCB658AD4556D89593 #include namespace boost { namespace exception_detail { template struct error_info_injector: public T, public exception { explicit error_info_injector( T const & x ): T(x) { } }; struct large_size { char c[256]; }; large_size dispatch( exception * ); struct small_size { }; small_size dispatch( void * ); template struct enable_error_info_helper; template struct enable_error_info_helper { typedef T type; }; template struct enable_error_info_helper { typedef error_info_injector type; }; template struct enable_error_info_return_type { typedef typename enable_error_info_helper::type type; }; } template typename exception_detail::enable_error_info_return_type::type enable_error_info( T const & x ) { return typename exception_detail::enable_error_info_return_type::type(x); } } #endif