Index: include/__hash_table =================================================================== --- include/__hash_table +++ include/__hash_table @@ -19,6 +19,7 @@ #include #include <__undef_min_max> +#include <__undef___deallocate> #include <__debug> Index: include/__sso_allocator =================================================================== --- include/__sso_allocator +++ include/__sso_allocator @@ -15,6 +15,8 @@ #include #include +#include <__undef___deallocate> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif Index: include/__undef___deallocate =================================================================== --- /dev/null +++ include/__undef___deallocate @@ -0,0 +1,18 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifdef __deallocate +#if defined(_MSC_VER) && !defined(__clang__) +_LIBCPP_WARNING("macro __deallocate is incompatible with C++. #undefining __deallocate") +#else +#warning: macro __deallocate is incompatible with C++. #undefining __deallocate +#endif +#undef __deallocate +#endif Index: include/experimental/dynarray =================================================================== --- include/experimental/dynarray +++ include/experimental/dynarray @@ -104,6 +104,8 @@ #include #include +#include <__undef___deallocate> + #if defined(_LIBCPP_NO_EXCEPTIONS) #include #endif Index: include/memory =================================================================== --- include/memory +++ include/memory @@ -615,6 +615,7 @@ #endif #include <__undef_min_max> +#include <__undef___deallocate> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Index: include/module.modulemap =================================================================== --- include/module.modulemap +++ include/module.modulemap @@ -469,4 +469,5 @@ module __tree { header "__tree" export * } module __tuple { header "__tuple" export * } module __undef_min_max { header "__undef_min_max" export * } + module __undef___deallocate { header "__undef___deallocate" export * } } Index: include/new =================================================================== --- include/new +++ include/new @@ -68,6 +68,8 @@ #include #include +#include <__undef___deallocate> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif Index: include/valarray =================================================================== --- include/valarray +++ include/valarray @@ -348,6 +348,7 @@ #include #include <__undef_min_max> +#include <__undef___deallocate> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header