svn commit: r311321 - in vendor/libc++/dist: . cmake/Modules docs include include/experimental include/support/win32 lib lib/abi src src/include src/support/win32 test test/libcxx/test test/std/con...

Dimitry Andric dim at FreeBSD.org
Wed Jan 4 22:11:44 UTC 2017


Author: dim
Date: Wed Jan  4 22:11:41 2017
New Revision: 311321
URL: https://svnweb.freebsd.org/changeset/base/311321

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

Added:
  vendor/libc++/dist/utils/cat_files.py   (contents, props changed)
Modified:
  vendor/libc++/dist/.clang-format
  vendor/libc++/dist/CMakeLists.txt
  vendor/libc++/dist/LICENSE.TXT
  vendor/libc++/dist/cmake/Modules/HandleLibCXXABI.cmake
  vendor/libc++/dist/docs/conf.py
  vendor/libc++/dist/include/CMakeLists.txt
  vendor/libc++/dist/include/__config
  vendor/libc++/dist/include/__locale
  vendor/libc++/dist/include/__threading_support
  vendor/libc++/dist/include/__tuple
  vendor/libc++/dist/include/array
  vendor/libc++/dist/include/experimental/string_view
  vendor/libc++/dist/include/ios
  vendor/libc++/dist/include/iterator
  vendor/libc++/dist/include/new
  vendor/libc++/dist/include/support/win32/locale_win32.h
  vendor/libc++/dist/include/support/win32/support.h
  vendor/libc++/dist/include/system_error
  vendor/libc++/dist/include/tuple
  vendor/libc++/dist/include/type_traits
  vendor/libc++/dist/lib/CMakeLists.txt
  vendor/libc++/dist/lib/abi/CMakeLists.txt
  vendor/libc++/dist/src/chrono.cpp
  vendor/libc++/dist/src/exception.cpp
  vendor/libc++/dist/src/include/config_elast.h
  vendor/libc++/dist/src/locale.cpp
  vendor/libc++/dist/src/new.cpp
  vendor/libc++/dist/src/stdexcept.cpp
  vendor/libc++/dist/src/support/win32/locale_win32.cpp
  vendor/libc++/dist/src/system_error.cpp
  vendor/libc++/dist/src/thread.cpp
  vendor/libc++/dist/src/typeinfo.cpp
  vendor/libc++/dist/test/CMakeLists.txt
  vendor/libc++/dist/test/libcxx/test/config.py
  vendor/libc++/dist/test/lit.site.cfg.in
  vendor/libc++/dist/test/std/containers/sequences/array/array.data/data_const.pass.cpp
  vendor/libc++/dist/test/std/containers/sequences/array/iterators.pass.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp
  vendor/libc++/dist/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp
  vendor/libc++/dist/test/std/iterators/iterator.range/begin-end.pass.cpp
  vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
  vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
  vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
  vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.fail.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp
  vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.fail.cpp
  vendor/libc++/dist/test/support/external_threads.cpp
  vendor/libc++/dist/www/cxx1z_status.html

Modified: vendor/libc++/dist/.clang-format
==============================================================================
--- vendor/libc++/dist/.clang-format	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/.clang-format	Wed Jan  4 22:11:41 2017	(r311321)
@@ -4,6 +4,12 @@ BasedOnStyle: LLVM
 Language: Cpp
 
 AlwaysBreakTemplateDeclarations: true
+AllowShortFunctionsOnASingleLine: Inline
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterClass: true
+  AfterFunction: true
+PointerAlignment: Left
 
 # Disable formatting options which may break tests.
 SortIncludes: false

Modified: vendor/libc++/dist/CMakeLists.txt
==============================================================================
--- vendor/libc++/dist/CMakeLists.txt	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/CMakeLists.txt	Wed Jan  4 22:11:41 2017	(r311321)
@@ -87,13 +87,22 @@ if (NOT LIBCXX_ENABLE_SHARED AND NOT LIB
 endif()
 
 # ABI Library options ---------------------------------------------------------
-set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
-    "Specify C++ ABI library to use." FORCE)
-set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
+set(LIBCXX_CXX_ABI "default" CACHE STRING
+    "Specify C++ ABI library to use.")
+set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++)
 set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
 
+# FIXME: This is a temporary hack to force LLVM buildbots to store
+# the fixed cache entry instead of the previous cache entry. This is needed
+# because some LLVM buildbots don't clear their cache. It will be removed
+# once all LLVM bots have been run.
+if (LIBCXX_CXX_ABI STREQUAL "")
+  set(LIBCXX_CXX_ABI "default" CACHE STRING
+      "Specify the C++ ABI library to use." FORCE)
+endif()
+
 # Setup the default options if LIBCXX_CXX_ABI is not specified.
