Skip to content

[BUILD] Avoid break caused by max() macro on windows#3863

Merged
marcalff merged 2 commits intoopen-telemetry:mainfrom
marcalff:fix_windows_max
Feb 13, 2026
Merged

[BUILD] Avoid break caused by max() macro on windows#3863
marcalff merged 2 commits intoopen-telemetry:mainfrom
marcalff:fix_windows_max

Conversation

@marcalff
Copy link
Member

@marcalff marcalff commented Feb 12, 2026

Fixes #3861

Changes

Please provide a brief description of the changes here.

  • Use a work around when invoking max(), to avoid collisions with max macros on windows.
  • This is needed only in public header files visible to user code (like exporter options).

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

@marcalff marcalff marked this pull request as ready for review February 12, 2026 21:14
@marcalff marcalff requested a review from a team as a code owner February 12, 2026 21:14
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.99%. Comparing base (9cab071) to head (f68cedd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3863   +/-   ##
=======================================
  Coverage   89.99%   89.99%           
=======================================
  Files         225      225           
  Lines        7170     7170           
=======================================
  Hits         6452     6452           
  Misses        718      718           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcalff marcalff merged commit 13ad05a into open-telemetry:main Feb 13, 2026
67 checks passed
malkia added a commit to malkia/opentelemetry-cpp that referenced this pull request Feb 13, 2026
[BUILD] Avoid break caused by max() macro on windows (open-telemetry#3863)
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.

v1.25 regression: Build break on Windows with Visual Studio 2022

2 participants