2009-12-16 04:14:24 +08:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-09-28 15:26:33 +08:00
// PR5061
namespace a {
template < typename T > class C { } ;
}
namespace b {
template < typename T > void f0 ( a : : C < T > & a0 ) { }
}
2009-12-01 07:50:49 +08:00
namespace test1 {
int a = 0 ;
template < class T > class Base { } ;
template < class T > class Derived : public Base < T > {
int foo ( ) {
return test1 : : a ;
}
} ;
}
2009-12-02 06:10:20 +08:00
namespace test2 {
class Impl {
2010-04-10 03:03:51 +08:00
public :
2009-12-02 06:10:20 +08:00
int foo ( ) ;
} ;
template < class T > class Magic : public Impl {
int foo ( ) {
return Impl : : foo ( ) ;
}
} ;
}
2010-01-30 01:15:43 +08:00
namespace PR6063 {
template < typename T > void f ( T , T ) ;
namespace detail
{
using PR6063 : : f ;
}
template < typename T >
void g ( T a , T b )
{
detail : : f ( a , b ) ;
}
}
2012-03-18 08:15:42 +08:00
namespace PR12291 {
template < typename T >
class Outer2 {
template < typename V >
template < typename W >
class Outer2 < V > : : Inner ; // expected-error{{nested name specifier 'Outer2<V>::' for declaration does not refer into a class, class template or class template partial specialization}}
} ;
}