You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If I include catch2/catch_all.hpp on Windows it transitively includes windows.h which defines a lot of preprocessor definitions whose names will be in conflict with my code.
Expected behavior
Windows.h should be included only in the implementation files of catch2, not in the public headers.
Reproduction steps
See description above.
Platform information:
OS: Windows NT
Compiler+version: GCC 11 (Mingw64)
Catch version: v3.0.1
The text was updated successfully, but these errors were encountered:
dimztimz
changed the title
Windows_h_proxy is included in catch_all.hpp and which does name-polution
Windows_h_proxy is included in catch_all.hpp and does name-polution
May 20, 2022
Maybe a better fix is to include windows.h directly where needed and completely delete this file catch_windows_h_proxy.hpp. An even better solution is to have public and private headers, install only the public headers and any scripts like the above one should test only for those. I'd go with the former solution right now.
Describe the bug
If I include
catch2/catch_all.hpp
on Windows it transitively includeswindows.h
which defines a lot of preprocessor definitions whose names will be in conflict with my code.Expected behavior
Windows.h should be included only in the implementation files of catch2, not in the public headers.
Reproduction steps
See description above.
Platform information:
The text was updated successfully, but these errors were encountered: