blob: 2177748b77a9113045165a6f3ec92bbd4c414afd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// { dg-do assemble }
// GROUPS passed access
// access file
// Message-Id: <9306301534.AA05072@sparc1.cnm.us.es>
// From: juando@cnm.us.es (Juan D. Martin)
// Subject: Compiler lets access to private constructor in template.
// Date: Wed, 30 Jun 93 17:34:10 +0200
template <class T> class Foo
{
private:
friend class Bar; // To avoid warning.
Foo(const T &v) {}; // { dg-error "" } private
};
int main()
{
Foo<int>(1);// { dg-error "" }
}
|