thread_local.cxx 415 B

123456789101112131415
  1. // Test for std::to_string/std::from_string for floating-point types.
  2. #include <iostream>
  3. #include <sstream>
  4. int main(int argc, char **)
  5. {
  6. #if defined(__MINGW32__) && defined(__GNUC__)
  7. # if __GNUC__ < 11 || ((__GNUC__ == 11) && (__GNU_MINOR__ == 0))
  8. # error "On MinGW before gcc 11.1, thread_local breaks at run time."
  9. # endif
  10. #endif
  11. thread_local std::stringstream s;
  12. s << argc;
  13. std::cout << s.str();
  14. }