fork(5) download
  1. #include <iostream>
  2.  
  3. template<class T>
  4. void f(T &&) {
  5. std::cout << "f(T &&)\n";
  6. }
  7.  
  8. void f(std::string const&) {
  9. std::cout << "f(std::string const&)\n";
  10. }
  11.  
  12. int main() {
  13. std::string x;
  14. f(x);
  15.  
  16. std::string const y = "";
  17. f(y);
  18. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
f(T &&)
f(std::string const&)