Handle std::thread::hardware_concurrency()
问题 In my question about std::thread , I was advised to use std::thread::hardware_concurrency() . I read somewhere (which I can not find it and seems like a local repository of code or something), that this feature is not implemented for versions of g++ prior to 4.8. As a matter of fact, I was the at the same victim position as this user. The function will simply return 0. I found in this answer a user implementation. Comments on whether this answer is good or not are welcome! So I would like to