fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void foo(float x, int y) {
  5. std::cout << "Foo1: " << x << " " << y << "\n";
  6. }
  7.  
  8. void foo(int x, const char* s) {
  9. std::cout << "Foo2: " << x << " " << s << "\n";
  10. }
  11.  
  12. void foo(int x, int y, int z) {
  13. std::cout << "Foo3: " << x << y << z << "\n";
  14. }
  15.  
  16. template <typename... Args>
  17. void bar(Args&&... args) {
  18. // Select foo based on arg types?
  19. }
  20.  
  21. int main() {
  22. bar(4.2f, 5);
  23. bar(3, "something");
  24. bar(6, 6, 6);
  25. return 0;
  26. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty