Closed Cazayus closed 1 month ago
Not a bug IIUC. The std
module can't provide any macro.
You're probably right, the cppref page mentions : "Since c++20 : This macro is no longer needed since default constructor of std::atomic_flag initializes it to clear state. It is kept for the compatibility with C." I guess most code that uses this should be updated accordingly post-cpp20
Correct - all named modules, including the Standard Library Modules std
and std.compat
, are by-Core-Language-design unable to emit macros, so alternative mechanisms must be found.
Thanks for being an early adopter of modules! :heart_eyes_cat:
Describe the bug
A simple case copy pasted from cppreference.com does not work when replacing the atomic include by the std module https://en.cppreference.com/w/cpp/atomic/ATOMIC_FLAG_INIT
Command-line test case
Expected behavior
It should compile but does not
STL version
Additional context
Seen when using the Boost library