fork(2) download
  1. #include <string>
  2.  
  3. template<typename T>
  4. void test(T x);
  5.  
  6. template<>
  7. void test<const std::string &>(const std::string & test)
  8. {
  9. }
  10.  
  11. template<>
  12. void test<const char *>(const char * test)
  13. {
  14. }
  15.  
  16. int main()
  17. {
  18. test(std::string("test"));
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/EBdjtP/prog-bf4abf.o: In function `main':
prog.cpp:(.text+0x4d): undefined reference to `void test<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
stdout
Standard output is empty