OSDN Git Service

Pizza-lize :-)
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / lookup / exception1.C
1 /* PR 2743 */
2 /* { dg-do compile } */
3
4 namespace ns {
5   class Exception
6   {
7   };
8 }
9
10 namespace ns
11 {
12   class Test {
13     public:
14       inline Test() throw( Exception );
15       inline Test(int n ) throw( Exception );
16     private:
17       int i;
18   };
19 }
20
21 // This line used to fail because Exception wasn't looked up in the
22 // right scope.
23 ns::Test::Test() throw( Exception ) : i( 1 )
24 {
25 }
26
27 ns::Test::Test( int n ) throw( Exception ) : i( n )
28 {
29 }
30
31 int main(int argc, char* argv[]) {
32   ns::Test test;
33 }