fork download
  1. #include <iostream>
  2. #include <stdint.h>
  3.  
  4. #define FOO(x) x < 32 ? Foo_32(x) : Foo_64(x)
  5.  
  6. int32_t Foo_32(uint8_t x)
  7. {
  8. std::cout << "32\n";
  9. return ((int32_t)1<<x);
  10. }
  11.  
  12. int64_t Foo_64(uint8_t x)
  13. {
  14. std::cout << "64\n";
  15. return ((int64_t)1<<x);
  16. }
  17.  
  18. int main() {
  19. FOO(35);
  20. FOO(22);
  21. return 0;
  22. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
64
32