1// (C) Copyright John Maddock 2001. 2// Use, modification and distribution are subject to the 3// Boost Software License, Version 1.0. (See accompanying file 4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6// See http://www.boost.org/libs/config for most recent version. 7 8// MACRO: BOOST_NO_EXCEPTIONS 9// TITLE: exception handling support 10// DESCRIPTION: The compiler in its current translation mode supports 11// exception handling. 12 13 14namespace boost_no_exceptions{ 15 16void throw_it(int i) 17{ 18 throw i; 19} 20 21int test() 22{ 23 try 24 { 25 throw_it(2); 26 } 27 catch(int i) 28 { 29 return (i == 2) ? 0 : -1; 30 } 31 catch(...) 32 { 33 return -1; 34 } 35 return -1; 36} 37 38} 39 40 41 42 43 44