Why would a friend function be defined as part of a struct - boost thread_data?
问题 I'm trying to understand some boost code which is causing PC-Lint grief and uses the friend keyword in a way which I didn't think was legal C++ but compiles OK in VS2008. I thought I understood friend as a way to declare classes and functions. I didn't think it was legal to use on a function definition like this. However, the MSDN page is very specific: Friend functions can be defined inside class declarations. These functions are inline functions, and like member inline functions they behave