blob: cce36d27303739a2370be5634cd49d51e8fc53ab (
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
|
// { dg-do run }
extern "C" void abort();
class X
{
public:
virtual int f() const = 0;
};
template <class T>
class Y: public X
{
public:
virtual int f() const;
};
template <class T>
int Y<T>::f() const
{
abort();
return 0;
}
template <>
int Y<bool>::f() const;
template <>
int Y<bool>::f() const
{
return 0;
}
int main()
{
Y<bool> yb;
yb.f();
}
|