repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
reflect: canonicalize types returned by StructOf() and friends
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.brendan
/
cvt4.C
blob
6d62209a225044fc9e832efc892f40a022566181
1
// { dg-do assemble }
2
// GROUPS passed conversions
3
class A {};
4
5
template <class TP>
6
class B
7
{
8
A &(*_f) (A &, TP);
9
TP _a;
10
public:
11
B (A &(*f) (A &, TP), TP a) : _f (f), _a (a) {}
12
friend A &operator<< (A &o, const B<TP> &m)
13
{ (*m._f) (o, m._a); return o; }
14
};
15
16
A &setw (A &, int);
17
B<int> setw (int n)
18
{
19
return B<int> (setw, n);
20
}
21
22
A x;
23
24
void f ()
25
{
26
x << setw (2);
27
}