-if (NOT LIBCXX_CXX_ABI)
+if (LIBCXX_CXX_ABI STREQUAL "default")
   find_path(
     LIBCXX_LIBCXXABI_INCLUDES_INTERNAL
     cxxabi.h
@@ -107,7 +116,7 @@ if (NOT LIBCXX_CXX_ABI)
     set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
     set(LIBCXX_CXX_ABI_INTREE 1)
   else()
-    set(LIBCXX_CXX_ABI_LIBNAME "none")
+    set(LIBCXX_CXX_ABI_LIBNAME "default")
   endif()
 else()
   set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
@@ -125,6 +134,7 @@ option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY 
 set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
 if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY
       AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
+      AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"
       AND PYTHONINTERP_FOUND
       AND LIBCXX_ENABLE_SHARED)
     set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
@@ -211,14 +221,21 @@ if(LIBCXX_ENABLE_THREADS AND NOT LIBCXX_
                       " when LIBCXX_ENABLE_THREADS is also set to OFF.")
 endif()
 
-if(LIBCXX_HAS_PTHREAD_API AND NOT LIBCXX_ENABLE_THREADS)
-  message(FATAL_ERROR "LIBCXX_HAS_PTHREAD_API can only be set to ON"
-                      " when LIBCXX_ENABLE_THREADS is also set to ON.")
+if(NOT LIBCXX_ENABLE_THREADS)
+  if(LIBCXX_HAS_PTHREAD_API)
+    message(FATAL_ERROR "LIBCXX_HAS_PTHREAD_API can only be set to ON"
+                        " when LIBCXX_ENABLE_THREADS is also set to ON.")
+  endif()
+  if(LIBCXX_HAS_EXTERNAL_THREAD_API)
+    message(FATAL_ERROR "LIBCXX_HAS_EXTERNAL_THREAD_API can only be set to ON"
+                        " when LIBCXX_ENABLE_THREADS is also set to ON.")
+  endif()
 endif()
 
-if(LIBCXX_HAS_EXTERNAL_THREAD_API AND NOT LIBCXX_ENABLE_THREADS)
-  message(FATAL_ERROR "LIBCXX_HAS_EXTERNAL_THREAD_API can only be set to ON"
-                      " when LIBCXX_ENABLE_THREADS is also set to ON.")
+if(LIBCXX_HAS_PTHREAD_API AND LIBCXX_HAS_EXTERNAL_THREAD_API)
+  message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API"
+                      "and LIBCXX_HAS_PTHREAD_API cannot be both"
+                      "set to ON at the same time.")
 endif()
 
 # Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE
@@ -442,9 +459,6 @@ if (LIBCXX_ENABLE_ASSERTIONS)
   define_if_not(MSVC -D_DEBUG)
 endif()
 
-# Feature flags ===============================================================
-define_if(MSVC -D_CRT_SECURE_NO_WARNINGS)
-
 # Modules flags ===============================================================
 # FIXME The libc++ sources are fundamentally non-modular. They need special
 # versions of the headers in order to provide C++03 and legacy ABI definitions.

Modified: vendor/libc++/dist/LICENSE.TXT
==============================================================================
--- vendor/libc++/dist/LICENSE.TXT	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/LICENSE.TXT	Wed Jan  4 22:11:41 2017	(r311321)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is in
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT
 
 All rights reserved.
 

Modified: vendor/libc++/dist/cmake/Modules/HandleLibCXXABI.cmake
==============================================================================
--- vendor/libc++/dist/cmake/Modules/HandleLibCXXABI.cmake	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/cmake/Modules/HandleLibCXXABI.cmake	Wed Jan  4 22:11:41 2017	(r311321)
@@ -102,9 +102,14 @@ elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STRE
   setup_abi_lib("-DLIBCXXRT"
     "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
     )
-elseif (NOT "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
+  list(APPEND LIBCXX_COMPILE_FLAGS "-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default")
+  # Nothing TODO
+else()
   message(FATAL_ERROR
-    "Currently libstdc++, libsupc++, libcxxabi, libcxxrt and none are "
-    "supported for c++ abi."
+    "Unsupported c++ abi: '${LIBCXX_CXX_ABI_LIBNAME}'. \
+     Currently libstdc++, libsupc++, libcxxabi, libcxxrt, default and none are
+     supported for c++ abi."
     )
 endif ()

Modified: vendor/libc++/dist/docs/conf.py
==============================================================================
--- vendor/libc++/dist/docs/conf.py	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/docs/conf.py	Wed Jan  4 22:11:41 2017	(r311321)
@@ -40,7 +40,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'libc++'
-copyright = u'2011-2016, LLVM Project'
+copyright = u'2011-2017, LLVM Project'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the

Modified: vendor/libc++/dist/include/CMakeLists.txt
==============================================================================
--- vendor/libc++/dist/include/CMakeLists.txt	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/CMakeLists.txt	Wed Jan  4 22:11:41 2017	(r311321)
@@ -28,15 +28,13 @@ if (LIBCXX_INSTALL_HEADERS)
   )
 
   if (LIBCXX_NEEDS_SITE_CONFIG)
