// { dg-do run } #define INC_FUNCTIONAL 1 #define USE_STATIC_CAST 1 #include #include #ifdef INC_FUNCTIONAL #include #endif using namespace std; template int p( int val, R& r ) { return val + r; } template void f( vector& v ) { #ifdef USE_STATIC_CAST accumulate( v.begin(), v.end(), 0, static_cast(p) ); #else accumulate( v.begin(), v.end(), 0, p ); #endif } int main() { vector r; f( r ); }