fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void foo() { cout << "foo" << endl; }
  6. void bar(char, short, int) { cout <<"bar" << endl; }
  7.  
  8. #define DEFINE_FUNCTION_WRAPPER(return_type, name, ...)\
  9. return_type name##_wrapper(/* macro expansion */)\
  10. {\
  11.   return name(/* macro expansion */);\
  12. }\
  13.  
  14. DEFINE_FUNCTION_WRAPPER(void, foo) // works!
  15. //DEFINE_FUNCTION_WRAPPER(void, foo, char, short, int) // knowledge insufficient
  16.  
  17. int main() {
  18. foo_wrapper();
  19. //bar_wrapper();
  20. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
foo