-    set(UNIX_CAT cat)
-    if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
-      set(UNIX_CAT type)
-    endif()
     # Generate and install a custom __config header. The new header is created
     # by  prepending __config_site to the current __config header.
     add_custom_command(OUTPUT ${LIBCXX_BINARY_DIR}/__generated_config
-      COMMAND ${CMAKE_COMMAND} -E copy ${LIBCXX_BINARY_DIR}/__config_site ${LIBCXX_BINARY_DIR}/__generated_config
-      COMMAND ${UNIX_CAT} ${LIBCXX_SOURCE_DIR}/include/__config >> ${LIBCXX_BINARY_DIR}/__generated_config
+      COMMAND ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/cat_files.py
+        ${LIBCXX_BINARY_DIR}/__config_site
+        ${LIBCXX_SOURCE_DIR}/include/__config
+        -o ${LIBCXX_BINARY_DIR}/__generated_config
       DEPENDS ${LIBCXX_SOURCE_DIR}/include/__config
               ${LIBCXX_BINARY_DIR}/__config_site
     )

Modified: vendor/libc++/dist/include/__config
==============================================================================
--- vendor/libc++/dist/include/__config	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/__config	Wed Jan  4 22:11:41 2017	(r311321)
@@ -53,6 +53,10 @@
 // of nullptr_t. This option is ABI incompatible with GCC in C++03 mode.
 #define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR
 #elif _LIBCPP_ABI_VERSION == 1
+#if !defined(_WIN32)
+// Enable compiling a definition of error_category() into the libc++ dylib.
+#define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR
+#endif
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
 #if defined(__FreeBSD__)
@@ -150,11 +154,13 @@
 # define _LIBCPP_HAS_QUICK_EXIT
 #endif  // __NetBSD__
 
-#ifdef _WIN32
+#if defined(_WIN32)
+#  define _LIBCPP_WIN32API      1
 #  define _LIBCPP_LITTLE_ENDIAN 1
 #  define _LIBCPP_BIG_ENDIAN    0
+#  define _LIBCPP_SHORT_WCHAR   1
 // Compiler intrinsics (MSVC)
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#  if defined(_MSC_VER) && _MSC_VER >= 1400
 #    define _LIBCPP_HAS_IS_BASE_OF
 #  endif
 #  if defined(_MSC_VER) && !defined(__clang__)
@@ -163,11 +169,14 @@
 #    define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
 #    define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
 #  endif
-#  // If mingw not explicitly detected, assume using MS C runtime only.
+// If mingw not explicitly detected, assume using MS C runtime only.
 #  ifndef __MINGW32__
 #    define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
 #  endif
-#endif  // _WIN32
+#  if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
+#    define _LIBCPP_HAS_BITSCAN64
+#  endif
+#endif // defined(_WIN32)
 
 #ifdef __sun__
 # include <sys/isa_defs.h>
@@ -191,7 +200,7 @@
   // including accesses to the special files under /dev. C++11's
   // std::random_device is instead exposed through a NaCl syscall.
 # define _LIBCPP_USING_NACL_RANDOM
-#elif defined(_WIN32)
+#elif defined(_LIBCPP_WIN32API)
 # define _LIBCPP_USING_WIN32_RANDOM
 #else
 # define _LIBCPP_USING_DEV_RANDOM
@@ -466,7 +475,9 @@ using namespace _LIBCPP_NAMESPACE __attr
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
+#if _MSC_VER <= 1800
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
+#endif
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
 #define _LIBCPP_HAS_NO_NOEXCEPT
 #define __alignof__ __alignof
