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
[ 50%] Building CXX object sdk/src/trace/CMakeFiles/opentelemetry_trace.dir/tracer_provider.cc.o
In file included from /mnt/c/work/opentelemetry-cpp/sdk/include/opentelemetry/sdk/common/atomic_shared_ptr.h:3,
from /mnt/c/work/opentelemetry-cpp/sdk/include/opentelemetry/sdk/trace/tracer.h:3,
from /mnt/c/work/opentelemetry-cpp/sdk/include/opentelemetry/sdk/trace/tracer_provider.h:9,
from /mnt/c/work/opentelemetry-cpp/sdk/src/trace/tracer_provider.cc:1:
/usr/include/c++/9/atomic: In instantiation of ‘struct std::atomic<std::shared_ptr<opentelemetry::v0::sdk::trace::SpanProcessor> >’:
/mnt/c/work/opentelemetry-cpp/sdk/include/opentelemetry/sdk/common/atomic_shared_ptr.h:33:35: required from ‘class opentelemetry::v0::sdk::AtomicSharedPtr<opentelemetry::v0::sdk::trace::SpanProcessor>’
/mnt/c/work/opentelemetry-cpp/sdk/include/opentelemetry/sdk/trace/tracer.h:47:54: required from here
/usr/include/c++/9/atomic:191:21: error: static assertion failed: std::atomic requires a trivially copyable type
191 | static_assert(__is_trivially_copyable(_Tp),
The text was updated successfully, but these errors were encountered:
I was evaluating what happens when we build on latest Ubuntu release with its stock compiler in a project that is targeting C++20. The build is not gonna succeed. Workaround is to avoid using std::atomic if compiling with C++20:
Implementation suggests that it's C++20 compatible here:
opentelemetry-cpp/sdk/include/opentelemetry/sdk/common/atomic_shared_ptr.h
Line 14 in 9e5924c
However, if the project is built with
Then the build is broken here:
opentelemetry-cpp/sdk/include/opentelemetry/sdk/trace/tracer.h
Line 47 in 9e5924c
With the following error:
The text was updated successfully, but these errors were encountered: