define a 'eq_foreach' macro for compatibility with differnt compilers(MSVC2010+, GCC 4.6+)
improve the compatibility for gcc(mingw) and clang