apache / apache/arrow

[C++] Not all headers protected from Windows min/max defines

Open
#45,154 2 comments 0 reactions 0 assignees View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

Not all headers that use min and max include arrow/util/windows_compatibility.h . This requires a user of arrow to disable these macros on Windows. As an example, line 748 of arrow/type.h uses std::numeric_limits::max(). This can also be fixed by disabling macro expansion (for example, (std::numeric_limits::max)() ) or the Windows macros can be disabled by defining NOMINMAX, which is done in windows_compatibility.h.

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.