Closed pdimov closed 4 years ago
Every user of Boost.WinAPI must still be prepared for any macros that might be defined by Windows SDK. This is because windows.h
may still be included, either by user or by Boost.WinAPI itself.
As to why basic_types.hpp
includes winerror.h
, I'm not sure. Probably, this is a remnant from times when there was no error_codes.hpp
header. I can probably remove that include, although it might break someone. I'll probably do that after the release.
Reminder.
Thanks.
There are reports that
<boost/system/error_code.hpp>
breaks code usingNO_ERROR
; the reason is thatwinapi/error_codes.hpp
includeswinapi/basic_types.hpp
which includes<winerror.h>
which defines all error codes as macros, includingNO_ERROR
.It's not clear why
<winerror.h>
is included;winapi/error_codes.hpp
defines the error codes as non-macros and does not rely on the macros.