summaryrefslogtreecommitdiff
path: root/tests/test_exception_catch.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2005-01-19 18:23:38 +0000
committerMurray Cumming <murrayc@src.gnome.org>2005-01-19 18:23:38 +0000
commit06b76dad1fd3ef0ae259b4dfec957b9314e86f54 (patch)
treecf62c5fc2965b90f858611b6f6ed82511081c759 /tests/test_exception_catch.cc
parentef4f441e6a7769634861859e0b9a0452a9e900c5 (diff)
downloadsigc++-06b76dad1fd3ef0ae259b4dfec957b9314e86f54.tar.gz
Added cxx_std.m4, with a test copied from glibmm/scripts/cxx_std.m4 to
2005-01-19 Murray Cumming <murrayc@murrayc.com> * scripts/: Added cxx_std.m4, with a test copied from glibmm/scripts/cxx_std.m4 to check if the compiler has the std:: namespace. * sigcconfig.h: #undef the new #define and add SIGC_USING_STD(), like GLIBMM_USING_STD, to put stuff in the std:: namespace when it is not there already, * configure.in: Used the new test. * tests/*: Uses SIG_USING_STD() for every std:: thing that we use. This is needed by the Tru64 and HP-UX compilers when using their defaults.
Diffstat (limited to 'tests/test_exception_catch.cc')
-rw-r--r--tests/test_exception_catch.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_exception_catch.cc b/tests/test_exception_catch.cc
index b843514..664b1b5 100644
--- a/tests/test_exception_catch.cc
+++ b/tests/test_exception_catch.cc
@@ -7,11 +7,15 @@
#include <iostream>
#include <stdexcept>
+SIGC_USING_STD(cout)
+SIGC_USING_STD(endl)
+SIGC_USING_STD(exception)
+
struct f : public sigc::functor_base
{
typedef int result_type;
int operator()(int i)
- {std::cout << "f(int "<<i<<")"<<std::endl;
+ {std::cout << "f(int "<<i<< ")"<< std::endl;
throw std::range_error("out of range");}
};
@@ -19,7 +23,7 @@ struct g : public sigc::functor_base
{
typedef int result_type;
int operator()()
- {std::cout << "g()"<<std::endl;
+ {std::cout << "g()" << std::endl;
throw std::range_error("out of range");}
};
@@ -27,7 +31,7 @@ struct g_void : public sigc::functor_base
{
typedef void result_type;
void operator()()
- {std::cout << "g_void()"<<std::endl;
+ {std::cout << "g_void()" << std::endl;
throw std::range_error("out of range");}
};