Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love how many references to Stack Overflow that PR added to the codebase. Always a good sign.


LOL! The second S.O. link actually goes to show how broken C++ is: https://stackoverflow.com/a/18298965/544947


That's really a C related comment and all it doing is subbing in implementation specific pre-standard versions for the benefit of compatibility with compilers prior to the introduction of the feature in the C11 standard.

The standard calls it "_Thread_local", pre-standard MSVC/icc(win)/borland called it __declspec(thread), and pre-standard GCC/icc(linux)/clang/sun called it __thread.

Code would also be free to just use _Thread_local and say that a C11 conforming compiler is required.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: