aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/tuple
diff options
context:
space:
mode:
authorNicole Rabjohn <Nicole.Rabjohn@ibm.com>2023-07-06 17:12:05 +0000
committerNicole Rabjohn <Nicole.Rabjohn@ibm.com>2023-07-06 17:21:08 +0000
commit92e4d6791f714d1d90a3341c539ee3ac24e44ab0 (patch)
tree6af0d842dea5634e587a3ff11753e707ecde1271 /libcxx/include/tuple
parente61764c32ff77ae85509e56234a13a47b2d36cec (diff)
downloadllvm-92e4d6791f714d1d90a3341c539ee3ac24e44ab0.zip
llvm-92e4d6791f714d1d90a3341c539ee3ac24e44ab0.tar.gz
llvm-92e4d6791f714d1d90a3341c539ee3ac24e44ab0.tar.bz2
Fixing conflicting macro definitions between curses.h and the standard library.
POSIX allows certain macros to exist with generic names (i.e. refresh(), move(), and erase()) to exist in `curses.h` which conflict with functions found in std::filesystem, among others. This patch undefs the macros in question and adds them to LIBCPP_PUSH_MACROS and LIBCPP_POP_MACROS. Reviewed By: #libc, philnik, ldionne Differential Revision: https://reviews.llvm.org/D147356
Diffstat (limited to 'libcxx/include/tuple')
-rw-r--r--libcxx/include/tuple5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index e4119cf..8f01eec 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -270,6 +270,9 @@ template <class... Types>
# pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
_LIBCPP_BEGIN_NAMESPACE_STD
#ifndef _LIBCPP_CXX03_LANG
@@ -1856,6 +1859,8 @@ _LIBCPP_NOEXCEPT_RETURN(
_LIBCPP_END_NAMESPACE_STD
+_LIBCPP_POP_MACROS
+
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <exception>
# include <iosfwd>