fork download
  1. #include <iostream>
  2.  
  3. #define BIND( op, arg ) op ( arg,
  4. #define MULTIPLY( a, b ) ( (a) * (b) )
  5.  
  6. #define MULTIPLY_BY_2 BIND( MULTIPLY, 2 )
  7.  
  8.  
  9. int main() {
  10. std::cout << MULTIPLY_BY_2( 5 )) << '\n';
  11. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
10