fork download
  1. #include <thread>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. thread_local string s("Hello");
  7.  
  8. int main()
  9. {
  10. thread([]
  11. {
  12. s;
  13. }).join();
  14. return 0;
  15. }
Success #stdin #stdout 0s 12672KB
stdin
Standard input is empty
stdout
Standard output is empty