Guest User

Untitled

a guest
Feb 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. template<float(*math_fun)(float)> float run_math_fun(float arg) {
  2. float ret = (*math_fun)(arg);
  3. return ret;
  4. }
  5.  
  6. float ddd() {
  7. float a = 10.0;
  8. return run_math_fun<&fabs>(a);
  9. }
  10.  
  11. In function 'float ob_charspace::ddd()'::
  12. no matching function for call to 'run_math_fun(float&)'
  13. candidate is:
  14. template<float (* math_fun)(float)> float ob_charspace::run_math_fun(float)
  15. [Build Error] [obj/ob7.o] Error 1
Add Comment
Please, Sign In to add comment