blob: 8c79631b0a99fdf54d67f84e6d0d3a389e542809 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// http://bugzilla.redhat.com/411871
// { dg-do compile }
extern "C" int printf (const char *, ...);
struct E
{
template <typename T> E (const volatile T&);
template <typename T> E (T&);
char x[64];
};
template<typename T> struct D
{
static E foo (E, ...);
static int foo (T, int);
};
template<typename T, typename U> struct C
{
static T ca;
static const int value = sizeof (D<U>::foo (ca, 0)) == sizeof (int);
};
struct A
{
int a;
};
namespace
{
struct B
{
int a;
};
}
int bar (void)
{
C<A, int> a;
C<B, int> b;
return a.value + b.value;
}
|