Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2017 19:47:32 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r318374 - in vendor/libc++/dist: . docs include include/experimental include/ext include/support/win32 src src/include src/support/runtime src/support/win32 test/libcxx/input.output/fil...
Message-ID:  <201705161947.v4GJlWlL097184@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue May 16 19:47:31 2017
New Revision: 318374
URL: https://svnweb.freebsd.org/changeset/base/318374

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

Added:
  vendor/libc++/dist/appveyor-reqs-install.cmd
  vendor/libc++/dist/include/support/win32/limits_msvc_win32.h   (contents, props changed)
  vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/
  vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/
  vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/
  vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/template.bitset/includes.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/tuple/tuple.tuple/empty_member.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp   (contents, props changed)
Deleted:
  vendor/libc++/dist/include/support/win32/limits_win32.h
  vendor/libc++/dist/include/support/win32/locale_mgmt_win32.h
  vendor/libc++/dist/include/support/win32/support.h
  vendor/libc++/dist/install-appveyor-reqs.cmd
  vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/fopen.fail.cpp
  vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/lit.local.cfg
  vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/rename.fail.cpp
  vendor/libc++/dist/test/std/strings/string.view/string.view.modifiers/clear.pass.cpp
  vendor/libc++/dist/test/std/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
  vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/refwrap/binary.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/refwrap/unary.pass.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/empty_member.pass.cpp
Modified:
  vendor/libc++/dist/appveyor.yml
  vendor/libc++/dist/docs/CMakeLists.txt
  vendor/libc++/dist/docs/TestingLibcxx.rst
  vendor/libc++/dist/include/__bsd_locale_fallbacks.h
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__locale
  vendor/libc++/dist/include/__mutex_base
  vendor/libc++/dist/include/__threading_support
  vendor/libc++/dist/include/__undef_min_max
  vendor/libc++/dist/include/algorithm
  vendor/libc++/dist/include/ctype.h
  vendor/libc++/dist/include/experimental/numeric
  vendor/libc++/dist/include/ext/hash_map
  vendor/libc++/dist/include/ext/hash_set
  vendor/libc++/dist/include/limits
  vendor/libc++/dist/include/locale
  vendor/libc++/dist/include/memory
  vendor/libc++/dist/include/numeric
  vendor/libc++/dist/include/stdio.h
  vendor/libc++/dist/include/stdlib.h
  vendor/libc++/dist/include/string_view
  vendor/libc++/dist/include/support/win32/locale_win32.h
  vendor/libc++/dist/include/variant
  vendor/libc++/dist/include/wchar.h
  vendor/libc++/dist/src/include/atomic_support.h
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/src/string.cpp
  vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp
  vendor/libc++/dist/src/support/win32/locale_win32.cpp
  vendor/libc++/dist/src/thread.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.type.synop/meta.unary.prop.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/and.assign.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/and.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.fail.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/not.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/or.assign.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/or.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.fail.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.fail.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/xor.assign.pass.cpp
  vendor/libc++/dist/test/std/language.support/support.types/byteops/xor.pass.cpp
  vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
  vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
  vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
  vendor/libc++/dist/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
  vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
  vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
  vendor/libc++/dist/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
  vendor/libc++/dist/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
  vendor/libc++/dist/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
  vendor/libc++/dist/test/std/re/re.traits/lookup_classname.pass.cpp
  vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
  vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
  vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
  vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
  vendor/libc++/dist/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp
  vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
  vendor/libc++/dist/test/std/utilities/template.bitset/includes.pass.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
  vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp
  vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp
  vendor/libc++/dist/test/support/archetypes.hpp
  vendor/libc++/dist/test/support/archetypes.ipp
  vendor/libc++/dist/test/support/filesystem_dynamic_test_helper.py
  vendor/libc++/dist/test/support/filesystem_test_helper.hpp
  vendor/libc++/dist/test/support/msvc_stdlib_force_include.hpp
  vendor/libc++/dist/test/support/test_macros.h
  vendor/libc++/dist/test/support/test_workarounds.h
  vendor/libc++/dist/utils/libcxx/test/config.py
  vendor/libc++/dist/utils/libcxx/test/executor.py
  vendor/libc++/dist/utils/libcxx/test/format.py
  vendor/libc++/dist/www/cxx1z_status.html

Added: vendor/libc++/dist/appveyor-reqs-install.cmd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/appveyor-reqs-install.cmd	Tue May 16 19:47:31 2017	(r318374)
@@ -0,0 +1,53 @@
+@echo on
+
+if NOT EXIST C:\projects\deps (
+  mkdir C:\projects\deps
+)
+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
+)
+if "%CLANG_VERSION%"=="ToT" (
+    START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
+)
+if DEFINED CLANG_VERSION  @set PATH="C:\Program Files\LLVM\bin";%PATH%
+if DEFINED CLANG_VERSION  clang-cl -v
+
+if DEFINED MINGW_PATH rename "C:\Program Files\Git\usr\bin\sh.exe" "sh-ignored.exe"
+if DEFINED MINGW_PATH @set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%"
+if DEFINED MINGW_PATH @set "PATH=%PATH%;%MINGW_PATH%"
+if DEFINED MINGW_PATH g++ -v
+
+::###########################################################################
+:: Install a recent CMake
+::###########################################################################
+if NOT EXIST cmake (
+  appveyor DownloadFile https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.zip -FileName cmake.zip
+  7z x cmake.zip -oC:\projects\deps > nul
+  move C:\projects\deps\cmake-* C:\projects\deps\cmake
+  rm cmake.zip
+)
+@set PATH=C:\projects\deps\cmake\bin;%PATH%
+cmake --version
+
+::###########################################################################
+:: Install Ninja
+::###########################################################################
+if NOT EXIST ninja (
+  appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip -FileName ninja.zip
+  7z x ninja.zip -oC:\projects\deps\ninja > nul
+  rm ninja.zip
+)
+@set PATH=C:\projects\deps\ninja;%PATH%
+ninja --version
+
+::###########################################################################
+:: Setup the cached copy of LLVM
+::###########################################################################
+git clone --depth=1 http://llvm.org/git/llvm.git
+
+@echo off

Modified: vendor/libc++/dist/appveyor.yml
==============================================================================
--- vendor/libc++/dist/appveyor.yml	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/appveyor.yml	Tue May 16 19:47:31 2017	(r318374)
@@ -11,24 +11,35 @@ configuration:
 environment:
   matrix:
     - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+      CMAKE_OPTIONS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
       CLANG_VERSION: ToT
       MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
       MSVC_SETUP_ARG: x86
+      GENERATOR: Ninja
+      MAKE_PROGRAM: ninja
       APPVEYOR_SAVE_CACHE_ON_ERROR: true
     - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      CMAKE_OPTIONS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
       CLANG_VERSION: 4
       MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
       MSVC_SETUP_ARG: x86_amd64
+      GENERATOR: Ninja
+      MAKE_PROGRAM: ninja
+      APPVEYOR_SAVE_CACHE_ON_ERROR: true
+    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+      MINGW_PATH: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
+      GENERATOR: MinGW Makefiles
+      MAKE_PROGRAM: mingw32-make
       APPVEYOR_SAVE_CACHE_ON_ERROR: true
 
 install:
   ############################################################################
   # All external dependencies are installed in C:\projects\deps
   ############################################################################
-  - call "%APPVEYOR_BUILD_FOLDER%\\install-appveyor-reqs.cmd"
+  - call "%APPVEYOR_BUILD_FOLDER%\\appveyor-reqs-install.cmd"
 
 before_build:
-  - call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
+  - if DEFINED MSVC_SETUP_PATH call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
   - cd %APPVEYOR_BUILD_FOLDER%
 
 build_script:
@@ -39,8 +50,7 @@ build_script:
   #############################################################################
   # Configuration Step
   #############################################################################
-  - cmake -G Ninja %extra_cmake_flags%
-    -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
+  - cmake -G "%GENERATOR%" %CMAKE_OPTIONS%
     "-DCMAKE_BUILD_TYPE=%configuration%"
     "-DLLVM_PATH=C:\projects\deps\llvm" -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
     -DLLVM_LIT_ARGS="-sv --show-xfail --show-unsupported"
@@ -49,10 +59,10 @@ build_script:
   #############################################################################
   # Build Step
   #############################################################################
-  - ninja
+  - "%MAKE_PROGRAM%"
 
 test_script:
-  - ninja check-cxx
+  - "%MAKE_PROGRAM% check-cxx"
 
 on_failure:
   - appveyor PushArtifact CMakeFiles/CMakeOutput.log

Modified: vendor/libc++/dist/docs/CMakeLists.txt
==============================================================================
--- vendor/libc++/dist/docs/CMakeLists.txt	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/docs/CMakeLists.txt	Tue May 16 19:47:31 2017	(r318374)
@@ -1,9 +1,9 @@
 
 if (LLVM_ENABLE_SPHINX)
+  include(AddSphinxTarget)
   if (SPHINX_FOUND)
-    include(AddSphinxTarget)
     if (${SPHINX_OUTPUT_HTML})
       add_sphinx_target(html libcxx)
     endif()
   endif()
-endif()
\ No newline at end of file
+endif()

Modified: vendor/libc++/dist/docs/TestingLibcxx.rst
==============================================================================
--- vendor/libc++/dist/docs/TestingLibcxx.rst	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/docs/TestingLibcxx.rst	Tue May 16 19:47:31 2017	(r318374)
@@ -119,7 +119,7 @@ configuration. Passing the option on the
 .. option:: libcxx_site_config=<path/to/lit.site.cfg>
 
   Specify the site configuration to use when running the tests.  This option
-  overrides the enviroment variable LIBCXX_SITE_CONFIG.
+  overrides the environment variable LIBCXX_SITE_CONFIG.
 
 .. option:: cxx_headers=<path/to/headers>
 

