annotate DEPENDENCIES/generic/include/boost/throw_exception.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 #ifndef UUID_AA15E74A856F11E08B8D93F24824019B
Chris@16 2 #define UUID_AA15E74A856F11E08B8D93F24824019B
Chris@16 3 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
Chris@16 4 #pragma GCC system_header
Chris@16 5 #endif
Chris@16 6 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
Chris@16 7 #pragma warning(push,1)
Chris@16 8 #endif
Chris@16 9
Chris@16 10 // MS compatible compilers support #pragma once
Chris@16 11
Chris@16 12 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
Chris@16 13 # pragma once
Chris@16 14 #endif
Chris@16 15
Chris@16 16 //
Chris@16 17 // boost/throw_exception.hpp
Chris@16 18 //
Chris@16 19 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
Chris@16 20 // Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.
Chris@16 21 //
Chris@16 22 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 23 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 24 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 25 //
Chris@16 26 // http://www.boost.org/libs/utility/throw_exception.html
Chris@16 27 //
Chris@16 28
Chris@16 29 #include <boost/detail/workaround.hpp>
Chris@16 30 #include <boost/config.hpp>
Chris@16 31 #include <exception>
Chris@16 32
Chris@16 33 #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
Chris@16 34 # define BOOST_EXCEPTION_DISABLE
Chris@16 35 #endif
Chris@16 36
Chris@16 37 #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 )
Chris@16 38 # define BOOST_EXCEPTION_DISABLE
Chris@16 39 #endif
Chris@16 40
Chris@16 41 #if !defined( BOOST_EXCEPTION_DISABLE )
Chris@16 42 # include <boost/exception/exception.hpp>
Chris@16 43 #if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
Chris@16 44 # include <boost/current_function.hpp>
Chris@16 45 # define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
Chris@16 46 #endif
Chris@16 47 # define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__)
Chris@16 48 #else
Chris@16 49 # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
Chris@16 50 #endif
Chris@16 51
Chris@16 52 namespace boost
Chris@16 53 {
Chris@16 54 #ifdef BOOST_NO_EXCEPTIONS
Chris@16 55
Chris@16 56 void throw_exception( std::exception const & e ); // user defined
Chris@16 57
Chris@16 58 #else
Chris@16 59
Chris@16 60 inline void throw_exception_assert_compatibility( std::exception const & ) { }
Chris@16 61
Chris@101 62 template<class E> BOOST_NORETURN inline void throw_exception( E const & e )
Chris@16 63 {
Chris@16 64 //All boost exceptions are required to derive from std::exception,
Chris@16 65 //to ensure compatibility with BOOST_NO_EXCEPTIONS.
Chris@16 66 throw_exception_assert_compatibility(e);
Chris@16 67
Chris@16 68 #ifndef BOOST_EXCEPTION_DISABLE
Chris@16 69 throw enable_current_exception(enable_error_info(e));
Chris@16 70 #else
Chris@16 71 throw e;
Chris@16 72 #endif
Chris@16 73 }
Chris@16 74
Chris@16 75 #endif
Chris@16 76
Chris@16 77 #if !defined( BOOST_EXCEPTION_DISABLE )
Chris@16 78 namespace
Chris@16 79 exception_detail
Chris@16 80 {
Chris@16 81 template <class E>
Chris@101 82 BOOST_NORETURN
Chris@16 83 void
Chris@16 84 throw_exception_( E const & x, char const * current_function, char const * file, int line )
Chris@16 85 {
Chris@16 86 boost::throw_exception(
Chris@16 87 set_info(
Chris@16 88 set_info(
Chris@16 89 set_info(
Chris@16 90 enable_error_info(x),
Chris@16 91 throw_function(current_function)),
Chris@16 92 throw_file(file)),
Chris@16 93 throw_line(line)));
Chris@16 94 }
Chris@16 95 }
Chris@16 96 #endif
Chris@16 97 } // namespace boost
Chris@16 98
Chris@16 99 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
Chris@16 100 #pragma warning(pop)
Chris@16 101 #endif
Chris@16 102 #endif