@@ -516,8 +527,15 @@ namespace std {
 
 #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
 
+#if defined(__ELF__)
+#define _LIBCPP_OBJECT_FORMAT_ELF   1
+#elif defined(__MACH__)
+#define _LIBCPP_OBJECT_FORMAT_MACHO 1
+#else
+#define _LIBCPP_OBJECT_FORMAT_COFF  1
+#endif
 
-#ifdef _WIN32
+#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
 #if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
 # define _LIBCPP_DLL_VIS
 # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
@@ -542,6 +560,7 @@ namespace std {
 #define _LIBCPP_TYPE_VIS_ONLY
 #define _LIBCPP_FUNC_VIS_ONLY
 #define _LIBCPP_ENUM_VIS
+
 #if defined(_LIBCPP_MSVC)
 # define _LIBCPP_INLINE_VISIBILITY __forceinline
 # define _LIBCPP_ALWAYS_INLINE     __forceinline
@@ -551,7 +570,7 @@ namespace std {
 # define _LIBCPP_ALWAYS_INLINE     __attribute__ ((__always_inline__))
 # define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__ ((__always_inline__))
 #endif
-#endif // _WIN32
+#endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
 
 #ifndef _LIBCPP_HIDDEN
 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
@@ -727,7 +746,7 @@ template <unsigned> struct __static_asse
 #define _NOALIAS
 #endif
 
-#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \
+#if __has_extension(cxx_explicit_conversions) || defined(__IBMCPP__) || \
     (!defined(_LIBCPP_CXX03_LANG) && defined(__GNUC__)) // All supported GCC versions
 #   define _LIBCPP_EXPLICIT explicit
 #else
@@ -774,14 +793,14 @@ template <unsigned> struct __static_asse
 #define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
 #endif
 
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || \
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT) ||   \
     defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__)
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
 
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
 // Most unix variants have catopen.  These are the specific ones that don't.
-#if !defined(_WIN32) && !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
+#if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
 #define _LIBCPP_HAS_CATOPEN 1
 #endif
 #endif
@@ -955,7 +974,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
-#if defined(_WIN32) || defined(_NEWLIB_VERSION)
+#if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
 #define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
 #endif
 #endif

Modified: vendor/libc++/dist/include/__locale
==============================================================================
--- vendor/libc++/dist/include/__locale	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/__locale	Wed Jan  4 22:11:41 2017	(r311321)
@@ -342,7 +342,7 @@ public:
     static const mask punct  = _ISpunct;
     static const mask xdigit = _ISxdigit;
     static const mask blank  = _ISblank;
-#elif defined(_WIN32)
+#elif defined(_LIBCPP_MSVCRT)
     typedef unsigned short mask;
     static const mask space  = _SPACE;
     static const mask print  = _BLANK|_PUNCT|_ALPHA|_DIGIT;

Modified: vendor/libc++/dist/include/__threading_support
==============================================================================
--- vendor/libc++/dist/include/__threading_support	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/__threading_support	Wed Jan  4 22:11:41 2017	(r311321)
@@ -28,11 +28,26 @@
 #endif
 
 #if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) && \
+    !__libcpp_has_include(<__external_threading>)
+// If the <__external_threading> header is absent, build libc++ against a
+// pthread-oriented thread api but leave out its implementation. This setup
+// allows building+testing of an externally-threaded library variant (on any
+// platform that supports pthreads). Here, an 'externally-threaded' library
+// variant is one where the implementation of the libc++ thread api is provided
+// as a separate library.
+#define _LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD
+#endif
+
+#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) && \
     __libcpp_has_include(<__external_threading>)
 #include <__external_threading>
 #else
+
+#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \
+    defined(_LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD)
 #include <pthread.h>
 #include <sched.h>
+#endif
 
 #if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
 #define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS
@@ -42,200 +57,258 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \
+    defined(_LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD)
 // Mutex
 typedef pthread_mutex_t __libcpp_mutex_t;
 #define _LIBCPP_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
 
+// Condition Variable
+typedef pthread_cond_t __libcpp_condvar_t;
+#define _LIBCPP_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER
+
+// Execute once
+typedef pthread_once_t __libcpp_exec_once_flag;
+#define _LIBCPP_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT
+
+// Thread id
+typedef pthread_t __libcpp_thread_id;
+
+// Thread
+typedef pthread_t __libcpp_thread_t;
+
+// Thrad Local Storage
+typedef pthread_key_t __libcpp_tls_key;
+#endif
+
+// Mutex
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_recursive_mutex_init(__libcpp_mutex_t* __m);
+int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_lock(__libcpp_mutex_t* __m);
+int __libcpp_mutex_lock(__libcpp_mutex_t *__m);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_trylock(__libcpp_mutex_t* __m);
+int __libcpp_mutex_trylock(__libcpp_mutex_t *__m);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_unlock(__libcpp_mutex_t* __m);
+int __libcpp_mutex_unlock(__libcpp_mutex_t *__m);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_destroy(__libcpp_mutex_t* __m);
+int __libcpp_mutex_destroy(__libcpp_mutex_t *__m);
 
 // Condition variable
-typedef pthread_cond_t __libcpp_condvar_t;
-#define _LIBCPP_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER
 _LIBCPP_THREAD_ABI_VISIBILITY
 int __libcpp_condvar_signal(__libcpp_condvar_t* __cv);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_condvar_timedwait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m, timespec* __ts);
+int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
+                               timespec *__ts);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);
 
+// Execute once
+_LIBCPP_THREAD_ABI_VISIBILITY
+int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
+                          void (*init_routine)(void));
+
 // Thread id
-typedef pthread_t __libcpp_thread_id;
+#if defined(__APPLE__) && !defined(__arm__)
+_LIBCPP_THREAD_ABI_VISIBILITY
+mach_port_t __libcpp_thread_get_port();
+#endif
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2);
 
 // Thread
-typedef pthread_t __libcpp_thread_t;
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_create(__libcpp_thread_t* __t, void* (*__func)(void*), void* __arg);
+int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+                           void *__arg);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 __libcpp_thread_id __libcpp_thread_get_current_id();
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t* __t);
+__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_join(__libcpp_thread_t* __t);
+int __libcpp_thread_join(__libcpp_thread_t *__t);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_detach(__libcpp_thread_t* __t);
+int __libcpp_thread_detach(__libcpp_thread_t *__t);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
 void __libcpp_thread_yield();
 
 // Thread local storage
-typedef pthread_key_t __libcpp_tls_key;
 _LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_tls_create(__libcpp_tls_key* __key, void (*__at_exit)(void*));
+int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *));
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-void* __libcpp_tls_get(__libcpp_tls_key __key);
+void *__libcpp_tls_get(__libcpp_tls_key __key);
+
 _LIBCPP_THREAD_ABI_VISIBILITY
-void __libcpp_tls_set(__libcpp_tls_key __key, void* __p);
+int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
 
-#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || defined(_LIBCPP_BUILDING_EXTERNAL_THREADS)
+#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \
+    defined(_LIBCPP_BUILDING_THREAD_API_EXTERNAL_PTHREAD)
 
-int __libcpp_recursive_mutex_init(__libcpp_mutex_t* __m)
+int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m)
 {
-    pthread_mutexattr_t attr;
-    int __ec = pthread_mutexattr_init(&attr);
-    if (__ec) return __ec;
-    __ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-    if (__ec)
-    {
-        pthread_mutexattr_destroy(&attr);
-        return __ec;
-    }
-    __ec = pthread_mutex_init(__m, &attr);
-    if (__ec)
-    {
-        pthread_mutexattr_destroy(&attr);
-        return __ec;
-    }
-    __ec = pthread_mutexattr_destroy(&attr);
-    if (__ec)
-    {
-        pthread_mutex_destroy(__m);
-        return __ec;
-    }
-    return 0;
+  pthread_mutexattr_t attr;
+  int __ec = pthread_mutexattr_init(&attr);
+  if (__ec)
+    return __ec;
+  __ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+  if (__ec) {
+    pthread_mutexattr_destroy(&attr);
+    return __ec;
+  }
+  __ec = pthread_mutex_init(__m, &attr);
+  if (__ec) {
+    pthread_mutexattr_destroy(&attr);
+    return __ec;
+  }
+  __ec = pthread_mutexattr_destroy(&attr);
+  if (__ec) {
+    pthread_mutex_destroy(__m);
+    return __ec;
+  }
+  return 0;
 }
 
-int __libcpp_mutex_lock(__libcpp_mutex_t* __m)
+int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
 {
-    return pthread_mutex_lock(__m);
+  return pthread_mutex_lock(__m);
 }
 
-int __libcpp_mutex_trylock(__libcpp_mutex_t* __m)
+int __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
 {
-    return pthread_mutex_trylock(__m);
+  return pthread_mutex_trylock(__m);
 }
 
-int __libcpp_mutex_unlock(__libcpp_mutex_t* __m)
+int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
 {
-    return pthread_mutex_unlock(__m);
+  return pthread_mutex_unlock(__m);
 }
 
-int __libcpp_mutex_destroy(__libcpp_mutex_t* __m)
+int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
 {
-    return pthread_mutex_destroy(__m);
+  return pthread_mutex_destroy(__m);
 }
 
-// Condition variable
-int __libcpp_condvar_signal(__libcpp_condvar_t* __cv)
+// Condition Variable
+int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
 {
-    return pthread_cond_signal(__cv);
+  return pthread_cond_signal(__cv);
 }
 
-int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv)
+int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
 {
-    return pthread_cond_broadcast(__cv);
+  return pthread_cond_broadcast(__cv);
 }
 
-int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m)
+int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
 {
-    return pthread_cond_wait(__cv, __m);
+  return pthread_cond_wait(__cv, __m);
 }
 
-int __libcpp_condvar_timedwait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m, timespec* __ts)
+int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
+                               timespec *__ts)
 {
-    return pthread_cond_timedwait(__cv, __m, __ts);
+  return pthread_cond_timedwait(__cv, __m, __ts);
 }
 
-int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv)
+int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
 {
-    return pthread_cond_destroy(__cv);
+  return pthread_cond_destroy(__cv);
 }
 
+// Execute once
+int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
+                          void (*init_routine)(void)) {
+  return pthread_once(flag, init_routine);
+}
+
+// Thread id
+#if defined(__APPLE__) && !defined(__arm__)
+mach_port_t __libcpp_thread_get_port() {
+    return pthread_mach_thread_np(pthread_self());
+}
+#endif
+
 // Returns non-zero if the thread ids are equal, otherwise 0
 bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
 {
-    return pthread_equal(t1, t2) != 0;
+  return pthread_equal(t1, t2) != 0;
 }
 
 // Returns non-zero if t1 < t2, otherwise 0
 bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
 {
-    return t1 < t2;
+  return t1 < t2;
 }
 
 // Thread
-int __libcpp_thread_create(__libcpp_thread_t* __t, void* (*__func)(void*), void* __arg)
+int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+                           void *__arg)
 {
-    return pthread_create(__t, 0, __func, __arg);
+  return pthread_create(__t, 0, __func, __arg);
 }
 
 __libcpp_thread_id __libcpp_thread_get_current_id()
 {
-    return pthread_self();
+  return pthread_self();
 }
 
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t* __t)
+__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
 {
-    return *__t;
+  return *__t;
 }
 
-int __libcpp_thread_join(__libcpp_thread_t* __t)
+int __libcpp_thread_join(__libcpp_thread_t *__t)
 {
-    return pthread_join(*__t, 0);
+  return pthread_join(*__t, 0);
 }
 
-int __libcpp_thread_detach(__libcpp_thread_t* __t)
+int __libcpp_thread_detach(__libcpp_thread_t *__t)
 {
-    return pthread_detach(*__t);
+  return pthread_detach(*__t);
 }
 
 void __libcpp_thread_yield()
 {
-    sched_yield();
+  sched_yield();
 }
 
 // Thread local storage
-int __libcpp_tls_create(__libcpp_tls_key* __key, void (*__at_exit)(void*))
+int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
 {
-    return pthread_key_create(__key, __at_exit);
+  return pthread_key_create(__key, __at_exit);
 }
 
-void* __libcpp_tls_get(__libcpp_tls_key __key)
+void *__libcpp_tls_get(__libcpp_tls_key __key)
 {
-    return pthread_getspecific(__key);
+  return pthread_getspecific(__key);
 }
 
-void __libcpp_tls_set(__libcpp_tls_key __key, void* __p)
+int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
 {
-    pthread_setspecific(__key, __p);
+    return pthread_setspecific(__key, __p);
 }
 
-#endif // _LIBCPP_HAS_THREAD_API_PTHREAD || _LIBCPP_BUILDING_EXTERNAL_THREADS
+#endif // _LIBCPP_HAS_THREAD_API_PTHREAD
 
 _LIBCPP_END_NAMESPACE_STD
 

Modified: vendor/libc++/dist/include/__tuple
==============================================================================
--- vendor/libc++/dist/include/__tuple	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/__tuple	Wed Jan  4 22:11:41 2017	(r311321)
@@ -22,19 +22,32 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size {};
+template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size;
+
+struct __empty_tuple_size_base {};
+
+template <class _Tp, class = void>
+struct __tuple_size_base_type {
+  typedef __empty_tuple_size_base type;
+};
+
+template <class _Tp>
+struct __tuple_size_base_type<_Tp, typename __void_t<decltype(tuple_size<_Tp>::value)>::type>
+{
+  typedef integral_constant<size_t, tuple_size<_Tp>::value> type;
+};
 
 template <class _Tp>
 class _LIBCPP_TYPE_VIS_ONLY tuple_size<const _Tp>
-    : public tuple_size<_Tp> {};
+    : public __tuple_size_base_type<_Tp>::type {};
 
 template <class _Tp>
 class _LIBCPP_TYPE_VIS_ONLY tuple_size<volatile _Tp>
-    : public tuple_size<_Tp> {};
+    : public __tuple_size_base_type<_Tp>::type {};
 
 template <class _Tp>
 class _LIBCPP_TYPE_VIS_ONLY tuple_size<const volatile _Tp>
-    : public tuple_size<_Tp> {};
+    : public __tuple_size_base_type<_Tp>::type {};
 
 template <size_t _Ip, class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_element;
 

