What is wrong with this use of offsetof?
问题 I'm compiling some c++ code in MinGW GCC 4.4.0, and getting warnings with the following form... warning: invalid access to non-static data member '<membername>' of NULL object warning: (perhaps the 'offsetof' macro was used incorrectly) This problem seems familiar - something I've tried to resolve before and failed, I think, but a while ago. The code builds fine in Visual C++, but I haven't built this particular code recently in any other compiler. The problem code is the following template..