fork(1) download
  1. #include <iostream>
  2. #include <cstdint>
  3.  
  4. void foo(uint16_t x) {
  5. std::cout << "uint16_t\n";
  6. }
  7.  
  8. template <class T>
  9. void foo( const T&& t )
  10. {
  11. return foo(uint16_t{t});
  12. }
  13.  
  14. int main() {
  15. uint16_t x = 1;
  16. uint64_t y = 10000000000000;
  17. foo(x);
  18. foo(y); // goes through
  19. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
uint16_t
uint16_t