mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +08:00
[Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows
Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -484,7 +484,7 @@ module std [system] {
|
||||
module __string { header "__string" export * }
|
||||
module __tree { header "__tree" export * }
|
||||
module __tuple { header "__tuple" export * }
|
||||
module __undef_min_max { header "__undef_min_max" export * }
|
||||
module __undef_macros { header "__undef_macros" export * }
|
||||
|
||||
module experimental {
|
||||
requires cplusplus11
|
||||
|
Reference in New Issue
Block a user