>> That's why there are two overloads! One for const, one for non-const.
What, you expect me to actually read the code? :D
>> I'm just concerned about returning void from the FncPtr call.
Code:template < typename R >
R foo( R ( *f )( ) )
{
return f( );
}
int bar( void )
{
return 3114;
}
void qux( void )
{ }
int main( void )
{
cout << foo( bar ) << endl;
foo( qux );
return 0;
}