Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/static_cast.C

raw
1 // { dg-do assemble }
2
3 template <class InputIterator, class BinaryOperation>
4 void accumulate(InputIterator first,
5 BinaryOperation binary_op) {
6 }
7
8
9 template<class R> int p( int val, R& r )
10 {
11 return val + r;
12 }
13
14 template<class R> void f(R)
15 {
16 accumulate(0, static_cast<int (*)(int, R&)>(p) );
17 }
18
19 int main()
20 {
21 f(0);
22 }