Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / using2.C
blobcd878b9fe9bd1925e2abf870169a1806a48fab7e
1 // Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc.
2 //
3 // This file is part of the GNU ISO C++ Library.  This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
7 // any later version.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3.  If not see
16 // <http://www.gnu.org/licenses/>.
18 // Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
20 // { dg-do compile }
22 namespace N
24   template<int> void f() {}
27 using N;             // { dg-error "(using-declaration)|(nested-name)" "" }
28 using ::N;           // { dg-error "using-declaration" "" }
29 using N::f< 0 >;     // { dg-error "using-declaration" "" }
31 struct  A {
32   template <class T> void f(T);
33   template <class T> struct X { };
34 }; 
36 struct B : A {
37   using A::X;        // OK
38   using A::f;        // OK
41 struct C : A {
42   using A::f<double>; // { dg-error "using-declaration" "" }
43   using A::X<int>;    // { dg-error "using-declaration" "" }