Currently some of the libc++ tests fail because the header isn't guarded against min/max macros.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
pstl/include/pstl/internal/algorithm_impl.h | ||
---|---|---|
19 | Instead, we need to make the PSTL freestanding (in the sense that it should work whether it is used with libc++ or with another stdlib, not in the usual freestanding sense). So I'd do something like this inside pstl_config.h: #if defined(_PSTL_COMPILER_MSVC) # define _PSTL_PUSH_MACROS \ __pragma(push_macro("min")) \ __pragma(push_macro("max")) # define _PSTL_POP_MACROS \ __pragma(pop_macro("min")) \ __pragma(pop_macro("max")) #else # define _PSTL_PUSH_MACROS \ _Pragma("push_macro(\"min\")") \ _Pragma("push_macro(\"max\")") # define _PSTL_POP_MACROS \ _Pragma("pop_macro(\"min\")") \ _Pragma("pop_macro(\"max\")") #endif #define _PSTL_UNDEF_MACROS <__pstl_undef_macros> |
Instead, we need to make the PSTL freestanding (in the sense that it should work whether it is used with libc++ or with another stdlib, not in the usual freestanding sense). So I'd do something like this inside pstl_config.h: