2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / eh / spec4.C
blob8edd3a1c6499aaff66ea837fe79b5340808e4834
1 // PR c++/5104
2 // Test that a function with a throw spec is a valid template argument.
4 #include <exception>
6 typedef void (*HandlerFunction)();
7 typedef HandlerFunction (*SetHandlerFunction)(HandlerFunction);
9 template <SetHandlerFunction set_function>
10 class HandlerStack {
11 public:
12   static void defaultHandler();
15 typedef HandlerStack<std::set_terminate> Terminate;
17 template<> void Terminate::defaultHandler() {}