Added support for BOOST_NO_EXCEPTIONS

[SVN r12756]
This commit is contained in:
John Maddock
2002-02-08 12:42:59 +00:00
parent 4091f8c54f
commit bdf2ddfb26
8 changed files with 147 additions and 22 deletions

View File

@ -1,4 +1,3 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
@ -12,8 +11,8 @@ content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#800080">
<p align="left"><img src="../../c++boost.gif" width="277"
height="86" alt="Boost"></p>
<p align="left"><img src="../../c++boost.gif" alt="Boost"
width="277" height="86"></p>
<h1 align="center">Boost Configuration Reference</h1>
@ -540,6 +539,11 @@ struct foo : {
class X { ... };</pre>
</td>
</tr>
<tr>
<td>BOOST_NO_EXCEPTIONS</td>
<td>Compiler</td>
<td>The compiler does not support exception handling.</td>
</tr>
<tr>
<td valign="top" width="51%">BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS</td>
<td valign="top" width="16%">Compiler</td>

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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());

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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