Simple processor and Simple Log processor use a non-standard feature deprecated in C++20 #468
Labels
bug
Something isn't working
pr:please-merge
This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)
These two pieces of code:
opentelemetry-cpp/sdk/include/opentelemetry/sdk/trace/simple_processor.h
Line 75 in 68e510c
opentelemetry-cpp/sdk/include/opentelemetry/sdk/logs/simple_log_processor.h
Line 62 in 106c00a
Should be rewritten as follows:
std::atomic_flag static_flag = ATOMIC_FLAG_INIT; // static initialization,
This macro is no longer needed and deprecated, since default constructor of std::atomic_flag initializes it to clear state.
I hit this while rebasing my PR for Standard Library support and testing it with C++20. The code won't compile as written in Visual Studio 2019 with C++20 enabled.
The text was updated successfully, but these errors were encountered: