From-SVN: r23849
This commit is contained in:
Jason Merrill 1998-11-24 23:11:47 -05:00
parent 32201ce4ea
commit a64f294eea
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,15 @@
struct A
{
A();
A(A&); // ERROR - referenced below
};
int
main ()
{
try
{
throw A(); // ERROR - can't copy
}
catch (...) { }
}

View File

@ -0,0 +1,11 @@
// From: lat@iki.fi (Lassi A. Tuura)
// Test that a specialization without an initializer is not a definition,
// as specified in [temp.expl.spec].
// Build don't link:
struct X;
template <class T> struct Y { static const X array[]; };
template <> const X Y<int>::array [];
struct X { int i; };
template <> const X Y<int>::array [] = { 0, 1, 2, 3 };