forked from boostorg/config
Added support for BOOST_NO_EXCEPTIONS
[SVN r12756]
This commit is contained in:
1 parent
4091f8c54f
commit
bdf2ddfb26
8 files changed
+147
-22
No files matched your search
@@ -0,0 +1,40 @@
|
||||
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// MACRO: BOOST_NO_EXCEPTIONS
|
||||
// TITLE: exception handling support
|
||||
// DESCRIPTION: The compiler in its current translation mode supports
|
||||
// exception handling.
|
||||
|
||||
|
||||
namespace boost_no_exceptions{
|
||||
|
||||
void throw_it(int i)
|
||||
{
|
||||
throw i;
|
||||
}
|
||||
|
||||
int test()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw_it(2);
|
||||
}
|
||||
catch(int i)
|
||||
{
|
||||
return (i == 2) ? 0 : -1;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -857,6 +857,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_CWCTYPE);
|
||||
PRINT_MACRO(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS);
|
||||
PRINT_MACRO(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS);
|
||||
PRINT_MACRO(BOOST_NO_EXCEPTIONS);
|
||||
PRINT_MACRO(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS);
|
||||
PRINT_MACRO(BOOST_NO_FUNCTION_TEMPLATE_ORDERING);
|
||||
PRINT_MACRO(BOOST_NO_HASH);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_*.cxx on
|
||||
// Sun Feb 3 10:12:32 EST 2002
|
||||
// Fri Feb 8 11:29:25 2002
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#define BOOST_INCLUDE_MAIN
|
||||
@@ -62,6 +62,11 @@ namespace boost_no_dependent_nested_derivations = empty_boost;
|
||||
#else
|
||||
namespace boost_no_dependent_types_in_template_value_parameters = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
#include "boost_no_exceptions.cxx"
|
||||
#else
|
||||
namespace boost_no_exceptions = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#include "boost_no_exp_func_tem_arg.cxx"
|
||||
#else
|
||||
@@ -360,6 +365,7 @@ int test_main( int, char *[] )
|
||||
BOOST_TEST(0 == boost_no_inclass_member_initialization::test());
|
||||
BOOST_TEST(0 == boost_no_function_template_ordering::test());
|
||||
BOOST_TEST(0 == boost_no_explicit_function_template_arguments::test());
|
||||
BOOST_TEST(0 == boost_no_exceptions::test());
|
||||
BOOST_TEST(0 == boost_no_dependent_types_in_template_value_parameters::test());
|
||||
BOOST_TEST(0 == boost_no_dependent_nested_derivations::test());
|
||||
BOOST_TEST(0 == boost_no_cwctype::test());
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// Test file for macro BOOST_NO_EXCEPTIONS
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_EXCEPTIONS need not be defined.
|
||||
// see boost_no_exceptions.cxx for more details
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_no_exceptions.cxx on
|
||||
// Fri Feb 8 11:29:25 2002
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/test/cpp_main.cpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
#include "boost_no_exceptions.cxx"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int cpp_main( int, char *[] )
|
||||
{
|
||||
return boost_no_exceptions::test();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// Test file for macro BOOST_NO_EXCEPTIONS
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_EXCEPTIONS needs to be defined.
|
||||
// see boost_no_exceptions.cxx for more details
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_no_exceptions.cxx on
|
||||
// Fri Feb 8 11:29:25 2002
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/test/cpp_main.cpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
#include "boost_no_exceptions.cxx"
|
||||
#else
|
||||
namespace boost_no_exceptions = empty_boost;
|
||||
#endif
|
||||
|
||||
int cpp_main( int, char *[] )
|
||||
{
|
||||
return boost_no_exceptions::test();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ run libs/config/test/no_dep_nested_class_pass.cpp
|
||||
link-fail libs/config/test/no_dep_nested_class_fail.cpp
|
||||
run libs/config/test/no_dep_val_param_pass.cpp
|
||||
link-fail libs/config/test/no_dep_val_param_fail.cpp
|
||||
run libs/config/test/no_exceptions_pass.cpp
|
||||
link-fail libs/config/test/no_exceptions_fail.cpp
|
||||
run libs/config/test/no_exp_func_tem_arg_pass.cpp
|
||||
link-fail libs/config/test/no_exp_func_tem_arg_fail.cpp
|
||||
run libs/config/test/no_func_tmp_order_pass.cpp
|
||||
|
||||
Reference in new issue
Block a user