Skip to content

std::result_of removed in C++20#115

Merged
reyang merged 4 commits intoopen-telemetry:masterfrom
maxgolov:maxgolov/fix_function_ref
Jun 16, 2020
Merged

std::result_of removed in C++20#115
reyang merged 4 commits intoopen-telemetry:masterfrom
maxgolov:maxgolov/fix_function_ref

Conversation

@maxgolov
Copy link
Copy Markdown
Contributor

Fix for #104 : when OpenTelemetry is compiled with latest update of Visual Studio 2019 in C++17 mode - it'd generate a warning, and in C++20 it won't compile because std::result_of has been removed in C++20. Adjust the header to stop using a compiler feature that's been removed from standard.

Copy link
Copy Markdown
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@g-easy
Copy link
Copy Markdown
Contributor

g-easy commented Jun 16, 2020

Failing test:

[ RUN      ] RandomTest.GenerateRandomBuffer
sdk/test/common/random_test.cc:30: Failure
Value of: std::equal(std::begin(buf1), std::end(buf1), std::begin(buf2))
  Actual: true
Expected: false
[  FAILED  ] RandomTest.GenerateRandomBuffer (0 ms)

cc @pyohannes

Address code review comment to document what /Zc:__cplusplus option is doing
@reyang
Copy link
Copy Markdown
Member

reyang commented Jun 16, 2020

@maxgolov please rebase, thanks.

@maxgolov maxgolov requested a review from a team June 16, 2020 21:14
@reyang reyang merged commit 49eee20 into open-telemetry:master Jun 16, 2020
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants