svn commit: r319467 - in vendor/libc++/dist: . include include/experimental include/support/win32 src src/support/win32 test/libcxx test/libcxx/utilities/tuple/tuple.tuple test/std/experimental/lan...

Dimitry Andric dim at FreeBSD.org
Thu Jun 1 20:59:15 UTC 2017


Author: dim
Date: Thu Jun  1 20:59:10 2017
New Revision: 319467
URL: https://svnweb.freebsd.org/changeset/base/319467

Log:
  Vendor import of libc++ trunk r304460:
  https://llvm.org/svn/llvm-project/libcxx/trunk@304460

Added:
  vendor/libc++/dist/include/__undef_macros
  vendor/libc++/dist/test/libcxx/min_max_macros.sh.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/includes.pass.cpp   (contents, props changed)
Deleted:
  vendor/libc++/dist/include/__undef_min_max
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/go.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.sh.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/includes.sh.cpp
Modified:
  vendor/libc++/dist/appveyor-reqs-install.cmd
  vendor/libc++/dist/include/__bit_reference
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__hash_table
  vendor/libc++/dist/include/__locale
  vendor/libc++/dist/include/__mutex_base
  vendor/libc++/dist/include/__split_buffer
  vendor/libc++/dist/include/__std_stream
  vendor/libc++/dist/include/__string
  vendor/libc++/dist/include/__threading_support
  vendor/libc++/dist/include/__tree
  vendor/libc++/dist/include/algorithm
  vendor/libc++/dist/include/array
  vendor/libc++/dist/include/bitset
  vendor/libc++/dist/include/chrono
  vendor/libc++/dist/include/deque
  vendor/libc++/dist/include/experimental/algorithm
  vendor/libc++/dist/include/experimental/dynarray
  vendor/libc++/dist/include/experimental/functional
  vendor/libc++/dist/include/experimental/memory_resource
  vendor/libc++/dist/include/experimental/numeric
  vendor/libc++/dist/include/experimental/optional
  vendor/libc++/dist/include/experimental/string_view
  vendor/libc++/dist/include/forward_list
  vendor/libc++/dist/include/fstream
  vendor/libc++/dist/include/istream
  vendor/libc++/dist/include/limits
  vendor/libc++/dist/include/list
  vendor/libc++/dist/include/locale
  vendor/libc++/dist/include/memory
  vendor/libc++/dist/include/module.modulemap
  vendor/libc++/dist/include/mutex
  vendor/libc++/dist/include/numeric
  vendor/libc++/dist/include/optional
  vendor/libc++/dist/include/random
  vendor/libc++/dist/include/ratio
  vendor/libc++/dist/include/regex
  vendor/libc++/dist/include/shared_mutex
  vendor/libc++/dist/include/sstream
  vendor/libc++/dist/include/stdexcept
  vendor/libc++/dist/include/stdio.h
  vendor/libc++/dist/include/streambuf
  vendor/libc++/dist/include/string
  vendor/libc++/dist/include/string_view
  vendor/libc++/dist/include/support/win32/locale_win32.h
  vendor/libc++/dist/include/thread
  vendor/libc++/dist/include/tuple
  vendor/libc++/dist/include/valarray
  vendor/libc++/dist/include/vector
  vendor/libc++/dist/include/wchar.h
  vendor/libc++/dist/src/chrono.cpp
  vendor/libc++/dist/src/condition_variable.cpp
  vendor/libc++/dist/src/ios.cpp
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/src/mutex.cpp
  vendor/libc++/dist/src/new.cpp
  vendor/libc++/dist/src/strstream.cpp
  vendor/libc++/dist/src/support/win32/locale_win32.cpp
  vendor/libc++/dist/src/support/win32/support.cpp
  vendor/libc++/dist/src/system_error.cpp
  vendor/libc++/dist/src/thread.cpp
  vendor/libc++/dist/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
  vendor/libc++/dist/test/support/nasty_macros.hpp
  vendor/libc++/dist/test/support/test_macros.h
  vendor/libc++/dist/utils/libcxx/test/config.py

Modified: vendor/libc++/dist/appveyor-reqs-install.cmd
==============================================================================
--- vendor/libc++/dist/appveyor-reqs-install.cmd	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/appveyor-reqs-install.cmd	Thu Jun  1 20:59:10 2017	(r319467)
@@ -9,7 +9,7 @@ cd C:\projects\deps
 :: Setup Compiler
 ::###########################################################################
 if NOT EXIST llvm-installer.exe (
-  appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r301646-win32.exe -FileName llvm-installer.exe
+  appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r303050-win32.exe -FileName llvm-installer.exe
 )
 if "%CLANG_VERSION%"=="ToT" (
     START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"

Modified: vendor/libc++/dist/include/__bit_reference
==============================================================================
--- vendor/libc++/dist/include/__bit_reference	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__bit_reference	Thu Jun  1 20:59:10 2017	(r319467)
@@ -14,12 +14,14 @@
 #include <__config>
 #include <algorithm>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Cp, bool _IsConst, typename _Cp::__storage_type = 0> class __bit_iterator;
@@ -1272,5 +1274,7 @@ class __bit_iterator (private)
 };
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP___BIT_REFERENCE

Modified: vendor/libc++/dist/include/__config
==============================================================================
--- vendor/libc++/dist/include/__config	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__config	Thu Jun  1 20:59:10 2017	(r319467)
@@ -220,10 +220,12 @@
 #endif  // __NetBSD__
 
 #if defined(_WIN32)
-#  define _LIBCPP_WIN32API      1
+#  define _LIBCPP_WIN32API
 #  define _LIBCPP_LITTLE_ENDIAN 1
 #  define _LIBCPP_BIG_ENDIAN    0
 #  define _LIBCPP_SHORT_WCHAR   1
+// Both MinGW and native MSVC provide a "MSVC"-like enviroment
+#  define _LIBCPP_MSVCRT_LIKE
 // If mingw not explicitly detected, assume using MS C runtime only.
 #  ifndef __MINGW32__
 #    define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
@@ -1204,5 +1206,35 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_
       __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000))
 #define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE
 #endif
+
+#if defined(_LIBCPP_COMPILER_IBM)
+#define _LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO
+#endif
+
+#if defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO)
+# define _LIBCPP_PUSH_MACROS
+# define _LIBCPP_POP_MACROS
+#else
+  // Don't warn about macro conflicts when we can restore them at the
+  // end of the header.
+# ifndef _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS
+#   define _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS
+# endif
+# if defined(_LIBCPP_COMPILER_MSVC)
+#   define _LIBCPP_PUSH_MACROS    \
+      __pragma(push_macro("min")) \
+      __pragma(push_macro("max"))
+#   define _LIBCPP_POP_MACROS     \
+      __pragma(pop_macro("min"))  \
+      __pragma(pop_macro("max"))
+# else
+#   define _LIBCPP_PUSH_MACROS        \
+      _Pragma("push_macro(\"min\")")  \
+      _Pragma("push_macro(\"max\")")
+#   define _LIBCPP_POP_MACROS         \
+      _Pragma("pop_macro(\"min\")")   \
+      _Pragma("pop_macro(\"max\")")
+# endif
+#endif // defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO)
 
 #endif // _LIBCPP_CONFIG

Modified: vendor/libc++/dist/include/__hash_table
==============================================================================
--- vendor/libc++/dist/include/__hash_table	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__hash_table	Thu Jun  1 20:59:10 2017	(r319467)
@@ -20,17 +20,18 @@
 #include <utility>
 #include <type_traits>
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
 
 
+_LIBCPP_BEGIN_NAMESPACE_STD
+
 #ifndef _LIBCPP_CXX03_LANG
 template <class _Key, class _Tp>
 union __hash_value_type;
@@ -2667,6 +2668,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__subscripta
 }
 
 #endif  // _LIBCPP_DEBUG_LEVEL >= 2
+
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP__HASH_TABLE

Modified: vendor/libc++/dist/include/__locale
==============================================================================
--- vendor/libc++/dist/include/__locale	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__locale	Thu Jun  1 20:59:10 2017	(r319467)
@@ -19,7 +19,7 @@
 #include <cstdint>
 #include <cctype>
 #include <locale.h>
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCPP_MSVCRT_LIKE)
 # include <support/win32/locale_win32.h>
 #elif defined(_AIX)
 # include <support/ibm/xlocale.h>
@@ -367,7 +367,7 @@ class _LIBCPP_TYPE_VIS ctype_base (public)
     static const mask punct  = _ISpunct;
     static const mask xdigit = _ISxdigit;
     static const mask blank  = _ISblank;
-#elif defined(_LIBCPP_MSVCRT)
+#elif defined(_LIBCPP_MSVCRT_LIKE)
     typedef unsigned short mask;
     static const mask space  = _SPACE;
     static const mask print  = _BLANK|_PUNCT|_ALPHA|_DIGIT;

Modified: vendor/libc++/dist/include/__mutex_base
==============================================================================
--- vendor/libc++/dist/include/__mutex_base	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__mutex_base	Thu Jun  1 20:59:10 2017	(r319467)
@@ -15,12 +15,16 @@
 #include <chrono>
 #include <system_error>
 #include <__threading_support>
-#include <__undef_min_max>
 
+
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 #ifndef _LIBCPP_HAS_NO_THREADS
@@ -427,5 +431,7 @@ condition_variable::wait_for(unique_lock<mutex>& __lk,
 #endif // !_LIBCPP_HAS_NO_THREADS
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP___MUTEX_BASE

Modified: vendor/libc++/dist/include/__split_buffer
==============================================================================
--- vendor/libc++/dist/include/__split_buffer	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__split_buffer	Thu Jun  1 20:59:10 2017	(r319467)
@@ -6,12 +6,14 @@
 #include <type_traits>
 #include <algorithm>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <bool>
@@ -628,7 +630,8 @@ swap(__split_buffer<_Tp, _Allocator>& __x, __split_buf
     __x.swap(__y);
 }
 
-
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_SPLIT_BUFFER

Modified: vendor/libc++/dist/include/__std_stream
==============================================================================
--- vendor/libc++/dist/include/__std_stream	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__std_stream	Thu Jun  1 20:59:10 2017	(r319467)
@@ -17,12 +17,14 @@
 #include <__locale>
 #include <cstdio>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 static const int __limit = 8;
@@ -354,5 +356,7 @@ __stdoutbuf<_CharT>::imbue(const locale& __loc)
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP___STD_STREAM

Modified: vendor/libc++/dist/include/__string
==============================================================================
--- vendor/libc++/dist/include/__string	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__string	Thu Jun  1 20:59:10 2017	(r319467)
@@ -57,14 +57,16 @@ template <> struct char_traits<wchar_t>;
 #include <cstdio>     // For EOF.
 #include <memory>     // for __murmur2_or_cityhash
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 // char_traits
@@ -869,5 +871,7 @@ struct __quoted_output_proxy
 };
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP___STRING

Modified: vendor/libc++/dist/include/__threading_support
==============================================================================
--- vendor/libc++/dist/include/__threading_support	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__threading_support	Thu Jun  1 20:59:10 2017	(r319467)
@@ -30,9 +30,12 @@
 #include <windows.h>
 #include <process.h>
 #include <fibersapi.h>
-#include <__undef_min_max>
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 #if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
     defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL)
 #define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS
@@ -628,6 +631,8 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p
 #endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif // !_LIBCPP_HAS_NO_THREADS
 

Modified: vendor/libc++/dist/include/__tree
==============================================================================
--- vendor/libc++/dist/include/__tree	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/__tree	Thu Jun  1 20:59:10 2017	(r319467)
@@ -17,12 +17,14 @@
 #include <stdexcept>
 #include <algorithm>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Compare, class _Allocator> class __tree;
@@ -2684,5 +2686,7 @@ swap(__tree<_Tp, _Compare, _Allocator>& __x,
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP___TREE

Added: vendor/libc++/dist/include/__undef_macros
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/include/__undef_macros	Thu Jun  1 20:59:10 2017	(r319467)
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+//===------------------------ __undef_macros ------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifdef min
+#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
+#if defined(_LIBCPP_WARNING)
+_LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "
+                "before any Windows header. #undefing min")
+#else
+#warning: macro min is incompatible with C++.  #undefing min
+#endif
+#endif
+#undef min
+#endif
+
+#ifdef max
+#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
+#if defined(_LIBCPP_WARNING)
+_LIBCPP_WARNING("macro max is incompatible with C++.  Try #define NOMINMAX "
+                "before any Windows header. #undefing max")
+#else
+#warning: macro max is incompatible with C++.  #undefing max
+#endif
+#endif
+#undef max
+#endif

Modified: vendor/libc++/dist/include/algorithm
==============================================================================
--- vendor/libc++/dist/include/algorithm	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/algorithm	Thu Jun  1 20:59:10 2017	(r319467)
@@ -651,14 +651,16 @@ template <class BidirectionalIterator, class Compare>
 #include <intrin.h>
 #endif
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 // I'd like to replace these with _VSTD::equal_to<void>, but can't because:
@@ -2908,11 +2910,11 @@ struct __log2_imp<0, _Rp>
     static const size_t value = _Rp + 1;
 };
 
-template <class _UI, _UI _Xp>
+template <class _UIntType, _UIntType _Xp>
 struct __log2
 {
     static const size_t value = __log2_imp<_Xp,
-                                         sizeof(_UI) * __CHAR_BIT__ - 1>::value;
+                                         sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
 };
 
 template<class _Engine, class _UIntType>
@@ -5903,5 +5905,7 @@ prev_permutation(_BidirectionalIterator __first, _Bidi
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_ALGORITHM

Modified: vendor/libc++/dist/include/array
==============================================================================
--- vendor/libc++/dist/include/array	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/array	Thu Jun  1 20:59:10 2017	(r319467)
@@ -113,6 +113,8 @@ template <size_t I, class T, size_t N> const T&& get(c
 #pragma GCC system_header
 #endif
 
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, size_t _Size>

Modified: vendor/libc++/dist/include/bitset
==============================================================================
--- vendor/libc++/dist/include/bitset	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/bitset	Thu Jun  1 20:59:10 2017	(r319467)
@@ -113,10 +113,6 @@ template <size_t N> struct hash<std::bitset<N>>;
 
 */
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
 #include <__config>
 #include <__bit_reference>
 #include <cstddef>
@@ -126,8 +122,14 @@ template <size_t N> struct hash<std::bitset<N>>;
 #include <iosfwd>
 #include <__functional_base>
 
-#include <__undef_min_max>
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <size_t _N_words, size_t _Size>
@@ -1089,5 +1091,7 @@ basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_BITSET

Modified: vendor/libc++/dist/include/chrono
==============================================================================
--- vendor/libc++/dist/include/chrono	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/chrono	Thu Jun  1 20:59:10 2017	(r319467)
@@ -305,12 +305,14 @@ constexpr chrono::duration<unspecified , nano>        
 #include <ratio>
 #include <limits>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace chrono
@@ -1159,5 +1161,7 @@ namespace chrono { // hoist the literals into namespac
 #endif
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_CHRONO

Modified: vendor/libc++/dist/include/deque
==============================================================================
--- vendor/libc++/dist/include/deque	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/deque	Thu Jun  1 20:59:10 2017	(r319467)
@@ -150,10 +150,6 @@ template <class T, class Allocator>
 
 */
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
 #include <__config>
 #include <__split_buffer>
 #include <type_traits>
@@ -162,8 +158,14 @@ template <class T, class Allocator>
 #include <algorithm>
 #include <stdexcept>
 
-#include <__undef_min_max>
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Allocator> class __deque_base;
@@ -2899,5 +2901,7 @@ swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocato
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_DEQUE

Modified: vendor/libc++/dist/include/experimental/algorithm
==============================================================================
--- vendor/libc++/dist/include/experimental/algorithm	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/algorithm	Thu Jun  1 20:59:10 2017	(r319467)
@@ -39,17 +39,18 @@ SampleIterator sample(PopulationIterator first, Popula
 #include <algorithm>
 #include <type_traits>
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
 
 
+_LIBCPP_BEGIN_NAMESPACE_LFTS
+
 template <class _ForwardIterator, class _Searcher>
 _LIBCPP_INLINE_VISIBILITY
 _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
@@ -66,5 +67,7 @@ _SampleIterator sample(_PopulationIterator __first, _P
 }
 
 _LIBCPP_END_NAMESPACE_LFTS
+
+_LIBCPP_POP_MACROS
 
 #endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */

Modified: vendor/libc++/dist/include/experimental/dynarray
==============================================================================
--- vendor/libc++/dist/include/experimental/dynarray	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/dynarray	Thu Jun  1 20:59:10 2017	(r319467)
@@ -107,6 +107,9 @@ class dynarray (public)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
 namespace std { namespace experimental { inline namespace __array_extensions_v1 {
 
 template <class _Tp>
@@ -294,6 +297,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _Tp, class _Alloc>
 struct _LIBCPP_TEMPLATE_VIS uses_allocator<std::experimental::dynarray<_Tp>, _Alloc> : true_type {};
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // if _LIBCPP_STD_VER > 11 
 #endif  // _LIBCPP_DYNARRAY

Modified: vendor/libc++/dist/include/experimental/functional
==============================================================================
--- vendor/libc++/dist/include/experimental/functional	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/functional	Thu Jun  1 20:59:10 2017	(r319467)
@@ -89,21 +89,22 @@ inline namespace fundamentals_v1 {
 
 #include <experimental/__config>
 #include <functional>
-
 #include <algorithm>
 #include <type_traits>
 #include <vector>
 #include <array>
 #include <unordered_map>
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_LFTS
 
 #if _LIBCPP_STD_VER > 11
@@ -455,5 +456,7 @@ make_boyer_moore_horspool_searcher( _RandomAccessItera
 #endif // _LIBCPP_STD_VER > 11
 
 _LIBCPP_END_NAMESPACE_LFTS
+
+_LIBCPP_POP_MACROS
 
 #endif /* _LIBCPP_EXPERIMENTAL_FUNCTIONAL */

Modified: vendor/libc++/dist/include/experimental/memory_resource
==============================================================================
--- vendor/libc++/dist/include/experimental/memory_resource	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/memory_resource	Thu Jun  1 20:59:10 2017	(r319467)
@@ -82,6 +82,9 @@ namespace pmr {
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
 _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
 
 // Round __s up to next multiple of __a.
@@ -418,5 +421,7 @@ using resource_adaptor = __resource_adaptor_imp<
   >;
 
 _LIBCPP_END_NAMESPACE_LFTS_PMR
+
+_LIBCPP_POP_MACROS
 
 #endif /* _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE */

Modified: vendor/libc++/dist/include/experimental/numeric
==============================================================================
--- vendor/libc++/dist/include/experimental/numeric	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/numeric	Thu Jun  1 20:59:10 2017	(r319467)
@@ -41,6 +41,9 @@ inline namespace fundamentals_v2 {
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
 #if _LIBCPP_STD_VER > 11
 
 _LIBCPP_BEGIN_NAMESPACE_LFTS_V2
@@ -110,4 +113,7 @@ lcm(_Tp __m, _Up __n)
 _LIBCPP_END_NAMESPACE_LFTS_V2
 
 #endif /* _LIBCPP_STD_VER > 11 */
+
+_LIBCPP_POP_MACROS
+
 #endif /* _LIBCPP_EXPERIMENTAL_NUMERIC */

Modified: vendor/libc++/dist/include/experimental/optional
==============================================================================
--- vendor/libc++/dist/include/experimental/optional	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/optional	Thu Jun  1 20:59:10 2017	(r319467)
@@ -143,7 +143,22 @@ namespace std { namespace experimental { inline namesp
 #include <experimental/__config>
 #include <functional>
 #include <stdexcept>
+#if _LIBCPP_STD_VER > 11
+#include <initializer_list>
+#include <type_traits>
+#include <new>
+#include <__functional_base>
+#include <__debug>
+#endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
 class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
     : public std::logic_error
@@ -160,17 +175,6 @@ _LIBCPP_END_NAMESPACE_EXPERIMENTAL
 
 #if _LIBCPP_STD_VER > 11
 
-#include <initializer_list>
-#include <type_traits>
-#include <new>
-#include <__functional_base>
-#include <__undef_min_max>
-#include <__debug>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
 _LIBCPP_BEGIN_NAMESPACE_LFTS
 
 struct in_place_t {};
@@ -912,5 +916,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<std::experimental::op
 _LIBCPP_END_NAMESPACE_STD
 
 #endif  // _LIBCPP_STD_VER > 11
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_EXPERIMENTAL_OPTIONAL

Modified: vendor/libc++/dist/include/experimental/string_view
==============================================================================
--- vendor/libc++/dist/include/experimental/string_view	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/experimental/string_view	Thu Jun  1 20:59:10 2017	(r319467)
@@ -189,6 +189,9 @@ namespace std {
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
 _LIBCPP_BEGIN_NAMESPACE_LFTS
 
     template<class _CharT, class _Traits = _VSTD::char_traits<_CharT> >
@@ -809,5 +812,7 @@ quoted ( std::experimental::basic_string_view <_CharT,
 #endif
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif // _LIBCPP_LFTS_STRING_VIEW

Modified: vendor/libc++/dist/include/forward_list
==============================================================================
--- vendor/libc++/dist/include/forward_list	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/forward_list	Thu Jun  1 20:59:10 2017	(r319467)
@@ -167,19 +167,20 @@ template <class T, class Allocator>
 */
 
 #include <__config>
-
 #include <initializer_list>
 #include <memory>
 #include <limits>
 #include <iterator>
 #include <algorithm>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _VoidPtr> struct __forward_list_node;
@@ -1718,5 +1719,7 @@ swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp,
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_FORWARD_LIST

Modified: vendor/libc++/dist/include/fstream
==============================================================================
--- vendor/libc++/dist/include/fstream	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/fstream	Thu Jun  1 20:59:10 2017	(r319467)
@@ -171,12 +171,14 @@ typedef basic_fstream<wchar_t> wfstream;
 #include <__locale>
 #include <cstdio>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
@@ -1475,5 +1477,7 @@ basic_fstream<_CharT, _Traits>::close()
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_FSTREAM

Modified: vendor/libc++/dist/include/istream
==============================================================================
--- vendor/libc++/dist/include/istream	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/istream	Thu Jun  1 20:59:10 2017	(r319467)
@@ -162,12 +162,14 @@ template <class charT, class traits, class T>
 #include <__config>
 #include <ostream>
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
@@ -1682,5 +1684,7 @@ _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_
 #endif
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_ISTREAM

Modified: vendor/libc++/dist/include/limits
==============================================================================
--- vendor/libc++/dist/include/limits	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/limits	Thu Jun  1 20:59:10 2017	(r319467)
@@ -102,15 +102,8 @@ template<> class numeric_limits<cv long double>;
 
 */
 #include <__config>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
 #include <type_traits>
 
-#include <__undef_min_max>
-
 #if defined(_LIBCPP_COMPILER_MSVC)
 #include "support/win32/limits_msvc_win32.h"
 #endif // _LIBCPP_MSVCRT
@@ -119,6 +112,14 @@ template<> class numeric_limits<cv long double>;
 #include "support/ibm/limits.h"
 #endif // __IBMCPP__
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 enum float_round_style
@@ -182,14 +183,14 @@ class __libcpp_numeric_limits (protected)
     static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
 };
 
-template <class _Tp, int digits, bool _IsSigned>
+template <class _Tp, int __digits, bool _IsSigned>
 struct __libcpp_compute_min
 {
-    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << digits);
+    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
 };
 
-template <class _Tp, int digits>
-struct __libcpp_compute_min<_Tp, digits, false>
+template <class _Tp, int __digits>
+struct __libcpp_compute_min<_Tp, __digits, false>
 {
     static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
 };
@@ -810,5 +811,7 @@ template <class _Tp>
     _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_LIMITS

Modified: vendor/libc++/dist/include/list
==============================================================================
--- vendor/libc++/dist/include/list	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/list	Thu Jun  1 20:59:10 2017	(r319467)
@@ -177,14 +177,16 @@ template <class T, class Alloc>
 #include <algorithm>
 #include <type_traits>
 
-#include <__undef_min_max>
-
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _VoidPtr> struct __list_node;
@@ -2414,5 +2416,7 @@ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_LIST

Modified: vendor/libc++/dist/include/locale
==============================================================================
--- vendor/libc++/dist/include/locale	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/locale	Thu Jun  1 20:59:10 2017	(r319467)
@@ -192,14 +192,7 @@ template <class charT> class messages_byname;
 #endif
 #include <cstdlib>
 #include <ctime>
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-#include <support/win32/locale_win32.h>
-#elif defined(_NEWLIB_VERSION)
-// FIXME: replace all the uses of _NEWLIB_VERSION with __NEWLIB__ preceded by an
-// include of <sys/cdefs.h> once https://sourceware.org/ml/newlib-cvs/2014-q3/msg00038.html
-// has had a chance to bake for a bit
-#include <support/newlib/xlocale.h>
-#endif
+#include <cstdio>
 #ifdef _LIBCPP_HAS_CATOPEN
 #include <nl_types.h>
 #endif
@@ -208,18 +201,20 @@ template <class charT> class messages_byname;
 #include <Availability.h>
 #endif
 
-#include <__undef_min_max>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
-#endif
-
 #ifdef _LIBCPP_LOCALE__L_EXTENSIONS
 #include <__bsd_locale_defaults.h>
 #else
 #include <__bsd_locale_fallbacks.h>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if defined(__APPLE__) || defined(__FreeBSD__)
@@ -4273,5 +4268,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::__close()
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
 
 #endif  // _LIBCPP_LOCALE

Modified: vendor/libc++/dist/include/memory
==============================================================================
--- vendor/libc++/dist/include/memory	Thu Jun  1 20:59:06 2017	(r319466)
+++ vendor/libc++/dist/include/memory	Thu Jun  1 20:59:10 2017	(r319467)
@@ -658,12 +658,14 @@ void* align(size_t alignment, size_t size, void*& ptr,
 #  include <atomic>
 #endif
 
-#include <__undef_min_max>
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _ValueType>
@@ -1541,7 +1543,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
         {return __a.allocate(__n);}
     _LIBCPP_INLINE_VISIBILITY
     static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint)
-        {return allocate(__a, __n, __hint,
+        {return __allocate(__a, __n, __hint,
             __has_allocate_hint<allocator_type, size_type, const_void_pointer>());}
 
     _LIBCPP_INLINE_VISIBILITY
@@ -1595,7 +1597,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
     _LIBCPP_INLINE_VISIBILITY
     static allocator_type
         select_on_container_copy_construction(const allocator_type& __a)
-            {return select_on_container_copy_construction(
+            {return __select_on_container_copy_construction(
                 __has_select_on_container_copy_construction<const allocator_type>(),
                 __a);}
 
@@ -1694,11 +1696,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
 private:
 
     _LIBCPP_INLINE_VISIBILITY
-    static pointer allocate(allocator_type& __a, size_type __n,
+    static pointer __allocate(allocator_type& __a, size_type __n,
         const_void_pointer __hint, true_type)
         {return __a.allocate(__n, __hint);}
     _LIBCPP_INLINE_VISIBILITY
-    static pointer allocate(allocator_type& __a, size_type __n,
+    static pointer __allocate(allocator_type& __a, size_type __n,
         const_void_pointer, false_type)
         {return __a.allocate(__n);}
 
@@ -1735,11 +1737,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
 
     _LIBCPP_INLINE_VISIBILITY
     static allocator_type
-        select_on_container_copy_construction(true_type, const allocator_type& __a)
+        __select_on_container_copy_construction(true_type, const allocator_type& __a)
             {return __a.select_on_container_copy_construction();}
     _LIBCPP_INLINE_VISIBILITY
     static allocator_type
-        select_on_container_copy_construction(false_type, const allocator_type& __a)
+        __select_on_container_copy_construction(false_type, const allocator_type& __a)
             {return __a;}
 };
 
@@ -3101,28 +3103,28 @@ struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
 struct __destruct_n
 {
 private:

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list