Modified: vendor/libc++/dist/include/array
==============================================================================
--- vendor/libc++/dist/include/array	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/array	Wed Jan  4 22:11:41 2017	(r311321)
@@ -149,31 +149,31 @@ struct _LIBCPP_TYPE_VIS_ONLY array
         { _VSTD::swap_ranges(__elems_, __elems_ + _Size, __a.__elems_);}
 
     // iterators:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     iterator begin() _NOEXCEPT {return iterator(__elems_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_iterator begin() const _NOEXCEPT {return const_iterator(__elems_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     iterator end() _NOEXCEPT {return iterator(__elems_ + _Size);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_iterator end() const _NOEXCEPT {return const_iterator(__elems_ + _Size);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_iterator cbegin() const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
     // capacity:
@@ -195,9 +195,9 @@ struct _LIBCPP_TYPE_VIS_ONLY array
     _LIBCPP_INLINE_VISIBILITY reference back()              {return __elems_[_Size > 0 ? _Size-1 : 0];}
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const  {return __elems_[_Size > 0 ? _Size-1 : 0];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     value_type* data() _NOEXCEPT {return __elems_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
     const value_type* data() const _NOEXCEPT {return __elems_;}
 };
 

Modified: vendor/libc++/dist/include/experimental/string_view
==============================================================================
--- vendor/libc++/dist/include/experimental/string_view	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/experimental/string_view	Wed Jan  4 22:11:41 2017	(r311321)
@@ -340,7 +340,12 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
         // [string.view.ops], string operations:
         template<class _Allocator>
         _LIBCPP_INLINE_VISIBILITY
-        _LIBCPP_EXPLICIT operator basic_string<_CharT, _Traits, _Allocator>() const
+        // Clang's extended C++11 explict conversions don't work with
+        // string_view in C++03.
+#ifndef _LIBCPP_CXX03_LANG
+        _LIBCPP_EXPLICIT
+#endif
+        operator basic_string<_CharT, _Traits, _Allocator>() const
         { return basic_string<_CharT, _Traits, _Allocator>( begin(), end()); }
 
         template<class _Allocator = allocator<_CharT> >

Modified: vendor/libc++/dist/include/ios
==============================================================================
--- vendor/libc++/dist/include/ios	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/ios	Wed Jan  4 22:11:41 2017	(r311321)
@@ -572,13 +572,6 @@ ios_base::exceptions(iostate __iostate)
     clear(__rdstate_);
 }
 
-#if defined(_LIBCPP_CXX03_LANG)
-struct _LIBCPP_TYPE_VIS_ONLY __cxx03_bool {
-  typedef void (__cxx03_bool::*__bool_type)();
-  void __true_value() {}
-};
-#endif
-
 template <class _CharT, class _Traits>
 class _LIBCPP_TYPE_VIS_ONLY basic_ios
     : public ios_base
@@ -592,18 +585,8 @@ public:
     typedef typename traits_type::pos_type pos_type;
     typedef typename traits_type::off_type off_type;
 
-  // __true_value will generate undefined references when linking unless
-  // we give it internal linkage.
-
-#if defined(_LIBCPP_CXX03_LANG)
-    _LIBCPP_ALWAYS_INLINE
-    operator __cxx03_bool::__bool_type() const {
-        return !fail() ? &__cxx03_bool::__true_value : nullptr;
-    }
-#else
     _LIBCPP_ALWAYS_INLINE
     _LIBCPP_EXPLICIT operator bool() const {return !fail();}
-#endif
 
     _LIBCPP_ALWAYS_INLINE bool operator!() const    {return  fail();}
     _LIBCPP_ALWAYS_INLINE iostate rdstate() const   {return ios_base::rdstate();}

Modified: vendor/libc++/dist/include/iterator
==============================================================================
--- vendor/libc++/dist/include/iterator	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/iterator	Wed Jan  4 22:11:41 2017	(r311321)
@@ -378,25 +378,25 @@ public:
     bool failed() const noexcept;
 };
 
