在 2023/11/22 03:35, Björn Schäpers 写道: > I'll guess it is not needed here, but otherwise defines the macros max and min, they > then conflict e.g. with C++'s std::max/std::min. So I consider it best practice to always define it, > before including . The mingw-w64 header does not define them for C++ [1] and GCC defines `NOMINMAX` in 'os_defines.h', so either way it is not necessary. [1] https://github.com/mingw-w64/mingw-w64/blob/3ebb92804e3125d1be8f61bcd42f15a8db15ba1e/mingw-w64-headers/include/minmax.h#L9 -- Best regards, LIU Hao