These two pieces of code:
|
std::atomic_flag shutdown_latch_{ATOMIC_FLAG_INIT}; |
|
std::atomic_flag shutdown_latch_{ATOMIC_FLAG_INIT}; |
Should be rewritten as follows:
std::atomic_flag static_flag = ATOMIC_FLAG_INIT; // static initialization,
- and empty constructor for C++20, since
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.
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.