mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 22:30:59 +08:00
new
From-SVN: r23849
This commit is contained in:
parent
32201ce4ea
commit
a64f294eea
15
gcc/testsuite/g++.old-deja/g++.eh/ctor1.C
Normal file
15
gcc/testsuite/g++.old-deja/g++.eh/ctor1.C
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
struct A
|
||||||
|
{
|
||||||
|
A();
|
||||||
|
A(A&); // ERROR - referenced below
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
throw A(); // ERROR - can't copy
|
||||||
|
}
|
||||||
|
catch (...) { }
|
||||||
|
}
|
11
gcc/testsuite/g++.old-deja/g++.pt/spec26.C
Normal file
11
gcc/testsuite/g++.old-deja/g++.pt/spec26.C
Normal 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 };
|
Loading…
Reference in New Issue
Block a user