This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Description
|
#ifdef HAVE_CXX11_ATOMIC |
|
#include <atomic> |
|
#elif defined(OS_WINDOWS) |
|
#include <Windows.h> |
|
#endif |
Here HAVE_CXX11_ATOMIC is defined in config.h which is generated and used in the build stage, while the macro is missing when the header is included by some other projects. Since the user holds no information about whether or not the macro is defined in the build stage, I think it's necessary to enable the feature by checking @ac_cv_have_cxx11_atomic@ rather then by checking macro definition. At least, the macro should be defined somewhere such as export.h.
Moreover, it has caused incorrect inclusion of windows.h due to that OS_WINDOWS is a commonly defined macro. It's really a torture when debugging for it.