Modified: vendor/libc++/dist/include/__bsd_locale_fallbacks.h
==============================================================================
--- vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Tue May 16 19:47:31 2017	(r318374)
@@ -19,27 +19,24 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-typedef _VSTD::remove_pointer<locale_t>::type __use_locale_struct;
-typedef _VSTD::unique_ptr<__use_locale_struct, decltype(&uselocale)> __locale_raii;
-
 inline _LIBCPP_ALWAYS_INLINE
 decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return MB_CUR_MAX;
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 wint_t __libcpp_btowc_l(int __c, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return btowc(__c);
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 int __libcpp_wctob_l(wint_t __c, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return wctob(__c);
 }
 
@@ -47,14 +44,14 @@ inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_wcsnrtombs_l(char *__dest, const wchar_t **__src, size_t __nwc,
                          size_t __len, mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return wcsnrtombs(__dest, __src, __nwc, __len, __ps);
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_wcrtomb_l(char *__s, wchar_t __wc, mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return wcrtomb(__s, __wc, __ps);
 }
 
@@ -62,7 +59,7 @@ inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
                       size_t __len, mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return mbsnrtowcs(__dest, __src, __nms, __len, __ps);
 }
 
@@ -70,28 +67,28 @@ inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_mbrtowc_l(wchar_t *__pwc, const char *__s, size_t __n,
                    mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return mbrtowc(__pwc, __s, __n, __ps);
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 int __libcpp_mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return mbtowc(__pwc, __pmb, __max);
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_mbrlen_l(const char *__s, size_t __n, mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return mbrlen(__s, __n, __ps);
 }
 
 inline _LIBCPP_ALWAYS_INLINE
 lconv *__libcpp_localeconv_l(locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return localeconv();
 }
 
@@ -99,7 +96,7 @@ inline _LIBCPP_ALWAYS_INLINE
 size_t __libcpp_mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
                      mbstate_t *__ps, locale_t __l)
 {
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     return mbsrtowcs(__dest, __src, __len, __ps);
 }
 
@@ -107,7 +104,7 @@ inline
 int __libcpp_snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     int __res = vsnprintf(__s, __n, __format, __va);
     va_end(__va);
     return __res;
@@ -117,7 +114,7 @@ inline
 int __libcpp_asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     int __res = vasprintf(__s, __format, __va);
     va_end(__va);
     return __res;
@@ -127,7 +124,7 @@ inline
 int __libcpp_sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __locale_raii __current( uselocale(__l), uselocale );
+    __libcpp_locale_guard __current(__l);
     int __res = vsscanf(__s, __format, __va);
     va_end(__va);
     return __res;

Modified: vendor/libc++/dist/include/__config
==============================================================================
--- vendor/libc++/dist/include/__config	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__config	Tue May 16 19:47:31 2017	(r318374)
@@ -129,6 +129,12 @@
 
 #define __has_keyword(__x) !(__is_identifier(__x))
 
+#ifdef __has_include
+#define __libcpp_has_include(__x) __has_include(__x)
+#else
+#define __libcpp_has_include(__x) 0
+#endif
+
 #if defined(__clang__)
 #define _LIBCPP_COMPILER_CLANG
 # ifndef __apple_build_version__
@@ -968,7 +974,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
 #  if defined(__GNUC__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
    (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
 #    define _LIBCPP_NO_RTTI
-#  elif defined(_LIBCPP_MSVC) && !defined(_CPPRTTI)
+#  elif defined(_LIBCPP_COMPILER_MSVC) && !defined(_CPPRTTI)
 #    define _LIBCPP_NO_RTTI
 #  endif
 #endif
@@ -980,6 +986,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
 // Thread API
 #if !defined(_LIBCPP_HAS_NO_THREADS) && \
     !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
+    !defined(_LIBCPP_HAS_THREAD_API_WIN32) && \
     !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
 # if defined(__FreeBSD__) || \
     defined(__Fuchsia__) || \
@@ -987,7 +994,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
     defined(__linux__) || \
     defined(__APPLE__) || \
     defined(__CloudABI__) || \
-    defined(__sun__)
+    defined(__sun__) || \
+    (defined(__MINGW32__) && __libcpp_has_include(<pthread.h>))
 #   define _LIBCPP_HAS_THREAD_API_PTHREAD
 # elif defined(_LIBCPP_WIN32API)
 #  define _LIBCPP_HAS_THREAD_API_WIN32

Modified: vendor/libc++/dist/include/__locale
==============================================================================
--- vendor/libc++/dist/include/__locale	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__locale	Tue May 16 19:47:31 2017	(r318374)
@@ -49,6 +49,25 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if !defined(_LIBCPP_LOCALE__L_EXTENSIONS) || defined(_LIBCPP_MSVCRT)
+struct __libcpp_locale_guard {
+  _LIBCPP_INLINE_VISIBILITY
+  __libcpp_locale_guard(locale_t& __loc) : __old_loc_(uselocale(__loc)) {}
+
+  _LIBCPP_INLINE_VISIBILITY
+  ~__libcpp_locale_guard() {
+    if (__old_loc_)
+      uselocale(__old_loc_);
+  }
+
+  locale_t __old_loc_;
+private:
+  __libcpp_locale_guard(__libcpp_locale_guard const&);
+  __libcpp_locale_guard& operator=(__libcpp_locale_guard const&);
+};
+#endif
+
+
 class _LIBCPP_TYPE_VIS locale;
 
 template <class _Facet>

Modified: vendor/libc++/dist/include/__mutex_base
==============================================================================
--- vendor/libc++/dist/include/__mutex_base	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__mutex_base	Tue May 16 19:47:31 2017	(r318374)
@@ -15,6 +15,7 @@
 #include <chrono>
 #include <system_error>
 #include <__threading_support>
+#include <__undef_min_max>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header

Modified: vendor/libc++/dist/include/__threading_support
==============================================================================
--- vendor/libc++/dist/include/__threading_support	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__threading_support	Tue May 16 19:47:31 2017	(r318374)
@@ -30,6 +30,7 @@
 #include <Windows.h>
 #include <process.h>
 #include <fibersapi.h>
+#include <__undef_min_max>
 #endif
 
 #if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \

Modified: vendor/libc++/dist/include/__undef_min_max
==============================================================================
--- vendor/libc++/dist/include/__undef_min_max	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/__undef_min_max	Tue May 16 19:47:31 2017	(r318374)
@@ -10,7 +10,7 @@
 
 #ifdef min
 #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
-#if defined(_LIBCPP_MSVC)
+#if defined(_LIBCPP_WARNING)
 _LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "
                 "before any Windows header. #undefing min")
 #else
@@ -22,7 +22,7 @@ _LIBCPP_WARNING("macro min is incompatib
 
 #ifdef max
 #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
-#if defined(_LIBCPP_MSVC)
+#if defined(_LIBCPP_WARNING)
 _LIBCPP_WARNING("macro max is incompatible with C++.  Try #define NOMINMAX "
                 "before any Windows header. #undefing max")
 #else

Modified: vendor/libc++/dist/include/algorithm
==============================================================================
--- vendor/libc++/dist/include/algorithm	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/algorithm	Tue May 16 19:47:31 2017	(r318374)
@@ -644,8 +644,8 @@ template <class BidirectionalIterator, c
 #if defined(__IBMCPP__)
 #include "support/ibm/support.h"
 #endif
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-#include "support/win32/support.h"
+#if defined(_LIBCPP_COMPILER_MSVC)
+#include <intrin.h>
 #endif
 
 #include <__undef_min_max>
@@ -783,51 +783,132 @@ struct __debug_less
 
 // Precondition:  __x != 0
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned
-__ctz(unsigned __x)
-{
+unsigned __ctz(unsigned __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned>(__builtin_ctz(__x));
+#else
+  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+  static_assert(sizeof(unsigned long) == 4, "");
+  unsigned long where;
+  // Search from LSB to MSB for first set bit.
+  // Returns zero if no set bit is found.
+  if (_BitScanForward(&where, mask))
+    return where;
+  return 32;
+#endif
 }
 
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned long
-__ctz(unsigned long __x)
-{
+unsigned long __ctz(unsigned long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned long>(__builtin_ctzl(__x));
+#else
+    static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
+    return __ctz(static_cast<unsigned>(__x));
+#endif
 }
 
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned long long
-__ctz(unsigned long long __x)
-{
+unsigned long long __ctz(unsigned long long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned long long>(__builtin_ctzll(__x));
+#else
+    unsigned long where;
+// Search from LSB to MSB for first set bit.
+// Returns zero if no set bit is found.
+#if defined(_LIBCPP_HAS_BITSCAN64)
+    (defined(_M_AMD64) || defined(__x86_64__))
+  if (_BitScanForward64(&where, mask))
+    return static_cast<int>(where);
+#else
+  // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
+  // Scan the Low Word.
+  if (_BitScanForward(&where, static_cast<unsigned long>(mask)))
+    return where;
+  // Scan the High Word.
+  if (_BitScanForward(&where, static_cast<unsigned long>(mask >> 32)))
+    return where + 32; // Create a bit offset from the LSB.
+#endif
+  return 64;
+#endif // _LIBCPP_COMPILER_MSVC
 }
 
 // Precondition:  __x != 0
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned
-__clz(unsigned __x)
-{
+unsigned __clz(unsigned __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned>(__builtin_clz(__x));
+#else
+  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+  static_assert(sizeof(unsigned long) == 4, "");
+  unsigned long where;
+  // Search from LSB to MSB for first set bit.
+  // Returns zero if no set bit is found.
+  if (_BitScanReverse(&where, mask))
+    return 31 - where;
+  return 32; // Undefined Behavior.
+#endif
 }
 
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned long
-__clz(unsigned long __x)
-{
+unsigned long __clz(unsigned long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned long>(__builtin_clzl (__x));
+#else
+    static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+    return __clz(static_cast<unsigned>(__x));
+#endif
 }
 
 inline _LIBCPP_INLINE_VISIBILITY
-unsigned long long
-__clz(unsigned long long __x)
-{
+unsigned long long __clz(unsigned long long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
     return static_cast<unsigned long long>(__builtin_clzll(__x));
+#else
+  unsigned long where;
+// BitScanReverse scans from MSB to LSB for first set bit.
+// Returns 0 if no set bit is found.
+#if defined(_LIBCPP_HAS_BITSCAN64)
+  if (_BitScanReverse64(&where, mask))
+    return static_cast<int>(63 - where);
+#else
+  // Scan the high 32 bits.
+  if (_BitScanReverse(&where, static_cast<unsigned long>(mask >> 32)))
+    return 63 - (where + 32); // Create a bit offset from the MSB.
+  // Scan the low 32 bits.
+  if (_BitScanReverse(&where, static_cast<unsigned long>(mask)))
+    return 63 - where;
+#endif
+  return 64; // Undefined Behavior.
+#endif // _LIBCPP_COMPILER_MSVC
+}
+
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
+  return __builtin_popcount  (__x);
+#else
+  static_assert(sizeof(unsigned) == 4, "");
+  return __popcnt(__x);
+#endif
+}
+
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
+  return __builtin_popcountl (__x);
+#else
+  static_assert(sizeof(unsigned long) == 4, "");
+  return __popcnt(__x);
+#endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned           __x) {return __builtin_popcount  (__x);}
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned      long __x) {return __builtin_popcountl (__x);}
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {return __builtin_popcountll(__x);}
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {
+#ifndef _LIBCPP_COMPILER_MSVC
+  return __builtin_popcountll(__x);
+#else
+  static_assert(sizeof(unsigned long long) == 8, "");
+  return __popcnt64(__x);
+#endif
+}
 
 // all_of
 

Modified: vendor/libc++/dist/include/ctype.h
==============================================================================
--- vendor/libc++/dist/include/ctype.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/ctype.h	Tue May 16 19:47:31 2017	(r318374)
@@ -40,15 +40,6 @@ int toupper(int c);
 
 #ifdef __cplusplus
 
-#if defined(_LIBCPP_MSVCRT)
-// We support including .h headers inside 'extern "C"' contexts, so switch
-// back to C++ linkage before including these C++ headers.
-extern "C++" {
-  #include "support/win32/support.h"
-  #include "support/win32/locale_win32.h"
-}
-#endif // _LIBCPP_MSVCRT
-
 #undef isalnum
 #undef isalpha
 #undef isblank

Modified: vendor/libc++/dist/include/experimental/numeric
==============================================================================
--- vendor/libc++/dist/include/experimental/numeric	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/experimental/numeric	Tue May 16 19:47:31 2017	(r318374)
@@ -66,11 +66,11 @@ struct __abs<_Result, _Source, false> {
 
 
 template<class _Tp>
-_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
-_Tp __gcd(_Tp __m, _Tp __n)
+_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN
+inline _Tp __gcd(_Tp __m, _Tp __n)
 {
     static_assert((!is_signed<_Tp>::value), "" );
-    return __n == 0 ? __m : __gcd<_Tp>(__n, __m % __n);
+    return __n == 0 ? __m : _VSTD_LFTS_V2::__gcd<_Tp>(__n, __m % __n);
 }
 
 
@@ -84,8 +84,9 @@ gcd(_Tp __m, _Up __n)
     static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
     using _Rp = common_type_t<_Tp,_Up>;
     using _Wp = make_unsigned_t<_Rp>;
-    return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
-                                  static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
+    return static_cast<_Rp>(_VSTD_LFTS_V2::__gcd(
+      static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
+      static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
 }
 
 template<class _Tp, class _Up>
@@ -100,7 +101,7 @@ lcm(_Tp __m, _Up __n)
         return 0;
 
     using _Rp = common_type_t<_Tp,_Up>;
-    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
+    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / _VSTD_LFTS_V2::gcd(__m, __n);
     _Rp __val2 = __abs<_Rp, _Up>()(__n);
     _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
     return __val1 * __val2;

Modified: vendor/libc++/dist/include/ext/hash_map
==============================================================================
--- vendor/libc++/dist/include/ext/hash_map	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/ext/hash_map	Tue May 16 19:47:31 2017	(r318374)
@@ -207,7 +207,7 @@ template <class Key, class T, class Hash
 #include <ext/__hash>
 
 #if __DEPRECATED
-#if defined(_LIBCPP_MSVC)
+#if defined(_LIBCPP_WARNING)
     _LIBCPP_WARNING("Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>")
 #else
 #   warning Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>

Modified: vendor/libc++/dist/include/ext/hash_set
==============================================================================
--- vendor/libc++/dist/include/ext/hash_set	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/ext/hash_set	Tue May 16 19:47:31 2017	(r318374)
@@ -199,7 +199,7 @@ template <class Value, class Hash, class
 #include <ext/__hash>
 
 #if __DEPRECATED
-#if defined(_LIBCPP_MSVC)
+#if defined(_LIBCPP_WARNING)
     _LIBCPP_WARNING("Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>")
 #else
 #   warning Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>

Modified: vendor/libc++/dist/include/limits
==============================================================================
--- vendor/libc++/dist/include/limits	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/limits	Tue May 16 19:47:31 2017	(r318374)
@@ -111,8 +111,8 @@ template<> class numeric_limits<cv long 
 
 #include <__undef_min_max>
 
-#if defined(_LIBCPP_MSVCRT)
-#include "support/win32/limits_win32.h"
+#if defined(_LIBCPP_COMPILER_MSVC)
+#include "support/win32/limits_msvc_win32.h"
 #endif // _LIBCPP_MSVCRT
 
 #if defined(__IBMCPP__)

Modified: vendor/libc++/dist/include/locale
==============================================================================
--- vendor/libc++/dist/include/locale	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/locale	Tue May 16 19:47:31 2017	(r318374)
@@ -233,9 +233,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #define __cloc_defined
 #endif
 
-typedef _VSTD::remove_pointer<locale_t>::type __locale_struct;
-typedef _VSTD::unique_ptr<__locale_struct, decltype(&freelocale)> __locale_unique_ptr;
-
 // __scan_keyword
 // Scans [__b, __e) until a match is found in the basic_strings range
 //  [__kb, __ke) or until it can be shown that there is no match in [__kb, __ke).

Modified: vendor/libc++/dist/include/memory
==============================================================================
--- vendor/libc++/dist/include/memory	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/memory	Tue May 16 19:47:31 2017	(r318374)
@@ -996,11 +996,11 @@ struct __rebind_pointer {
 
 // allocator_traits
 
-namespace __has_pointer_type_imp
+struct __has_pointer_type_imp
 {
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::pointer* = 0);
-}
+};
 
 template <class _Tp>
 struct __has_pointer_type
@@ -3924,7 +3924,10 @@ private:
 
     template <class _Yp, class _OrigPtr>
         _LIBCPP_INLINE_VISIBILITY
-        void
+        typename enable_if<is_convertible<_OrigPtr*,
+                                          const enable_shared_from_this<_Yp>*
+        >::value,
+            void>::type
         __enable_weak_this(const enable_shared_from_this<_Yp>* __e,
                            _OrigPtr* __ptr) _NOEXCEPT
         {
@@ -3943,6 +3946,7 @@ private:
     template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
 };
 
+
 template<class _Tp>
 inline
 _LIBCPP_CONSTEXPR

Modified: vendor/libc++/dist/include/numeric
==============================================================================
--- vendor/libc++/dist/include/numeric	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/numeric	Tue May 16 19:47:31 2017	(r318374)
@@ -222,11 +222,11 @@ struct __abs<_Result, _Source, false> {
 
 
 template<class _Tp>
-_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN
 _Tp __gcd(_Tp __m, _Tp __n)
 {
     static_assert((!is_signed<_Tp>::value), "");
-    return __n == 0 ? __m : __gcd<_Tp>(__n, __m % __n);
+    return __n == 0 ? __m : _VSTD::__gcd<_Tp>(__n, __m % __n);
 }
 
 
@@ -240,8 +240,9 @@ gcd(_Tp __m, _Up __n)
     static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
     using _Rp = common_type_t<_Tp,_Up>;
     using _Wp = make_unsigned_t<_Rp>;
-    return static_cast<_Rp>(__gcd(static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
-                                  static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
+    return static_cast<_Rp>(_VSTD::__gcd(
+        static_cast<_Wp>(__abs<_Rp, _Tp>()(__m)),
+        static_cast<_Wp>(__abs<_Rp, _Up>()(__n))));
 }
 
 template<class _Tp, class _Up>
@@ -256,7 +257,7 @@ lcm(_Tp __m, _Up __n)
         return 0;
 
     using _Rp = common_type_t<_Tp,_Up>;
-    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / gcd(__m, __n);
+    _Rp __val1 = __abs<_Rp, _Tp>()(__m) / _VSTD::gcd(__m, __n);
     _Rp __val2 = __abs<_Rp, _Up>()(__n);
     _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
     return __val1 * __val2;

Modified: vendor/libc++/dist/include/stdio.h
==============================================================================
--- vendor/libc++/dist/include/stdio.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/stdio.h	Tue May 16 19:47:31 2017	(r318374)
@@ -111,8 +111,9 @@ void perror(const char* s);
 
 // snprintf
 #if defined(_LIBCPP_MSVCRT)
-extern "C++" {
-#include "support/win32/support.h"
+extern "C" {
+int vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
+int asprintf(char **sptr, const char *__restrict fmt, ...);
 }
 #endif
 

Modified: vendor/libc++/dist/include/stdlib.h
==============================================================================
--- vendor/libc++/dist/include/stdlib.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/stdlib.h	Tue May 16 19:47:31 2017	(r318374)
@@ -97,10 +97,6 @@ void *aligned_alloc(size_t alignment, si
 
 extern "C++" {
 
-#ifdef _LIBCPP_MSVCRT
-#include "support/win32/locale_win32.h"
-#endif // _LIBCPP_MSVCRT
-
 #undef abs
 #undef div
 #undef labs

Modified: vendor/libc++/dist/include/string_view
==============================================================================
--- vendor/libc++/dist/include/string_view	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/string_view	Tue May 16 19:47:31 2017	(r318374)
@@ -103,7 +103,6 @@ namespace std {
       constexpr const_pointer data() const noexcept;
 
       // 7.7, basic_string_view modifiers
-      constexpr void clear() noexcept;
       constexpr void remove_prefix(size_type n);
       constexpr void remove_suffix(size_type n);
       constexpr void swap(basic_string_view& s) noexcept;
@@ -293,13 +292,6 @@ public:
 
 	// [string.view.modifiers], modifiers:
 	_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-	void clear() _NOEXCEPT
-	{
-		__data = nullptr;
-		__size = 0;
-	}
-
-	_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 	void remove_prefix(size_type __n) _NOEXCEPT
 	{
 		_LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");

Added: vendor/libc++/dist/include/support/win32/limits_msvc_win32.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/include/support/win32/limits_msvc_win32.h	Tue May 16 19:47:31 2017	(r318374)
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+//===------------------ support/win32/limits_msvc_win32.h -----------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
+#define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
+
+#if !defined(_LIBCPP_MSVCRT)
+#error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
+#endif
+#if defined(__clang__)
+#error "This header should only be included when using Microsofts C1XX frontend"
+#endif
+
+#include <limits.h> // CHAR_BIT
+#include <float.h> // limit constants
+#include <math.h> // HUGE_VAL
+#include <ymath.h> // internal MSVC header providing the needed functionality
+
+#define __CHAR_BIT__       CHAR_BIT
+
+#define __FLT_MANT_DIG__   FLT_MANT_DIG
+#define __FLT_DIG__        FLT_DIG
+#define __FLT_RADIX__      FLT_RADIX
+#define __FLT_MIN_EXP__    FLT_MIN_EXP
+#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
+#define __FLT_MAX_EXP__    FLT_MAX_EXP
+#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
+#define __FLT_MIN__        FLT_MIN
+#define __FLT_MAX__        FLT_MAX
+#define __FLT_EPSILON__    FLT_EPSILON
+// predefined by MinGW GCC
+#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
+
+#define __DBL_MANT_DIG__   DBL_MANT_DIG
+#define __DBL_DIG__        DBL_DIG
+#define __DBL_RADIX__      DBL_RADIX
+#define __DBL_MIN_EXP__    DBL_MIN_EXP
+#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
+#define __DBL_MAX_EXP__    DBL_MAX_EXP
+#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
+#define __DBL_MIN__        DBL_MIN
+#define __DBL_MAX__        DBL_MAX
+#define __DBL_EPSILON__    DBL_EPSILON
+// predefined by MinGW GCC
+#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
+
+#define __LDBL_MANT_DIG__   LDBL_MANT_DIG
+#define __LDBL_DIG__        LDBL_DIG
+#define __LDBL_RADIX__      LDBL_RADIX
+#define __LDBL_MIN_EXP__    LDBL_MIN_EXP
+#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
+#define __LDBL_MAX_EXP__    LDBL_MAX_EXP
+#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
+#define __LDBL_MIN__        LDBL_MIN
+#define __LDBL_MAX__        LDBL_MAX
+#define __LDBL_EPSILON__    LDBL_EPSILON
+// predefined by MinGW GCC
+#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+
+// __builtin replacements/workarounds
+#define __builtin_huge_vall()    _LInf._Long_double
+#define __builtin_nanl(__dummmy) _LNan._Long_double
+#define __builtin_nansl(__dummy) _LSnan._Long_double
+
+#endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H

Modified: vendor/libc++/dist/include/support/win32/locale_win32.h
==============================================================================
--- vendor/libc++/dist/include/support/win32/locale_win32.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/support/win32/locale_win32.h	Tue May 16 19:47:31 2017	(r318374)
@@ -12,9 +12,30 @@
 #define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
 
 #include <__config>
-#include "support/win32/support.h"
-#include "support/win32/locale_mgmt_win32.h"
 #include <stdio.h>
+#include <xlocinfo.h> // _locale_t
+
+#define LC_COLLATE_MASK _M_COLLATE
+#define LC_CTYPE_MASK _M_CTYPE
+#define LC_MONETARY_MASK _M_MONETARY
+#define LC_NUMERIC_MASK _M_NUMERIC
+#define LC_TIME_MASK _M_TIME
+#define LC_MESSAGES_MASK _M_MESSAGES
+#define LC_ALL_MASK (  LC_COLLATE_MASK \
+                     | LC_CTYPE_MASK \
+                     | LC_MESSAGES_MASK \
+                     | LC_MONETARY_MASK \
+                     | LC_NUMERIC_MASK \
+                     | LC_TIME_MASK )
+
+#define locale_t _locale_t
+
+// Locale management functions
+#define freelocale _free_locale
+// FIXME: base currently unused. Needs manual work to construct the new locale
+locale_t newlocale( int mask, const char * locale, locale_t base );
+locale_t uselocale( locale_t newloc );
+
 
 lconv *localeconv_l( locale_t loc );
 size_t mbrlen_l( const char *__restrict s, size_t n,
@@ -88,7 +109,6 @@ _LIBCPP_FUNC_VIS int snprintf_l(char *re
 _LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... );
 _LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
 
-
 // not-so-pressing FIXME: use locale to determine blank characters
 inline int isblank_l( int c, locale_t /*loc*/ )
 {
@@ -99,10 +119,4 @@ inline int iswblank_l( wint_t c, locale_
     return ( c == L' ' || c == L'\t' );
 }
 
-#if defined(_LIBCPP_MSVCRT)
-inline int isblank( int c, locale_t /*loc*/ )
-{ return ( c == ' ' || c == '\t' ); }
-inline int iswblank( wint_t c, locale_t /*loc*/ )
-{ return ( c == L' ' || c == L'\t' ); }
-#endif // _LIBCPP_MSVCRT
 #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H

Modified: vendor/libc++/dist/include/variant
==============================================================================
--- vendor/libc++/dist/include/variant	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/variant	Tue May 16 19:47:31 2017	(r318374)
@@ -425,30 +425,21 @@ struct __base {
     constexpr auto __fmatrix =
         __make_fmatrix<_Visitor&&,
                        decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
-    const size_t __indices[] = {__vs.index()...};
-    return __at(__fmatrix, __indices)(_VSTD::forward<_Visitor>(__visitor),
-                                      _VSTD::forward<_Vs>(__vs).__as_base()...);
+    return __at(__fmatrix, __vs.index()...)(
+        _VSTD::forward<_Visitor>(__visitor),
+        _VSTD::forward<_Vs>(__vs).__as_base()...);
   }
 
 private:
   template <class _Tp>
   inline _LIBCPP_INLINE_VISIBILITY
-  static constexpr const _Tp& __at_impl(const _Tp& __elem, const size_t*) {
-    return __elem;
-  }
-
-  template <class _Tp, size_t _Np>
-  inline _LIBCPP_INLINE_VISIBILITY
-  static constexpr auto&& __at_impl(const array<_Tp, _Np>& __elems,
-                                    const size_t* __index) {
-    return __at_impl(__elems[*__index], __index + 1);
-  }
+  static constexpr const _Tp& __at(const _Tp& __elem) { return __elem; }
 
-  template <class _Tp, size_t _Np, size_t _Ip>
+  template <class _Tp, size_t _Np, typename... _Indices>
   inline _LIBCPP_INLINE_VISIBILITY
   static constexpr auto&& __at(const array<_Tp, _Np>& __elems,
-                               const size_t (&__indices)[_Ip]) {
-    return __at_impl(__elems, begin(__indices));
+                               size_t __index, _Indices... __indices) {
+    return __at(__elems[__index], __indices...);
   }
 
   template <class _Fp, class... _Fs>
@@ -1140,7 +1131,7 @@ public:
       : __impl(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}
 
   template <size_t _Ip, class... _Args,
-            enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
+            class = enable_if_t<(_Ip < sizeof...(_Types)), int>,
             class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
             enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
   inline _LIBCPP_INLINE_VISIBILITY

Modified: vendor/libc++/dist/include/wchar.h
==============================================================================
--- vendor/libc++/dist/include/wchar.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/include/wchar.h	Tue May 16 19:47:31 2017	(r318374)
@@ -166,9 +166,12 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP
 }
 #endif
 
-#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT) || defined(__MINGW32__))
-extern "C++" {
-#include <support/win32/support.h> // pull in *swprintf defines
+#if defined(__cplusplus) && defined(_LIBCPP_MSVCRT)
+extern "C" {
+size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
+                  size_t nmc, size_t len, mbstate_t *__restrict ps);
+size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
+                  size_t nwc, size_t len, mbstate_t *__restrict ps);
 }  // extern "C++"
 #endif  // __cplusplus && _LIBCPP_MSVCRT
 

Modified: vendor/libc++/dist/src/include/atomic_support.h
==============================================================================
--- vendor/libc++/dist/src/include/atomic_support.h	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/src/include/atomic_support.h	Tue May 16 19:47:31 2017	(r318374)
@@ -29,7 +29,7 @@
 #endif
 
 #if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
-# if defined(_LIBCPP_MSVC)
+# if defined(_LIBCPP_WARNING)
     _LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
 # else
 #   warning Building libc++ without __atomic builtins is unsupported

Modified: vendor/libc++/dist/src/locale.cpp
==============================================================================
--- vendor/libc++/dist/src/locale.cpp	Tue May 16 19:47:28 2017	(r318373)
+++ vendor/libc++/dist/src/locale.cpp	Tue May 16 19:47:31 2017	(r318374)
@@ -45,6 +45,24 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+struct __libcpp_unique_locale {
+  __libcpp_unique_locale(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) {}
+
+  ~__libcpp_unique_locale() {
+    if (__loc_)
+      freelocale(__loc_);
+  }
+
+  explicit operator bool() const { return __loc_; }
+

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705161947.v4GJlWlL097184>