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>

36
configure vendored
View File

@ -78,7 +78,7 @@ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; ex
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
@ -745,7 +745,7 @@ do
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
ac_sep=" " ;;
@ -772,7 +772,7 @@ trap 'exit_status=$?
*ac_space=\ *)
sed -n \
"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
@ -858,7 +858,7 @@ echo "$as_me: current value: $ac_new_val" >&2;}
# we pass some twice (in addition to the command line arguments).
if test "$ac_new_set" = set; then
case $ac_new_val in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
ac_configure_args="$ac_configure_args '$ac_arg'"
;;
@ -883,7 +883,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
@ -1146,9 +1146,9 @@ if test "$cross_compiling" != yes; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
cross_compiling=yes
else
{ { echo "$as_me:1151: error: cannot run C++ compiled programs.
{ { echo "$as_me:1151: error: cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
@ -1608,8 +1608,8 @@ ac_cv_lib_rt=ac_cv_lib_rt_main
for file in ./test/boost_no*.cxx; do
basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'`
title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'`
macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'`
title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'`
namespace=`echo $macroname | tr [:upper:] [:lower:]`
#echo file = $file
@ -1747,8 +1747,8 @@ done
for file in ./test/boost_has*.cxx; do
basename=`echo $file | sed 's/.*boost_\(.*\)\.cxx/\1/'`
macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'`
title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'`
macroname=`cat $file | grep '^//[] []*MACRO:' | sed 's/.*MACRO:[] []*\([]_A-Z0-9[]*\).*/\1/'`
title=`cat $file | grep '^//[] []*TITLE:' | sed 's/.*TITLE:[] []*\([]^ [].*\)/\1/'`
namespace=`echo $macroname | tr [:upper:] [:lower:]`
# echo $file
@ -2009,13 +2009,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=/{
ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ ]*\):*/\1/;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
s/^[^=]*=[ ]*$//;
}'
fi
@ -2029,13 +2029,13 @@ fi
cat >confdef2opt.sed <<\EOF
t clear
: clear
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t quote
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
t quote
d
: quote
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
s,\[,\\&,g
s,\],\\&,g
s,\$,$$,g
@ -2128,7 +2128,7 @@ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; ex
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

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