repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
template1.C
blob
2cbf9c698b081bb7ae75eeeca52abccea6495f14
1
// Test whether exception specifier dependent on template parameter
2
// is accepted during template decl processing.
3
// { dg-do run }
4
5
extern "C" void abort();
6
7
class A {};
8
9
template <class T>
10
struct B
11
{
12
typedef A E;
13
};
14
15
template <class T>
16
struct C
17
{
18
typedef B<T> D;
19
typedef typename D::E E;
20
void f() throw(E) { throw E(); }
21
};
22
23
int main()
24
{
25
int caught = 0;
26
try
27
{
28
C<int> x;
29
x.f();
30
}
31
catch (A)
32
{
33
++caught;
34
}
35
if (caught != 1)
36
abort ();
37
return 0;
38
}