fork(1) download
  1. #include <string>
  2. #include <iostream>
  3.  
  4. template<typename T>
  5. void f(const T &v = T());
  6.  
  7. template<>
  8. void f<std::string>(const std::string &v)
  9. {
  10. std::cout << v;
  11. }
  12.  
  13. int main(int argc, char* argv[])
  14. {
  15. f<std::string>(); // Error in VS2013, OK in VS2012, gcc-4.7
  16. f<std::string>("Test"); // OK
  17. f<std::string>(std::string()); //OK
  18. return 0;
  19. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
Test