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] Add missing includes to runtime_context_test #2395

Merged

Conversation

perhapsmaple
Copy link
Contributor

Fixes a build error when building opentelemetry-cpp with the following config:

cmake .. -DWITH_STL=ON -DCMAKE_CXX_STANDARD=20

Building WITH_STL=ON in Windows x64 with Visual Studio 2022 causes the following errors:

D:\repos\test\opentelemetry-cpp\api\test\context\runtime_context_test.cc(134,17): error C2039: 'next_permutation': is not a member of 'std' [D:\repos\test\opentelemetry-cpp\build\api\test\context\runtime_cont
ext_test.vcxproj]
D:\vcpkg\installed\x64-windows\include\gtest/internal/gtest-internal.h(1324,11): message : see declaration of 'std' [D:\repos\test\opentelemetry-cpp\build\api\test\context\runtime_context_test.vcxproj]
D:\repos\test\opentelemetry-cpp\api\test\context\runtime_context_test.cc(134,33): error C3861: 'next_permutation': identifier not found [D:\repos\test\opentelemetry-cpp\build\api\test\context\runtime_context_
test.vcxproj]

Building in linux with the same configuration using gcc 11.4.0 or clang-14 does not produce any errors, so the issue must be specific to MSVC.

Thanks to @Dangeroustuber for pointing out this issue.

Changes

Added the missing includes to the runtime_context_test.cc file.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Signed-off-by: Harish Shan <[email protected]>
@perhapsmaple perhapsmaple requested a review from a team November 6, 2023 16:21
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix

@ThomsonTan ThomsonTan merged commit 5bf2f80 into open-telemetry:main Nov 6, 2023
43 checks passed
@perhapsmaple perhapsmaple deleted the fix_runtime_context_test branch February 11, 2024 17:16
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