blob: 847a4d3c667af29857b288c80a3e0f67be4a0f22 (
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
|
// PR middle-end/18683
// { dg-do compile }
// { dg-options "-O0" }
template<typename _CharT>
struct basic_ostream
{
basic_ostream& operator<<(int __n);
};
extern basic_ostream<char> cout;
template<int> struct linear_congruential
{
template<class CharT>
friend basic_ostream<CharT>&
operator<<(basic_ostream<CharT>& os,
const linear_congruential& lcg)
{
return os << 1;
}
};
void instantiate_all()
{
linear_congruential<0> lcf;
cout << lcf;
}
|