[libcxx-commits] [PATCH] D73855: Protect <span> against mim/max macro

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 10 04:44:55 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1ac44d9fd1d9: [libc++] Protect <span> against min/max macro (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73855/new/

https://reviews.llvm.org/D73855

Files:
  libcxx/include/span
  libcxx/test/libcxx/min_max_macros.sh.cpp


Index: libcxx/test/libcxx/min_max_macros.sh.cpp
===================================================================
--- libcxx/test/libcxx/min_max_macros.sh.cpp
+++ libcxx/test/libcxx/min_max_macros.sh.cpp
@@ -177,6 +177,8 @@
 #include <shared_mutex>
 TEST_MACROS();
 #endif
+#include <span>
+TEST_MACROS();
 #include <sstream>
 TEST_MACROS();
 #include <stack>
Index: libcxx/include/span
===================================================================
--- libcxx/include/span
+++ libcxx/include/span
@@ -143,7 +143,7 @@
 
 #if _LIBCPP_STD_VER > 17
 
-inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
+inline constexpr size_t dynamic_extent = (numeric_limits<size_t>::max)();
 template <typename _Tp, size_t _Extent = dynamic_extent> class span;
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73855.243512.patch
Type: text/x-patch
Size: 777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200210/d68ca4d6/attachment.bin>


More information about the libcxx-commits mailing list