-template <class C> auto begin(C& c) -> decltype(c.begin());
-template <class C> auto begin(const C& c) -> decltype(c.begin());
-template <class C> auto end(C& c) -> decltype(c.end());
-template <class C> auto end(const C& c) -> decltype(c.end());
-template <class T, size_t N> T* begin(T (&array)[N]);
-template <class T, size_t N> T* end(T (&array)[N]);
-
-template <class C> auto cbegin(const C& c) -> decltype(std::begin(c));        // C++14
-template <class C> auto cend(const C& c) -> decltype(std::end(c));            // C++14
-template <class C> auto rbegin(C& c) -> decltype(c.rbegin());                 // C++14
-template <class C> auto rbegin(const C& c) -> decltype(c.rbegin());           // C++14
-template <class C> auto rend(C& c) -> decltype(c.rend());                     // C++14
-template <class C> auto rend(const C& c) -> decltype(c.rend());               // C++14
-template <class E> reverse_iterator<const E*> rbegin(initializer_list<E> il); // C++14
-template <class E> reverse_iterator<const E*> rend(initializer_list<E> il);   // C++14
-template <class T, size_t N> reverse_iterator<T*> rbegin(T (&array)[N]);      // C++14
-template <class T, size_t N> reverse_iterator<T*> rend(T (&array)[N]);        // C++14
-template <class C> auto crbegin(const C& c) -> decltype(std::rbegin(c));      // C++14
-template <class C> auto crend(const C& c) -> decltype(std::rend(c));          // C++14
+template <class C> constexpr auto begin(C& c) -> decltype(c.begin());
+template <class C> constexpr auto begin(const C& c) -> decltype(c.begin());
+template <class C> constexpr auto end(C& c) -> decltype(c.end());
+template <class C> constexpr auto end(const C& c) -> decltype(c.end());
+template <class T, size_t N> constexpr T* begin(T (&array)[N]);
+template <class T, size_t N> constexpr T* end(T (&array)[N]);
+
+template <class C> auto constexpr cbegin(const C& c) -> decltype(std::begin(c));        // C++14
+template <class C> auto constexpr cend(const C& c) -> decltype(std::end(c));            // C++14
+template <class C> auto constexpr rbegin(C& c) -> decltype(c.rbegin());                 // C++14
+template <class C> auto constexpr rbegin(const C& c) -> decltype(c.rbegin());           // C++14
+template <class C> auto constexpr rend(C& c) -> decltype(c.rend());                     // C++14
+template <class C> constexpr auto rend(const C& c) -> decltype(c.rend());               // C++14
+template <class E> reverse_iterator<const E*> constexpr rbegin(initializer_list<E> il); // C++14
+template <class E> reverse_iterator<const E*> constexpr rend(initializer_list<E> il);   // C++14
+template <class T, size_t N> reverse_iterator<T*> constexpr rbegin(T (&array)[N]);      // C++14
+template <class T, size_t N> reverse_iterator<T*> constexpr rend(T (&array)[N]);        // C++14
+template <class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c));      // C++14
+template <class C> constexpr auto crend(const C& c) -> decltype(std::rend(c));          // C++14
 
 // 24.8, container access:
 template <class C> constexpr auto size(const C& c) -> decltype(c.size());         // C++17
@@ -1616,7 +1616,7 @@ end(_Tp (&__array)[_Np])
 #if !defined(_LIBCPP_CXX03_LANG)
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto
 begin(_Cp& __c) -> decltype(__c.begin())
 {
@@ -1624,7 +1624,7 @@ begin(_Cp& __c) -> decltype(__c.begin())
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto
 begin(const _Cp& __c) -> decltype(__c.begin())
 {
@@ -1632,7 +1632,7 @@ begin(const _Cp& __c) -> decltype(__c.be
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto
 end(_Cp& __c) -> decltype(__c.end())
 {
@@ -1640,7 +1640,7 @@ end(_Cp& __c) -> decltype(__c.end())
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto
 end(const _Cp& __c) -> decltype(__c.end())
 {
@@ -1650,28 +1650,28 @@ end(const _Cp& __c) -> decltype(__c.end(
 #if _LIBCPP_STD_VER > 11
 
 template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
 {
     return reverse_iterator<_Tp*>(__array + _Np);
 }
 
 template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
 {
     return reverse_iterator<_Tp*>(__array);
 }
 
 template <class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
 {
     return reverse_iterator<const _Ep*>(__il.end());
 }
 
 template <class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
 {
     return reverse_iterator<const _Ep*>(__il.begin());
@@ -1692,42 +1692,42 @@ auto cend(const _Cp& __c) -> decltype(_V
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
 {
     return __c.rbegin();
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
 {
     return __c.rbegin();
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto rend(_Cp& __c) -> decltype(__c.rend())
 {
     return __c.rend();
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto rend(const _Cp& __c) -> decltype(__c.rend())
 {
     return __c.rend();
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
 {
     return _VSTD::rbegin(__c);
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
 {
     return _VSTD::rend(__c);

Modified: vendor/libc++/dist/include/new
==============================================================================
--- vendor/libc++/dist/include/new	Wed Jan  4 22:11:36 2017	(r311320)
+++ vendor/libc++/dist/include/new	Wed Jan  4 22:11:41 2017	(r311321)
@@ -162,7 +162,7 @@ _LIBCPP_FUNC_VIS new_handler get_new_han
 
 }  // std
 
-#if !__has_feature(cxx_noexcept)
+#if defined(_LIBCPP_CXX03_LANG)
 #define _THROW_BAD_ALLOC throw(std::bad_alloc)
 #else
 #define _THROW_BAD_ALLOC

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


More information about the svn-src-all mailing list