From-SVN: r34658
This commit is contained in:
Jason Merrill 2000-06-23 02:45:58 -04:00
parent 051664b069
commit 691125710d
3 changed files with 26 additions and 4 deletions

View File

@ -1,7 +1,7 @@
// Build don't link:
// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
// Copyright (C) 1999 Free Software Foundation
// Copyright (C) 1999, 2000 Free Software Foundation
class Q {
template<class T>
@ -10,7 +10,6 @@ class Q {
};
template<template<class> class XX>
class Y {
XX<int> x_; // ERROR - Q::X not a template
XX<int> x_; // ERROR - Q::X inaccessible XFAIL *-*-*
};
Y<Q::X> y; // ERROR - instantiated from here
Y<Q::X> y; // ERROR - instantiated from here XFAIL *-*-*

View File

@ -0,0 +1,14 @@
// Origin: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
// Build don't link:
template<template<typename> class t1, typename t0> t1<t0> single()
{
return single<t1,t0>();
}
template<typename a> class T1 {};
int main()
{
single<T1,int>();
}

View File

@ -0,0 +1,9 @@
// Origin: grg at ai dot mit dot edu
// Build don't link:
class A;
template<template<class Ignored> class base> class C :
public base<A> {
public:
C(A& newa) : base<A>(newa) {}
};