Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with older version of VS2017 compiler #1856

Closed
lalitb opened this issue Dec 10, 2022 · 0 comments · Fixed by #1857
Closed

Build error with older version of VS2017 compiler #1856

lalitb opened this issue Dec 10, 2022 · 0 comments · Fixed by #1857
Assignees
Labels
bug Something isn't working

Comments

@lalitb
Copy link
Member

lalitb commented Dec 10, 2022

Describe your environment
Visual Studio 2017 version 15.0
VC++ version: 14.10
_MSC_VER: 1910

Following error are reported while building a sample trace application:

Error C2280 'absl::otel_v1::variant_internal::Union<T0,bool,int64_t,uint64_t,double,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::Span>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::SpanContext>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::baggage::Baggage>> &absl::otel_v1::variant_internal::Union<T0,bool,int64_t,uint64_t,double,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::Span>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::SpanContext>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::baggage::Baggage>>::operator =(const absl::otel_v1::variant_internal::Union<T0,bool,int64_t,uint64_t,double,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::Span>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::trace::SpanContext>,opentelemetry::v1::nostd::shared_ptr<opentelemetry::v1::baggage::Baggage>> &)': attempting to reference a deleted function Project4 c:\users\labhas\obs\otel\opentelemetry-cpp\api\include\opentelemetry\nostd\internal\absl\meta\type_traits.h 166

Error C4996 'std::equal::_Unchecked_iterators::_Deprecate': Call to 'std::equal' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' Project4 c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.10.25017\include\xutility 2889

Steps to reproduce

#include "opentelemetry\context\context.h"
int main()
{
}

will give the first error

And

#include "opentelemetry\context\context_value.h"
int main()
{
}

will give second error

What is the expected behavior?
No error

What is the actual behavior?
Error as mentioned below

Additional context
Our CI pipeline runs on VS2019, so these errors are not seen there.

@lalitb lalitb added the bug Something isn't working label Dec 10, 2022
@lalitb lalitb self-assigned this Dec 10, 2022
@lalitb lalitb changed the title Build error with older versions of VS2017 compiler Build error with older version of VS2017 compiler Dec 10, 2022
@lalitb lalitb mentioned this issue Dec 10, 2022
3 tasks
ThomsonTan pushed a commit that referenced this issue Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant