svn commit: r320019 - in vendor/libc++/dist: benchmarks include include/experimental include/support/newlib lib src src/experimental/filesystem test/libcxx test/libcxx/algorithms/alg.modifying.oper...

Dimitry Andric dim at FreeBSD.org
Fri Jun 16 21:04:08 UTC 2017


Author: dim
Date: Fri Jun 16 21:04:04 2017
New Revision: 320019
URL: https://svnweb.freebsd.org/changeset/base/320019

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

Added:
  vendor/libc++/dist/benchmarks/stringstream.bench.cpp   (contents, props changed)
  vendor/libc++/dist/src/vector.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/include_as_c.sh.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/utility/__is_inplace_type.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.helper/
  vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/
  vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp   (contents, props changed)
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp   (contents, props changed)
Deleted:
  vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp
  vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter_init_op.pass.cpp
  vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_iter_iter_iter_init_bop_uop.pass.cpp
Modified:
  vendor/libc++/dist/include/__bsd_locale_fallbacks.h
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__functional_03
  vendor/libc++/dist/include/__functional_base
  vendor/libc++/dist/include/array
  vendor/libc++/dist/include/experimental/coroutine
  vendor/libc++/dist/include/fstream
  vendor/libc++/dist/include/functional
  vendor/libc++/dist/include/locale
  vendor/libc++/dist/include/memory
  vendor/libc++/dist/include/numeric
  vendor/libc++/dist/include/support/newlib/xlocale.h
  vendor/libc++/dist/include/utility
  vendor/libc++/dist/include/variant
  vendor/libc++/dist/lib/CMakeLists.txt
  vendor/libc++/dist/src/experimental/filesystem/operations.cpp
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
  vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/map/map.ops/count0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/map/map.ops/find0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
  vendor/libc++/dist/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
  vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
  vendor/libc++/dist/test/support/allocators.h
  vendor/libc++/dist/test/support/is_transparent.h
  vendor/libc++/dist/utils/libcxx/test/config.py

Added: vendor/libc++/dist/benchmarks/stringstream.bench.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/benchmarks/stringstream.bench.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -0,0 +1,38 @@
+#include "benchmark/benchmark_api.h"
+
+#include <sstream>
+double __attribute__((noinline)) istream_numbers();
+
+double istream_numbers() {
+  const char *a[] = {
+    "-6  69 -71  2.4882e-02 -100 101 -2.00005 5000000 -50000000",
+    "-25 71   7 -9.3262e+01 -100 101 -2.00005 5000000 -50000000",
+    "-14 53  46 -6.7026e-02 -100 101 -2.00005 5000000 -50000000"
+  };
+
+  int a1, a2, a3, a4, a5, a6, a7;
+  double f1 = 0.0, f2 = 0.0, q = 0.0;
+  for (int i=0; i < 3; i++) {
+    std::istringstream s(a[i]);
+    s >> a1
+      >> a2
+      >> a3
+      >> f1
+      >> a4
+      >> a5
+      >> f2
+      >> a6
+      >> a7;
+    q += (a1 + a2 + a3 + a4 + a5 + a6 + a7 + f1 + f2)/1000000;
+  }
+  return q;
+}
+
+static void BM_Istream_numbers(benchmark::State &state) {
+  double i = 0;
+  while (state.KeepRunning())
+    benchmark::DoNotOptimize(i += istream_numbers());
+}
+
+BENCHMARK(BM_Istream_numbers)->RangeMultiplier(2)->Range(1024, 4096);
+BENCHMARK_MAIN()

Modified: vendor/libc++/dist/include/__bsd_locale_fallbacks.h
==============================================================================
--- vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/__bsd_locale_fallbacks.h	Fri Jun 16 21:04:04 2017	(r320019)
@@ -15,6 +15,7 @@
 #define _LIBCPP_BSD_LOCALE_FALLBACKS_DEFAULTS_H
 
 #include <stdlib.h>
+#include <stdarg.h>
 #include <memory>
 
 _LIBCPP_BEGIN_NAMESPACE_STD

Modified: vendor/libc++/dist/include/__config
==============================================================================
--- vendor/libc++/dist/include/__config	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/__config	Fri Jun 16 21:04:04 2017	(r320019)
@@ -76,6 +76,9 @@
 // its vtable and typeinfo to libc++ rather than having all other libraries
 // using that class define their own copies.
 #define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+
+// Enable optimized version of __do_get_(un)signed which avoids redundant copies.
+#define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
 #elif _LIBCPP_ABI_VERSION == 1
 #if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
 // Enable compiling copies of now inline methods into the dylib to support
@@ -289,7 +292,7 @@
 # endif
 #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
 
-#if __has_attribute(__no_sanitize__)
+#if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
 #define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
 #else
 #define _LIBCPP_NO_CFI
@@ -1132,8 +1135,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_
 # define _LIBCPP_HAS_NO_COROUTINES
 #endif
 
-#endif // __cplusplus
-
 // Decide whether to use availability macros.
 #if !defined(_LIBCPP_BUILDING_LIBRARY) &&                                      \
     !defined(_LIBCPP_DISABLE_AVAILABILITY) &&                                  \
@@ -1236,5 +1237,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_
       _Pragma("pop_macro(\"max\")")
 # endif
 #endif // defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO)
+
+
+#endif // __cplusplus
 
 #endif // _LIBCPP_CONFIG

Modified: vendor/libc++/dist/include/__functional_03
==============================================================================
--- vendor/libc++/dist/include/__functional_03	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/__functional_03	Fri Jun 16 21:04:04 2017	(r320019)
@@ -704,7 +704,7 @@ function<_Rp()>::target()
 {
     if (__f_ == 0)
         return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp>
@@ -980,7 +980,7 @@ function<_Rp(_A0)>::target()
 {
     if (__f_ == 0)
         return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp, class _A0>
@@ -1256,7 +1256,7 @@ function<_Rp(_A0, _A1)>::target()
 {
     if (__f_ == 0)
         return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp, class _A0, class _A1>
@@ -1532,7 +1532,7 @@ function<_Rp(_A0, _A1, _A2)>::target()
 {
     if (__f_ == 0)
         return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp, class _A0, class _A1, class _A2>

Modified: vendor/libc++/dist/include/__functional_base
==============================================================================
--- vendor/libc++/dist/include/__functional_base	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/__functional_base	Fri Jun 16 21:04:04 2017	(r320019)
@@ -548,16 +548,13 @@ template <class _Tp> void cref(const _Tp&&) = delete;
 #endif
 
 #if _LIBCPP_STD_VER > 11
-template <class _Tp1, class _Tp2 = void>
-struct __is_transparent
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_transparent* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp1>(0)) == 1;
-};
+template <class _Tp, class, class = void>
+struct __is_transparent : false_type {};
+
+template <class _Tp, class _Up>
+struct __is_transparent<_Tp, _Up,  
+                        typename __void_t<typename _Tp::is_transparent>::type>
+   : true_type {};
 #endif
 
 // allocator_arg_t

Modified: vendor/libc++/dist/include/array
==============================================================================
--- vendor/libc++/dist/include/array	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/array	Fri Jun 16 21:04:04 2017	(r320019)
@@ -296,6 +296,7 @@ class _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size
 template <size_t _Ip, class _Tp, size_t _Size>
 class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
 {
+    static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
 public:
     typedef _Tp type;
 };

Modified: vendor/libc++/dist/include/experimental/coroutine
==============================================================================
--- vendor/libc++/dist/include/experimental/coroutine	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/experimental/coroutine	Fri Jun 16 21:04:04 2017	(r320019)
@@ -250,9 +250,11 @@ class _LIBCPP_TEMPLATE_VIS coroutine_handle : public c
 
     _LIBCPP_ALWAYS_INLINE
     static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT {
+        typedef typename remove_cv<_Promise>::type _RawPromise;
         coroutine_handle __tmp;
-        __tmp.__handle_ = __builtin_coro_promise(_VSTD::addressof(__promise),
-                                                 __alignof(_Promise), true);
+        __tmp.__handle_ = __builtin_coro_promise(
+            _VSTD::addressof(const_cast<_RawPromise&>(__promise)),
+             __alignof(_Promise), true);
         return __tmp;
     }
 };

Modified: vendor/libc++/dist/include/fstream
==============================================================================
--- vendor/libc++/dist/include/fstream	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/fstream	Fri Jun 16 21:04:04 2017	(r320019)
@@ -617,7 +617,7 @@ basic_filebuf<_CharT, _Traits>::underflow()
                                  static_cast<size_t>(__extbufend_ - __extbufnext_));
             codecvt_base::result __r;
             __st_last_ = __st_;
-            size_t __nr = fread((void*)__extbufnext_, 1, __nmemb, __file_);
+            size_t __nr = fread((void*) const_cast<char *>(__extbufnext_), 1, __nmemb, __file_);
             if (__nr != 0)
             {
                 if (!__cv_)
@@ -630,7 +630,8 @@ basic_filebuf<_CharT, _Traits>::underflow()
                                        this->eback() + __ibs_, __inext);
                 if (__r == codecvt_base::noconv)
                 {
-                    this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, (char_type*)__extbufend_);
+                    this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, 
+                                          (char_type*)const_cast<char *>(__extbufend_));
                     __c = traits_type::to_int_type(*this->gptr());
                 }
                 else if (__inext != this->eback() + __unget_sz)
@@ -722,7 +723,7 @@ basic_filebuf<_CharT, _Traits>::overflow(int_type __c)
                         return traits_type::eof();
                     if (__r == codecvt_base::partial)
                     {
-                        this->setp((char_type*)__e, this->pptr());
+                        this->setp(const_cast<char_type*>(__e), this->pptr());
                         this->pbump(this->epptr() - this->pbase());
                     }
                 }

Modified: vendor/libc++/dist/include/functional
==============================================================================
--- vendor/libc++/dist/include/functional	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/functional	Fri Jun 16 21:04:04 2017	(r320019)
@@ -1941,8 +1941,8 @@ _Tp*
 function<_Rp(_ArgTypes...)>::target() _NOEXCEPT
 {
     if (__f_ == 0)
-        return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+        return nullptr;
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1951,7 +1951,7 @@ const _Tp*
 function<_Rp(_ArgTypes...)>::target() const _NOEXCEPT
 {
     if (__f_ == 0)
-        return (const _Tp*)0;
+        return nullptr;
     return (const _Tp*)__f_->target(typeid(_Tp));
 }
 

Modified: vendor/libc++/dist/include/locale
==============================================================================
--- vendor/libc++/dist/include/locale	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/locale	Fri Jun 16 21:04:04 2017	(r320019)
@@ -372,19 +372,57 @@ template <class _CharT>
 struct __num_get
     : protected __num_get_base
 {
-    static string __stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep);
     static string __stage2_float_prep(ios_base& __iob, _CharT* __atoms, _CharT& __decimal_point,
                                       _CharT& __thousands_sep);
-    static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
-                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
-                  unsigned* __g, unsigned*& __g_end, _CharT* __atoms);
+
     static int __stage2_float_loop(_CharT __ct, bool& __in_units, char& __exp,
                                    char* __a, char*& __a_end,
                                    _CharT __decimal_point, _CharT __thousands_sep,
                                    const string& __grouping, unsigned* __g,
                                    unsigned*& __g_end, unsigned& __dc, _CharT* __atoms);
+#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+    static string __stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep);
+    static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
+                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
+                  unsigned* __g, unsigned*& __g_end, _CharT* __atoms);
+
+#else
+    static string __stage2_int_prep(ios_base& __iob, _CharT& __thousands_sep)
+    {
+        locale __loc = __iob.getloc();
+        const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+        __thousands_sep = __np.thousands_sep();
+        return __np.grouping();
+    }
+
+    const _CharT* __do_widen(ios_base& __iob, _CharT* __atoms) const
+    {
+      return __do_widen_p(__iob, __atoms);
+    }
+
+
+    static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
+                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
+                  unsigned* __g, unsigned*& __g_end, const _CharT* __atoms);
+private:
+    template<typename T>
+    const T* __do_widen_p(ios_base& __iob, T* __atoms) const
+    {
+      locale __loc = __iob.getloc();
+      use_facet<ctype<T> >(__loc).widen(__src, __src + 26, __atoms);
+      return __atoms;
+    }
+
+    const char* __do_widen_p(ios_base& __iob, char* __atoms) const
+    {
+      (void)__iob;
+      (void)__atoms;
+      return __src;
+    }
+#endif
 };
 
+#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
 template <class _CharT>
 string
 __num_get<_CharT>::__stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep)
@@ -395,6 +433,7 @@ __num_get<_CharT>::__stage2_int_prep(ios_base& __iob, 
     __thousands_sep = __np.thousands_sep();
     return __np.grouping();
 }
+#endif
 
 template <class _CharT>
 string
@@ -411,9 +450,16 @@ __num_get<_CharT>::__stage2_float_prep(ios_base& __iob
 
 template <class _CharT>
 int
+#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
 __num_get<_CharT>::__stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                   unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                   unsigned* __g, unsigned*& __g_end, _CharT* __atoms)
+#else
+__num_get<_CharT>::__stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
+                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
+                  unsigned* __g, unsigned*& __g_end, const _CharT* __atoms)
+
+#endif
 {
     if (__a_end == __a && (__ct == __atoms[24] || __ct == __atoms[25]))
     {
@@ -849,9 +895,16 @@ num_get<_CharT, _InputIterator>::__do_get_signed(iter_
     // Stage 1
     int __base = this->__get_base(__iob);
     // Stage 2
-    char_type __atoms[26];
     char_type __thousands_sep;
+    const int __atoms_size = 26;
+#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+    char_type __atoms1[__atoms_size];
+    const char_type *__atoms = this->__do_widen(__iob, __atoms1);
+    string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
+#else
+    char_type __atoms[__atoms_size];
     string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
+#endif
     string __buf;
     __buf.resize(__buf.capacity());
     char* __a = &__buf[0];
@@ -899,9 +952,16 @@ num_get<_CharT, _InputIterator>::__do_get_unsigned(ite
     // Stage 1
     int __base = this->__get_base(__iob);
     // Stage 2
-    char_type __atoms[26];
     char_type __thousands_sep;
+    const int __atoms_size = 26;
+#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+    char_type __atoms1[__atoms_size];
+    const char_type *__atoms = this->__do_widen(__iob, __atoms1);
+    string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
+#else
+    char_type __atoms[__atoms_size];
     string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
+#endif
     string __buf;
     __buf.resize(__buf.capacity());
     char* __a = &__buf[0];
@@ -3960,7 +4020,8 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow()
                                        this->egptr(), __inext);
                 if (__r == codecvt_base::noconv)
                 {
-                    this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, (char_type*)__extbufend_);
+                    this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, 
+                               (char_type*) const_cast<char *>(__extbufend_));
                     __c = *this->gptr();
                 }
                 else if (__inext != this->eback() + __unget_sz)
@@ -4048,7 +4109,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(int_ty
                         return traits_type::eof();
                     if (__r == codecvt_base::partial)
                     {
-                        this->setp((char_type*)__e, this->pptr());
+                        this->setp(const_cast<char_type *>(__e), this->pptr());
                         this->pbump(this->epptr() - this->pbase());
                     }
                 }

Modified: vendor/libc++/dist/include/memory
==============================================================================
--- vendor/libc++/dist/include/memory	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/memory	Fri Jun 16 21:04:04 2017	(r320019)
@@ -720,16 +720,12 @@ class _LIBCPP_TEMPLATE_VIS allocator<const void> (publ
 
 // pointer_traits
 
+template <class _Tp, class = void>
+struct __has_element_type : false_type {};
+
 template <class _Tp>
-struct __has_element_type
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::element_type* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_element_type<_Tp, 
+              typename __void_t<typename _Tp::element_type>::type> : true_type {};
 
 template <class _Ptr, bool = __has_element_type<_Ptr>::value>
 struct __pointer_traits_element_type;
@@ -808,16 +804,12 @@ struct __pointer_traits_element_type<_Sp<_Tp, _A0, _A1
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
+template <class _Tp, class = void>
+struct __has_difference_type : false_type {};
+
 template <class _Tp>
-struct __has_difference_type
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::difference_type* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_difference_type<_Tp, 
+            typename __void_t<typename _Tp::difference_type>::type> : true_type {};
 
 template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
 struct __pointer_traits_difference_type
@@ -998,17 +990,12 @@ struct __rebind_pointer {
 
 // allocator_traits
 
-struct __has_pointer_type_imp
-{
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::pointer* = 0);
-};
+template <class _Tp, class = void>
+struct __has_pointer_type : false_type {};
 
 template <class _Tp>
-struct __has_pointer_type
-    : public integral_constant<bool, sizeof(__has_pointer_type_imp::__test<_Tp>(0)) == 1>
-{
-};
+struct __has_pointer_type<_Tp, 
+          typename __void_t<typename _Tp::pointer>::type> : true_type {};
 
 namespace __pointer_type_imp
 {
@@ -1033,16 +1020,12 @@ struct __pointer_type
     typedef typename __pointer_type_imp::__pointer_type<_Tp, typename remove_reference<_Dp>::type>::type type;
 };
 
+template <class _Tp, class = void>
+struct __has_const_pointer : false_type {};
+
 template <class _Tp>
-struct __has_const_pointer
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::const_pointer* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_const_pointer<_Tp, 
+            typename __void_t<typename _Tp::const_pointer>::type> : true_type {};
 
 template <class _Tp, class _Ptr, class _Alloc, bool = __has_const_pointer<_Alloc>::value>
 struct __const_pointer
@@ -1060,16 +1043,12 @@ struct __const_pointer<_Tp, _Ptr, _Alloc, false>
 #endif
 };
 
+template <class _Tp, class = void>
+struct __has_void_pointer : false_type {};
+
 template <class _Tp>
-struct __has_void_pointer
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::void_pointer* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_void_pointer<_Tp, 
+               typename __void_t<typename _Tp::void_pointer>::type> : true_type {};
 
 template <class _Ptr, class _Alloc, bool = __has_void_pointer<_Alloc>::value>
 struct __void_pointer
@@ -1087,16 +1066,12 @@ struct __void_pointer<_Ptr, _Alloc, false>
 #endif
 };
 
+template <class _Tp, class = void>
+struct __has_const_void_pointer : false_type {};
+
 template <class _Tp>
-struct __has_const_void_pointer
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::const_void_pointer* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_const_void_pointer<_Tp, 
+            typename __void_t<typename _Tp::const_void_pointer>::type> : true_type {};
 
 template <class _Ptr, class _Alloc, bool = __has_const_void_pointer<_Alloc>::value>
 struct __const_void_pointer
@@ -1130,16 +1105,12 @@ __to_raw_pointer(_Pointer __p) _NOEXCEPT
     return _VSTD::__to_raw_pointer(__p.operator->());
 }
 
+template <class _Tp, class = void>
+struct __has_size_type : false_type {};
+
 template <class _Tp>
-struct __has_size_type
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::size_type* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_size_type<_Tp,
+               typename __void_t<typename _Tp::size_type>::type> : true_type {};
 
 template <class _Alloc, class _DiffType, bool = __has_size_type<_Alloc>::value>
 struct __size_type
@@ -1153,16 +1124,13 @@ struct __size_type<_Alloc, _DiffType, true>
     typedef typename _Alloc::size_type type;
 };
 
+template <class _Tp, class = void>
+struct __has_propagate_on_container_copy_assignment : false_type {};
+
 template <class _Tp>
-struct __has_propagate_on_container_copy_assignment
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::propagate_on_container_copy_assignment* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_propagate_on_container_copy_assignment<_Tp,
+    typename __void_t<typename _Tp::propagate_on_container_copy_assignment>::type>
+        : true_type {};
 
 template <class _Alloc, bool = __has_propagate_on_container_copy_assignment<_Alloc>::value>
 struct __propagate_on_container_copy_assignment
@@ -1176,16 +1144,13 @@ struct __propagate_on_container_copy_assignment<_Alloc
     typedef typename _Alloc::propagate_on_container_copy_assignment type;
 };
 
+template <class _Tp, class = void>
+struct __has_propagate_on_container_move_assignment : false_type {};
+
 template <class _Tp>
-struct __has_propagate_on_container_move_assignment
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::propagate_on_container_move_assignment* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_propagate_on_container_move_assignment<_Tp, 
+           typename __void_t<typename _Tp::propagate_on_container_move_assignment>::type>
+               : true_type {};
 
 template <class _Alloc, bool = __has_propagate_on_container_move_assignment<_Alloc>::value>
 struct __propagate_on_container_move_assignment
@@ -1199,16 +1164,13 @@ struct __propagate_on_container_move_assignment<_Alloc
     typedef typename _Alloc::propagate_on_container_move_assignment type;
 };
 
+template <class _Tp, class = void>
+struct __has_propagate_on_container_swap : false_type {};
+
 template <class _Tp>
-struct __has_propagate_on_container_swap
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::propagate_on_container_swap* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_propagate_on_container_swap<_Tp, 
+           typename __void_t<typename _Tp::propagate_on_container_swap>::type>
+               : true_type {};
 
 template <class _Alloc, bool = __has_propagate_on_container_swap<_Alloc>::value>
 struct __propagate_on_container_swap
@@ -1222,16 +1184,13 @@ struct __propagate_on_container_swap<_Alloc, true>
     typedef typename _Alloc::propagate_on_container_swap type;
 };
 
+template <class _Tp, class = void>
+struct __has_is_always_equal : false_type {};
+
 template <class _Tp>
-struct __has_is_always_equal
-{
-private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_always_equal* = 0);
-public:
-    static const bool value = sizeof(__test<_Tp>(0)) == 1;
-};
+struct __has_is_always_equal<_Tp, 
+           typename __void_t<typename _Tp::is_always_equal>::type>
+               : true_type {};
 
 template <class _Alloc, bool = __has_is_always_equal<_Alloc>::value>
 struct __is_always_equal
@@ -1884,7 +1843,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> (publi
         return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));
     }
     _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) _NOEXCEPT
-        {_VSTD::__libcpp_deallocate((void*)__p);}
+        {_VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p));}
     _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT
         {return size_type(~0) / sizeof(_Tp);}
 #if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
@@ -1900,7 +1859,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> (publi
         void
         construct(pointer __p)
         {
-            ::new((void*)__p) _Tp();
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp();
         }
 # if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
 
@@ -1909,14 +1868,14 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> (publi
         void
         construct(pointer __p, _A0& __a0)
         {
-            ::new((void*)__p) _Tp(__a0);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0);
         }
     template <class _A0>
         _LIBCPP_INLINE_VISIBILITY
         void
         construct(pointer __p, const _A0& __a0)
         {
-            ::new((void*)__p) _Tp(__a0);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0);
         }
 # endif  // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
     template <class _A0, class _A1>
@@ -1924,28 +1883,28 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp> (publi
         void
         construct(pointer __p, _A0& __a0, _A1& __a1)
         {
-            ::new((void*)__p) _Tp(__a0, __a1);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1);
         }
     template <class _A0, class _A1>
         _LIBCPP_INLINE_VISIBILITY
         void
         construct(pointer __p, const _A0& __a0, _A1& __a1)
         {
-            ::new((void*)__p) _Tp(__a0, __a1);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1);
         }
     template <class _A0, class _A1>
         _LIBCPP_INLINE_VISIBILITY
         void
         construct(pointer __p, _A0& __a0, const _A1& __a1)
         {
-            ::new((void*)__p) _Tp(__a0, __a1);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1);
         }
     template <class _A0, class _A1>
         _LIBCPP_INLINE_VISIBILITY
         void
         construct(pointer __p, const _A0& __a0, const _A1& __a1)
         {
-            ::new((void*)__p) _Tp(__a0, __a1);
+            ::new((void*) const_cast<_Tp *>(__p)) _Tp(__a0, __a1);
         }
 #endif  // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
     _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
@@ -3890,7 +3849,9 @@ class _LIBCPP_TEMPLATE_VIS shared_ptr (public)
     template <class _Dp>
         _LIBCPP_INLINE_VISIBILITY
         _Dp* __get_deleter() const _NOEXCEPT
-            {return (_Dp*)(__cntrl_ ? __cntrl_->__get_deleter(typeid(_Dp)) : 0);}
+            {return static_cast<_Dp*>(__cntrl_
+                    ? const_cast<void *>(__cntrl_->__get_deleter(typeid(_Dp))) 
+                      : nullptr);}
 #endif  // _LIBCPP_NO_RTTI
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS

Modified: vendor/libc++/dist/include/numeric
==============================================================================
--- vendor/libc++/dist/include/numeric	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/numeric	Fri Jun 16 21:04:04 2017	(r320019)
@@ -25,6 +25,18 @@ template <class InputIterator, class T, class BinaryOp
     T
     accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op);
 
+template<class InputIterator>
+    typename iterator_traits<InputIterator>::value_type
+    reduce(InputIterator first, InputIterator last);  // C++17
+
+template<class InputIterator, class T>
+    T
+    reduce(InputIterator first, InputIterator last, T init);  // C++17
+
+template<class InputIterator, class T, class BinaryOperation>
+    T
+    reduce(InputIterator first, InputIterator last, T init, BinaryOperation binary_op);  // C++17
+
 template <class InputIterator1, class InputIterator2, class T>
     T
     inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init);
@@ -34,6 +46,23 @@ template <class InputIterator1, class InputIterator2, 
     inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
                   T init, BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);
 
+
+template<class InputIterator1, class InputIterator2, class T>
+    T
+    transform_reduce(InputIterator1 first1, InputIterator1 last1,
+                     InputIterator2 first2, T init);  // C++17
+                     
+template<class InputIterator1, class InputIterator2, class T, class BinaryOperation1, class BinaryOperation2>
+    T
+    transform_reduce(InputIterator1 first1, InputIterator1 last1,
+                     InputIterator2 first2, T init,
+                     BinaryOperation1 binary_op1, BinaryOperation2 binary_op2);  // C++17
+
+template<class InputIterator, class T, class BinaryOperation, class UnaryOperation>
+    T
+    transform_reduce(InputIterator first, InputIterator last, T init,
+                     BinaryOperation binary_op, UnaryOperation unary_op);  // C++17
+
 template <class InputIterator, class OutputIterator>
     OutputIterator
     partial_sum(InputIterator first, InputIterator last, OutputIterator result);
@@ -114,6 +143,35 @@ accumulate(_InputIterator __first, _InputIterator __la
     return __init;
 }
 
+#if _LIBCPP_STD_VER > 14
+template <class _InputIterator, class _Tp, class _BinaryOp>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp
+reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOp __b)
+{
+    for (; __first != __last; ++__first)
+        __init = __b(__init, *__first);
+    return __init;
+}
+
+template <class _InputIterator, class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp
+reduce(_InputIterator __first, _InputIterator __last, _Tp __init)
+{
+    return _VSTD::reduce(__first, __last, __init, _VSTD::plus<>());
+}
+
+template <class _InputIterator>
+inline _LIBCPP_INLINE_VISIBILITY
+typename iterator_traits<_InputIterator>::value_type
+reduce(_InputIterator __first, _InputIterator __last)
+{
+    return _VSTD::reduce(__first, __last, 
+       typename iterator_traits<_InputIterator>::value_type{});
+}
+#endif
+
 template <class _InputIterator1, class _InputIterator2, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
 _Tp
@@ -134,6 +192,41 @@ inner_product(_InputIterator1 __first1, _InputIterator
         __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
     return __init;
 }
+
+#if _LIBCPP_STD_VER > 14
+template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp
+transform_reduce(_InputIterator __first, _InputIterator __last, 
+           _Tp __init,  _BinaryOp __b, _UnaryOp __u)
+{
+    for (; __first != __last; ++__first)
+        __init = __b(__init, __u(*__first));
+    return __init;
+}
+
+template <class _InputIterator1, class _InputIterator2, 
+          class _Tp, class _BinaryOp1, class _BinaryOp2>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp
+transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1,
+                 _InputIterator2 __first2, _Tp __init,  _BinaryOp1 __b1, _BinaryOp2 __b2)
+{
+    for (; __first1 != __last1; ++__first1, (void) ++__first2)
+        __init = __b1(__init, __b2(*__first1, *__first2));
+    return __init;
+}
+
+template <class _InputIterator1, class _InputIterator2, class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+_Tp
+transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, 
+                 _InputIterator2 __first2, _Tp __init)
+{
+    return _VSTD::transform_reduce(__first1, __last1, __first2, __init, 
+                                   _VSTD::plus<>(), _VSTD::multiplies<>());
+}
+#endif
 
 template <class _InputIterator, class _OutputIterator>
 inline _LIBCPP_INLINE_VISIBILITY

Modified: vendor/libc++/dist/include/support/newlib/xlocale.h
==============================================================================
--- vendor/libc++/dist/include/support/newlib/xlocale.h	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/support/newlib/xlocale.h	Fri Jun 16 21:04:04 2017	(r320019)
@@ -16,7 +16,10 @@
 #include <clocale>
 #include <cwctype>
 #include <ctype.h>
+#if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
+    __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
 #include <support/xlocale/__nop_locale_mgmt.h>
+#endif
 #include <support/xlocale/__posix_l_fallback.h>
 #include <support/xlocale/__strtonum_fallback.h>
 

Modified: vendor/libc++/dist/include/utility
==============================================================================
--- vendor/libc++/dist/include/utility	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/utility	Fri Jun 16 21:04:04 2017	(r320019)
@@ -653,6 +653,12 @@ template <class _T1, class _T2>
   class _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
     : public integral_constant<size_t, 2> {};
 
+template <size_t _Ip, class _T1, class _T2>
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> >
+{
+    static_assert(_Ip < 2, "Index out of bounds in std::tuple_element<std::pair<T1, T2>>");
+};
+
 template <class _T1, class _T2>
 class _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
 {
@@ -923,6 +929,12 @@ template <class _Tp> struct __is_inplace_type_imp<in_p
 
 template <class _Tp>
 using __is_inplace_type = __is_inplace_type_imp<__uncvref_t<_Tp>>;
+
+template <class _Tp> struct __is_inplace_index_imp : false_type {};
+template <size_t _Idx> struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};
+
+template <class _Tp>
+using __is_inplace_index = __is_inplace_index_imp<__uncvref_t<_Tp>>;
 
 #endif // _LIBCPP_STD_VER > 14
 

Modified: vendor/libc++/dist/include/variant
==============================================================================
--- vendor/libc++/dist/include/variant	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/include/variant	Fri Jun 16 21:04:04 2017	(r320019)
@@ -278,7 +278,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, c
 
 template <size_t _Ip, class... _Types>
 struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
-  static_assert(_Ip < sizeof...(_Types));
+  static_assert(_Ip < sizeof...(_Types), "Index out of bounds in std::variant_alternative<>");
   using type = __type_pack_element<_Ip, _Types...>;
 };
 

Modified: vendor/libc++/dist/lib/CMakeLists.txt
==============================================================================
--- vendor/libc++/dist/lib/CMakeLists.txt	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/lib/CMakeLists.txt	Fri Jun 16 21:04:04 2017	(r320019)
@@ -1,6 +1,7 @@
 set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}"  PARENT_SCOPE)
 
 # Get sources
+# FIXME: Don't use glob here
 file(GLOB LIBCXX_SOURCES ../src/*.cpp)
 if(WIN32)
   file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)

Modified: vendor/libc++/dist/src/experimental/filesystem/operations.cpp
==============================================================================
--- vendor/libc++/dist/src/experimental/filesystem/operations.cpp	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/src/experimental/filesystem/operations.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -842,7 +842,7 @@ void __rename(const path& from, const path& to, std::e
 }
 
 void __resize_file(const path& p, std::uintmax_t size, std::error_code *ec) {
-    if (::truncate(p.c_str(), static_cast<long>(size)) == -1)
+    if (::truncate(p.c_str(), static_cast<::off_t>(size)) == -1)
         set_or_throw(ec, "resize_file", p);
     else if (ec)
         ec->clear();

Modified: vendor/libc++/dist/src/locale.cpp
==============================================================================
--- vendor/libc++/dist/src/locale.cpp	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/src/locale.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -6158,6 +6158,4 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VI
 template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>;
 template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>;
 
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __vector_base_common<true>;
-
 _LIBCPP_END_NAMESPACE_STD

Added: vendor/libc++/dist/src/vector.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/src/vector.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -0,0 +1,16 @@
+//===------------------------- vector.cpp ---------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "vector"
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __vector_base_common<true>;
+
+_LIBCPP_END_NAMESPACE_STD

Modified: vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
==============================================================================
--- vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -23,6 +23,7 @@
 //  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 //  is defined before including <algorithm>, then random_shuffle will be restored.
 
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 #define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 
 #include <algorithm>

Modified: vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
==============================================================================
--- vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp	Fri Jun 16 21:04:00 2017	(r320018)
+++ vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -14,6 +14,7 @@
 //  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 //  is defined before including <functional>, then they will be restored.
 
+// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 #define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>

Added: vendor/libc++/dist/test/libcxx/include_as_c.sh.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/test/libcxx/include_as_c.sh.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -0,0 +1,37 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// Test that the C wrapper headers can be included when compiling them as C.
+
+// NOTE: It's not common or recommended to have libc++ in the header search
+// path when compiling C files, but it does happen often enough.
+
+// RUN: %cxx -c -xc %s -fsyntax-only %flags %compile_flags -std=c99
+
+#include <complex.h>
+#include <ctype.h>
+#include <errno.h>
+#include <float.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <setjmp.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <tgmath.h>
+#include <wchar.h>
+#include <wctype.h>
+
+int main() {}

Added: vendor/libc++/dist/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/libc++/dist/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp	Fri Jun 16 21:04:04 2017	(r320019)
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14

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


More information about the svn-src-all mailing list