Update to upstream r216384.

This rebase skips the following patches in upstream:

+ 37025e1b32d44751243257975b9e3d45b2873266
Make the helper routines in string really be constexpr. This required a
bit of refacoring in algorithm as well. Give them better names while
we're at it. All of these are internal rotines; no visible functionality
change.

+ 164b297099f486abe42122fe1aefe7eb741b7acf
Implement string_view from the library fundamentals TS (n4023). Also
works in C++11 and 03, with reduced functionality (mostly in the area of
constexpr)

+ e4694b41295484e5c521d2c281de9330c6d60c79
Formatting improvements in the <string_view> synopsis suggested by
RSmith. No functionality change.

+ 3a61b30f3affb1ba9412793a0a570ac87e6d26b3
Minor cleanup for string_view; mostly from suggestions by Richard Smith.
Also, make the tests pass under c++03

+ 484728789ed4aee35e62c031cb3392a5982a5d0f
string_view enhancements.  Move to the correct namespace. Better
constexpr support (thanks to Richard for the suggestions). Update the
tests to match this. Add <experimental/__config for experimental
macros/etc to live.

+ b1a40264dcb88479e9227faaeb015da8e51fbe79
[libcxx] Add <experimental/utility> header for LFTS.

+ 3ee7233c8072ef912e249e391b35168f559bb239
[libcxx] expose experimental::erased_type for all standard versions.

+ 67740670f980cf43bbc2daf352dff89fd6771008
NFC. Remove trailing whitespace and tabs.

+ b9536101dcc36995794ea81a4f74b5f132211142
NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove
external include guards.

+ 98c4e404ca8c524c54b4e7ede97b807355422b53.
Revert "Turn off extern templates for most uses."

Bug: 17255369
Change-Id: I629ff16275d50e4cc8767b253a2c0542468348d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd36b61..27a26f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,14 +40,27 @@
 option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
 option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
 option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
-option(LIBCXX_ENABLE_CXX0X "Enable -std=c++0x and use of c++0x language features if the compiler supports it." ON)
+option(LIBCXX_ENABLE_CXX1Y "Enable -std=c++1y and use of c++1y language features if the compiler supports it." OFF)
 option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
 option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON)
+if (LIBCXX_BUILT_STANDALONE)
+  set(LLVM_USE_SANITIZER "" CACHE STRING
+      "Define the sanitizer used to build the library and tests")
+endif()
 
 set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
-if (NOT DEFINED LIBCXX_CXX_ABI)
-  set(LIBCXX_CXX_ABI "none")
-endif()
+if (NOT LIBCXX_CXX_ABI)
+  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
+      IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
+    set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
+    set(LIBCXX_LIBCXXABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
+    set(LIBCXX_CXX_ABI_INTREE 1)
+  else ()
+    set(LIBCXX_CXX_ABI_LIBNAME "none")
+  endif ()
+else ()
+  set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
+endif ()
 set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
     "Specify C++ ABI library to use." FORCE)
 set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
@@ -90,16 +103,17 @@
 macro(setup_abi_lib abipathvar abidefines abilibs abifiles abidirs)
   list(APPEND LIBCXX_CXX_FEATURE_FLAGS ${abidefines})
   set(${abipathvar} "${${abipathvar}}"
-    CACHE STRINGS
-    "Paths to ABI include directories separate by ';'."
+    CACHE PATH
+    "Paths to C++ ABI header directories separated by ';'." FORCE
     )
   set(LIBCXX_CXX_ABI_LIBRARIES ${abilibs})
   set(LIBCXX_ABILIB_FILES ${abifiles})
+
   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
   foreach(_d ${abidirs})
     file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/${_d}")
   endforeach()
-  set(LIBCXX_ABILIB_FILE_PATHS)
+
   foreach(fpath ${LIBCXX_ABILIB_FILES})
     set(found FALSE)
     foreach(incpath ${${abipathvar}})
@@ -107,39 +121,33 @@
         set(found TRUE)
         get_filename_component(dstdir ${fpath} PATH)
         get_filename_component(ifile ${fpath} NAME)
-        add_custom_command(
-          OUTPUT "${CMAKE_BINARY_DIR}/include/${dstdir}/${ifile}"
-          COMMAND ${CMAKE_COMMAND} -E copy_if_different
-            "${incpath}/${fpath}"
-            "${CMAKE_BINARY_DIR}/include/${dstdir}"
-          MAIN_DEPENDENCY "${incpath}/${fpath}"
+        file(COPY "${incpath}/${fpath}"
+          DESTINATION "${CMAKE_BINARY_DIR}/include/${dstdir}"
           )
-        list(APPEND LIBCXX_CXX_ABI_DEPS
-          "${CMAKE_BINARY_DIR}/include/${dstdir}/${ifile}"
-          )
+        list(APPEND abilib_headers "${CMAKE_BINARY_DIR}/include/${fpath}")
       endif()
     endforeach()
     if (NOT found)
       message(FATAL_ERROR "Failed to find ${fpath}")
     endif()
   endforeach()
-  add_custom_target(abilib_headers DEPENDS ${LIBCXX_CXX_ABI_DEPS})
-  set(LIBCXX_CXX_ABI_DEPS abilib_headers)
+
+  add_custom_target(LIBCXX_CXX_ABI_DEPS DEPENDS ${abilib_headers})
   include_directories("${CMAKE_BINARY_DIR}/include")
-  install(DIRECTORY "${CMAKE_BINARY_DIR}/include/"
+
+  install(FILES ${abilib_headers}
     DESTINATION include/c++/v1
-    FILES_MATCHING
-    PATTERN "*"
+    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
     )
 endmacro()
 
-if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++" OR
-    "${LIBCXX_CXX_ABI}" STREQUAL "libsupc++")
+if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
+    "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++")
   set(_LIBSUPCXX_INCLUDE_FILES
     cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h
     bits/cxxabi_tweaks.h bits/cxxabi_forced.h
     )
-  if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++")
+  if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++")
     set(_LIBSUPCXX_DEFINES "-DLIBSTDCXX")
     set(_LIBSUPCXX_LIBNAME stdc++)
   else()
@@ -150,15 +158,22 @@
     "-D__GLIBCXX__ ${_LIBSUPCXX_DEFINES}"
     "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits"
     )
-elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
+  if (LIBCXX_CXX_ABI_INTREE)
+    # Link against just-built "cxxabi" target.
+    set(CXXABI_LIBNAME cxxabi)
+  else()
+    # Assume c++abi is installed in the system, rely on -lc++abi link flag.
+    set(CXXABI_LIBNAME "c++abi")
+  endif()
   setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
-    "c++abi" "cxxabi.h" ""
+    ${CXXABI_LIBNAME} "cxxabi.h" ""
     )
-elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt")
   setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"
     "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
     )
-elseif (NOT "${LIBCXX_CXX_ABI}" STREQUAL "none")
+elseif (NOT "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
   message(FATAL_ERROR
     "Currently libstdc++, libsupc++, libcxxabi, libcxxrt and none are "
     "supported for c++ abi."
@@ -181,10 +196,25 @@
 else()
   if (LIBCXX_HAS_NOSTDINCXX_FLAG)
     list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -nostdinc++)
+    string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   endif()
-  if (LIBCXX_ENABLE_CXX0X AND LIBCXX_HAS_STDCXX0X_FLAG)
-    list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -std=c++0x)
+  # If c++1y has been enabled then attempt to use it. Fail if it is no supported
+  # by the compiler. Otherwise choose c++11 and ensure the compiler supports it.
+  if (LIBCXX_ENABLE_CXX1Y)
+    if (LIBCXX_HAS_STDCXX1Y_FLAG)
+      set(LIBCXX_STD_VERSION c++1y)
+    else()
+      message(FATAL_ERROR "c++1y was enabled but the compiler does not support it.")
+    endif()
+  else()
+    if (LIBCXX_HAS_STDCXX11_FLAG)
+      set(LIBCXX_STD_VERSION c++11)
+    else()
+      message(FATAL_ERROR "c++11 is required by libc++ but is not supported by the compiler")
+    endif()
   endif()
+  # LIBCXX_STD_VERSION should always be set at this point.
+  list(APPEND LIBCXX_CXX_REQUIRED_FLAGS "-std=${LIBCXX_STD_VERSION}")
 endif()
 
 macro(append_if list condition var)
@@ -259,6 +289,29 @@
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 endif()
 
+# Configure for sanitizers. If LIBCXX_BUILT_STANDALONE then we have to do
+# the flag translation ourselves. Othewise LLVM's CMakeList.txt will handle it.
+if (LIBCXX_BUILT_STANDALONE)
+  # NOTE: LLVM_USE_SANITIZER checks for a UNIX like system instead of MSVC.
+  # But we don't have LLVM_ON_UNIX so checking for MSVC is the best we can do.
+  if (LLVM_USE_SANITIZER AND NOT MSVC)
+    append_if(LIBCXX_CXX_FEATURE_FLAGS LIBCXX_HAS_NO_OMIT_FRAME_POINTER_FLAG
+            "-fno-omit-frame-pointer")
+    if (LLVM_USE_SANITIZER STREQUAL "Address")
+      list(APPEND LIBCXX_CXX_FEATURE_FLAGS "-fsanitize=address")
+    elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
+      list(APPEND LIBCXX_CXX_FEATURE_FLAGS "-fsanitize=memory")
+      if (LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
+        list(APPEND LIBCXX_CXX_FEATURE_FLAGS "-fsanitize-memory-track-origins")
+      endif()
+    else()
+      message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
+    endif()
+  elseif(MSVC)
+    message(WARNING "LLVM_USE_SANITIZER is not supported with MSVC")
+  endif()
+endif()
+
 string(REPLACE ";" " " LIBCXX_CXX_REQUIRED_FLAGS "${LIBCXX_CXX_REQUIRED_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_REQUIRED_FLAGS}")
 
diff --git a/CREDITS.TXT b/CREDITS.TXT
index 368b526..7a28ada 100644
--- a/CREDITS.TXT
+++ b/CREDITS.TXT
@@ -33,6 +33,10 @@
 E: marshall@idio.com
 D: C++14 support, patches and bug fixes.
 
+N: Eric Fiselier
+E: eric@efcs.ca
+D: LFTS support, patches and bug fixes.
+
 N: Bill Fisher
 E: william.w.fisher@gmail.com
 D: Regex bug fixes.
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index e8adafd..2596787 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -2,26 +2,28 @@
 include(CheckCXXCompilerFlag)
 
 # Check compiler flags
-check_cxx_compiler_flag(-std=c++0x            LIBCXX_HAS_STDCXX0X_FLAG)
-check_cxx_compiler_flag(-fPIC                 LIBCXX_HAS_FPIC_FLAG)
-check_cxx_compiler_flag(-nodefaultlibs        LIBCXX_HAS_NODEFAULTLIBS_FLAG)
-check_cxx_compiler_flag(-nostdinc++           LIBCXX_HAS_NOSTDINCXX_FLAG)
-check_cxx_compiler_flag(-Wall                 LIBCXX_HAS_WALL_FLAG)
-check_cxx_compiler_flag(-W                    LIBCXX_HAS_W_FLAG)
-check_cxx_compiler_flag(-Wno-unused-parameter LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)
-check_cxx_compiler_flag(-Wwrite-strings       LIBCXX_HAS_WWRITE_STRINGS_FLAG)
-check_cxx_compiler_flag(-Wno-long-long        LIBCXX_HAS_WNO_LONG_LONG_FLAG)
-check_cxx_compiler_flag(-pedantic             LIBCXX_HAS_PEDANTIC_FLAG)
-check_cxx_compiler_flag(-Werror               LIBCXX_HAS_WERROR_FLAG)
-check_cxx_compiler_flag(-Wno-error            LIBCXX_HAS_WNO_ERROR_FLAG)
-check_cxx_compiler_flag(-fno-exceptions       LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)
-check_cxx_compiler_flag(-fno-rtti             LIBCXX_HAS_FNO_RTTI_FLAG)
-check_cxx_compiler_flag(/WX                   LIBCXX_HAS_WX_FLAG)
-check_cxx_compiler_flag(/WX-                  LIBCXX_HAS_NO_WX_FLAG)
-check_cxx_compiler_flag(/EHsc                 LIBCXX_HAS_EHSC_FLAG)
-check_cxx_compiler_flag(/EHs-                 LIBCXX_HAS_NO_EHS_FLAG)
-check_cxx_compiler_flag(/EHa-                 LIBCXX_HAS_NO_EHA_FLAG)
-check_cxx_compiler_flag(/GR-                  LIBCXX_HAS_NO_GR_FLAG)
+check_cxx_compiler_flag(-std=c++11              LIBCXX_HAS_STDCXX11_FLAG)
+check_cxx_compiler_flag(-std=c++1y              LIBCXX_HAS_STDCXX1Y_FLAG)
+check_cxx_compiler_flag(-fPIC                   LIBCXX_HAS_FPIC_FLAG)
+check_cxx_compiler_flag(-fno-omit-frame-pointer LIBCXX_HAS_NO_OMIT_FRAME_POINTER_FLAG)
+check_cxx_compiler_flag(-nodefaultlibs          LIBCXX_HAS_NODEFAULTLIBS_FLAG)
+check_cxx_compiler_flag(-nostdinc++             LIBCXX_HAS_NOSTDINCXX_FLAG)
+check_cxx_compiler_flag(-Wall                   LIBCXX_HAS_WALL_FLAG)
+check_cxx_compiler_flag(-W                      LIBCXX_HAS_W_FLAG)
+check_cxx_compiler_flag(-Wno-unused-parameter   LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)
+check_cxx_compiler_flag(-Wwrite-strings         LIBCXX_HAS_WWRITE_STRINGS_FLAG)
+check_cxx_compiler_flag(-Wno-long-long          LIBCXX_HAS_WNO_LONG_LONG_FLAG)
+check_cxx_compiler_flag(-pedantic               LIBCXX_HAS_PEDANTIC_FLAG)
+check_cxx_compiler_flag(-Werror                 LIBCXX_HAS_WERROR_FLAG)
+check_cxx_compiler_flag(-Wno-error              LIBCXX_HAS_WNO_ERROR_FLAG)
+check_cxx_compiler_flag(-fno-exceptions         LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)
+check_cxx_compiler_flag(-fno-rtti               LIBCXX_HAS_FNO_RTTI_FLAG)
+check_cxx_compiler_flag(/WX                     LIBCXX_HAS_WX_FLAG)
+check_cxx_compiler_flag(/WX-                    LIBCXX_HAS_NO_WX_FLAG)
+check_cxx_compiler_flag(/EHsc                   LIBCXX_HAS_EHSC_FLAG)
+check_cxx_compiler_flag(/EHs-                   LIBCXX_HAS_NO_EHS_FLAG)
+check_cxx_compiler_flag(/EHa-                   LIBCXX_HAS_NO_EHA_FLAG)
+check_cxx_compiler_flag(/GR-                    LIBCXX_HAS_NO_GR_FLAG)
 
 # Check libraries
 check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 0c88b7f..bbf7ea4 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -2,15 +2,12 @@
   set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE)
 endif()
 
-file(COPY .
-  DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1"
+install(DIRECTORY .
+  DESTINATION include/c++/v1
   FILES_MATCHING
   PATTERN "*"
   PATTERN "CMakeLists.txt" EXCLUDE
   PATTERN ".svn" EXCLUDE
   ${LIBCXX_SUPPORT_HEADER_PATTERN}
-  )
-
-install(DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/"
-  DESTINATION include/c++/v1/
+  PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
   )
diff --git a/include/__bit_reference b/include/__bit_reference
index 37b7923..d9ebfbe 100644
--- a/include/__bit_reference
+++ b/include/__bit_reference
@@ -174,7 +174,7 @@
         if (__b)
             return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
         if (__n == __dn)
-            return _It(__first.__seg_, __first.__ctz_ + __n);
+            return __first + __n;
         __n -= __dn;
         ++__first.__seg_;
     }
@@ -210,7 +210,7 @@
         if (__b)
             return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
         if (__n == __dn)
-            return _It(__first.__seg_, __first.__ctz_ + __n);
+            return __first + __n;
         __n -= __dn;
         ++__first.__seg_;
     }
diff --git a/include/__config b/include/__config
index e1c5a67..d20aecb 100644
--- a/include/__config
+++ b/include/__config
@@ -313,6 +313,10 @@
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
+#if !(__has_feature(cxx_relaxed_constexpr))
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+#endif
+
 #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
 #if defined(__FreeBSD__)
 #define _LIBCPP_HAS_QUICK_EXIT
@@ -341,7 +345,11 @@
 #endif
 
 #if __has_feature(underlying_type)
-#  define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
+#  define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#endif
+
+#if __has_feature(is_literal)
+#  define _LIBCPP_IS_LITERAL(T) __is_literal(T)
 #endif
 
 // Inline namespaces are available in Clang regardless of C++ dialect.
@@ -354,6 +362,10 @@
   }
 }
 
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
 #elif defined(__GNUC__)
 
 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -361,12 +373,27 @@
 
 #define _LIBCPP_NORETURN __attribute__((noreturn))
 
+#if _GNUC_VER >= 407
+#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
+#endif
+
 #if !__EXCEPTIONS
 #define _LIBCPP_NO_EXCEPTIONS
 #endif
 
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+// constexpr was added to GCC in 4.6.
+#if _GNUC_VER < 406
 #define _LIBCPP_HAS_NO_CONSTEXPR
+// Can only use constexpr in c++11 mode.
+#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
+#define _LIBCPP_HAS_NO_CONSTEXPR
+#endif
+
+// No version of GCC supports relaxed constexpr rules
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
 
 #define _NOEXCEPT throw()
 #define _NOEXCEPT_(x)
@@ -428,11 +455,16 @@
 using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
 }
 
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
 #elif defined(_LIBCPP_MSVC)
 
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
 #define _LIBCPP_HAS_NO_CONSTEXPR
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
@@ -453,6 +485,8 @@
 namespace std {
 }
 
+#define _LIBCPP_HAS_NO_ASAN
+
 #elif defined(__IBMCPP__)
 
 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -485,6 +519,8 @@
   }
 }
 
+#define _LIBCPP_HAS_NO_ASAN
+
 #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
 
 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
@@ -533,12 +569,20 @@
 #define __has_feature(__x) 0
 #endif
 
+#ifndef __has_builtin
+#define __has_builtin(__x) 0
+#endif
+
 #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
 #   define _LIBCPP_EXPLICIT explicit
 #else
 #   define _LIBCPP_EXPLICIT
 #endif
 
+#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete)
+#   define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
+#endif
+
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
 #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
@@ -579,7 +623,7 @@
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 #define _DECLARE_C99_LDBL_MATH 1
 #endif
 
@@ -598,8 +642,10 @@
 #ifndef _LIBCPP_STD_VER
 #  if  __cplusplus <= 201103L
 #    define _LIBCPP_STD_VER 11
+#  elif __cplusplus <= 201402L
+#    define _LIBCPP_STD_VER 14
 #  else
-#    define _LIBCPP_STD_VER 13  // current year, or date of c++14 ratification
+#    define _LIBCPP_STD_VER 15  // current year, or date of c++17 ratification
 #  endif
 #endif  // _LIBCPP_STD_VER
 
@@ -610,15 +656,24 @@
 #endif
 
 #if _LIBCPP_STD_VER <= 11
-#define _LIBCPP_CONSTEXPR_AFTER_CXX11
 #define _LIBCPP_EXPLICIT_AFTER_CXX11
 #define _LIBCPP_DEPRECATED_AFTER_CXX11
 #else
-#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
 #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
 #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
 #endif
 
+#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#else
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11
+#endif
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __sanitizer_annotate_contiguous_container(
+  const void *, const void *, const void *, const void *);
+#endif
+
 // Try to find out if RTTI is disabled.
 // g++ and cl.exe have RTTI on by default and define a macro when it is.
 // g++ only defines the macro in 4.3.2 and onwards.
diff --git a/include/__functional_03 b/include/__functional_03
index 2582601..d8a9f05 100644
--- a/include/__functional_03
+++ b/include/__functional_03
@@ -651,9 +651,14 @@
     __base* __f_;
 
     template <class _Fp>
+        _LIBCPP_INLINE_VISIBILITY
         static bool __not_null(const _Fp&) {return true;}
     template <class _R2>
-        static bool __not_null(const function<_Rp()>& __p) {return __p;}
+        _LIBCPP_INLINE_VISIBILITY
+        static bool __not_null(_R2 (*__p)()) {return __p;}
+    template <class _R2>
+        _LIBCPP_INLINE_VISIBILITY
+        static bool __not_null(const function<_R2()>& __p) {return __p;}
 public:
     typedef _Rp result_type;
 
@@ -955,7 +960,7 @@
         static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;}
     template <class _R2, class _B0>
         _LIBCPP_INLINE_VISIBILITY
-        static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;}
+        static bool __not_null(const function<_R2(_B0)>& __p) {return __p;}
 public:
     typedef _Rp result_type;
 
@@ -1257,7 +1262,7 @@
         static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;}
     template <class _R2, class _B0, class _B1>
         _LIBCPP_INLINE_VISIBILITY
-        static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;}
+        static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;}
 public:
     typedef _Rp result_type;
 
@@ -1558,7 +1563,7 @@
         static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;}
     template <class _R2, class _B0, class _B1, class _B2>
         _LIBCPP_INLINE_VISIBILITY
-        static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;}
+        static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;}
 public:
     typedef _Rp result_type;
 
@@ -1911,7 +1916,7 @@
 typename __mu_return1<true, _Ti, _Uj...>::type
 __mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>)
 {
-    __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj))...);
+    __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj))...);
 }
 
 template <class _Ti, class ..._Uj>
@@ -1947,9 +1952,9 @@
 {
     const size_t _Indx = is_placeholder<_Ti>::value - 1;
     // compiler bug workaround
-    typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj);
+    typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj);
     return __t;
-//    return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj));
+//    return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj));
 }
 
 template <class _Ti, class _Uj>
@@ -2040,7 +2045,7 @@
 __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
                 _Args&& __args)
 {
-    return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
+    return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...);
 }
 
 template<class _Fp, class ..._BoundArgs>
diff --git a/include/__functional_base_03 b/include/__functional_base_03
index f297ee0..22c06ad 100644
--- a/include/__functional_base_03
+++ b/include/__functional_base_03
@@ -1027,7 +1027,7 @@
        typename __invoke_return0<type&, _A0>::type
           operator() (_A0& __a0) const
           {
-              return __invoke(get(), __a0);
+              return __invoke<type&, _A0>(get(), __a0);
           }
 
     template <class _A0, class _A1>
@@ -1035,7 +1035,7 @@
        typename __invoke_return1<type&, _A0, _A1>::type
           operator() (_A0& __a0, _A1& __a1) const
           {
-              return __invoke(get(), __a0, __a1);
+              return __invoke<type&, _A0, _A1>(get(), __a0, __a1);
           }
 
     template <class _A0, class _A1, class _A2>
@@ -1043,7 +1043,7 @@
        typename __invoke_return2<type&, _A0, _A1, _A2>::type
           operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
           {
-              return __invoke(get(), __a0, __a1, __a2);
+              return __invoke<type&, _A0, _A1, _A2>(get(), __a0, __a1, __a2);
           }
 };
 
diff --git a/include/__sso_allocator b/include/__sso_allocator
index 7240072..645f2ba 100644
--- a/include/__sso_allocator
+++ b/include/__sso_allocator
@@ -55,14 +55,14 @@
             __allocated_ = true;
             return (pointer)&buf_;
         }
-        return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));
+        return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));
     }
     _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type)
     {
         if (__p == (pointer)&buf_)
             __allocated_ = false;
         else
-            ::operator delete(__p);
+            _VSTD::__deallocate(__p);
     }
     _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
 
diff --git a/include/__tree b/include/__tree
index acf8759..8e5447a 100644
--- a/include/__tree
+++ b/include/__tree
@@ -1980,9 +1980,9 @@
         __begin_node() = __r.__ptr_;
     --size();
     __node_allocator& __na = __node_alloc();
-    __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
     __tree_remove(__end_node()->__left_,
                   static_cast<__node_base_pointer>(__np));
+    __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
     __node_traits::deallocate(__na, __np, 1);
     return __r;
 }
diff --git a/include/__tuple b/include/__tuple
index de35cb8..ee5b916 100644
--- a/include/__tuple
+++ b/include/__tuple
@@ -27,6 +27,32 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+// __lazy_and
+
+template <bool _Last, class ..._Preds>
+struct __lazy_and_impl;
+
+template <class ..._Preds>
+struct __lazy_and_impl<false, _Preds...> : false_type {};
+
+template <>
+struct __lazy_and_impl<true> : true_type {};
+
+template <class _Pred>
+struct __lazy_and_impl<true, _Pred> : integral_constant<bool, _Pred::type::value> {};
+
+template <class _Hp, class ..._Tp>
+struct __lazy_and_impl<true, _Hp, _Tp...> : __lazy_and_impl<_Hp::type::value, _Tp...> {};
+
+template <class _P1, class ..._Pr>
+struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {};
+
+// __lazy_not
+
+template <class _Pred>
+struct __lazy_not : integral_constant<bool, !_Pred::type::value> {};
+
+
 template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size;
 
 template <class _Tp>
diff --git a/include/algorithm b/include/algorithm
index 303ec7d..1fed6e9 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -4784,49 +4784,8 @@
 
 template <class _Compare, class _RandomAccessIterator>
 void
-__push_heap_front(_RandomAccessIterator __first, _RandomAccessIterator, _Compare __comp,
-                  typename iterator_traits<_RandomAccessIterator>::difference_type __len)
-{
-    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
-    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
-    if (__len > 1)
-    {
-        difference_type __p = 0;
-        _RandomAccessIterator __pp = __first;
-        difference_type __c = 2;
-        _RandomAccessIterator __cp = __first + __c;
-        if (__c == __len || __comp(*__cp, *(__cp - 1)))
-        {
-            --__c;
-            --__cp;
-        }
-        if (__comp(*__pp, *__cp))
-        {
-            value_type __t(_VSTD::move(*__pp));
-            do
-            {
-                *__pp = _VSTD::move(*__cp);
-                __pp = __cp;
-                __p = __c;
-                __c = (__p + 1) * 2;
-                if (__c > __len)
-                    break;
-                __cp = __first + __c;
-                if (__c == __len || __comp(*__cp, *(__cp - 1)))
-                {
-                    --__c;
-                    --__cp;
-                }
-            } while (__comp(__t, *__cp));
-            *__pp = _VSTD::move(__t);
-        }
-    }
-}
-
-template <class _Compare, class _RandomAccessIterator>
-void
-__push_heap_back(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
-                 typename iterator_traits<_RandomAccessIterator>::difference_type __len)
+__sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
+          typename iterator_traits<_RandomAccessIterator>::difference_type __len)
 {
     typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
     typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
@@ -4859,10 +4818,10 @@
 #ifdef _LIBCPP_DEBUG
     typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
     __debug_less<_Compare> __c(__comp);
-    __push_heap_back<_Comp_ref>(__first, __last, __c, __last - __first);
+    __sift_up<_Comp_ref>(__first, __last, __c, __last - __first);
 #else  // _LIBCPP_DEBUG
     typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
-    __push_heap_back<_Comp_ref>(__first, __last, __comp, __last - __first);
+    __sift_up<_Comp_ref>(__first, __last, __comp, __last - __first);
 #endif  // _LIBCPP_DEBUG
 }
 
@@ -4877,6 +4836,60 @@
 // pop_heap
 
 template <class _Compare, class _RandomAccessIterator>
+void
+__sift_down(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
+            typename iterator_traits<_RandomAccessIterator>::difference_type __len,
+            _RandomAccessIterator __start)
+{
+    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
+    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
+    // left-child of __start is at 2 * __start + 1
+    // right-child of __start is at 2 * __start + 2
+    difference_type __child = __start - __first;
+
+    if (__len < 2 || (__len - 2) / 2 < __child)
+        return;
+
+    __child = 2 * __child + 1;
+    _RandomAccessIterator __child_i = __first + __child;
+
+    if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + 1))) {
+        // right-child exists and is greater than left-child
+        ++__child_i;
+        ++__child;
+    }
+
+    // check if we are in heap-order
+    if (__comp(*__child_i, *__start))
+        // we are, __start is larger than it's largest child
+        return;
+
+    value_type __top(_VSTD::move(*__start));
+    do
+    {
+        // we are not in heap-order, swap the parent with it's largest child
+        *__start = _VSTD::move(*__child_i);
+        __start = __child_i;
+
+        if ((__len - 2) / 2 < __child)
+            break;
+
+        // recompute the child based off of the updated parent
+        __child = 2 * __child + 1;
+        __child_i = __first + __child;
+
+        if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + 1))) {
+            // right-child exists and is greater than left-child
+            ++__child_i;
+            ++__child;
+        }
+
+        // check if we are in heap-order
+    } while (!__comp(*__child_i, __top));
+    *__start = _VSTD::move(__top);
+}
+
+template <class _Compare, class _RandomAccessIterator>
 inline _LIBCPP_INLINE_VISIBILITY
 void
 __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
@@ -4885,7 +4898,7 @@
     if (__len > 1)
     {
         swap(*__first, *--__last);
-        __push_heap_front<_Compare>(__first, __last, __comp, __len-1);
+        __sift_down<_Compare>(__first, __last, __comp, __len - 1, __first);
     }
 }
 
@@ -4922,10 +4935,11 @@
     difference_type __n = __last - __first;
     if (__n > 1)
     {
-        __last = __first;
-        ++__last;
-        for (difference_type __i = 1; __i < __n;)
-            __push_heap_back<_Compare>(__first, ++__last, __comp, ++__i);
+        // start from the first parent, there is no need to consider children
+        for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start)
+        {
+            __sift_down<_Compare>(__first, __last, __comp, __n, __first + __start);
+        }
     }
 }
 
@@ -5000,7 +5014,7 @@
         if (__comp(*__i, *__first))
         {
             swap(*__i, *__first);
-            __push_heap_front<_Compare>(__first, __middle, __comp, __len);
+            __sift_down<_Compare>(__first, __middle, __comp, __len, __first);
         }
     }
     __sort_heap<_Compare>(__first, __middle, __comp);
@@ -5041,15 +5055,15 @@
     _RandomAccessIterator __r = __result_first;
     if (__r != __result_last)
     {
-        typename iterator_traits<_RandomAccessIterator>::difference_type __len = 0;
-        for (; __first != __last && __r != __result_last; ++__first, ++__r, ++__len)
+        for (; __first != __last && __r != __result_last; ++__first, ++__r)
             *__r = *__first;
         __make_heap<_Compare>(__result_first, __r, __comp);
+        typename iterator_traits<_RandomAccessIterator>::difference_type __len = __r - __result_first;
         for (; __first != __last; ++__first)
             if (__comp(*__first, *__result_first))
             {
                 *__result_first = *__first;
-                __push_heap_front<_Compare>(__result_first, __r, __comp, __len);
+                __sift_down<_Compare>(__result_first, __r, __comp, __len, __result_first);
             }
         __sort_heap<_Compare>(__result_first, __r, __comp);
     }
diff --git a/include/bitset b/include/bitset
index 4cc7dbd..8c278cc 100644
--- a/include/bitset
+++ b/include/bitset
@@ -249,9 +249,9 @@
 _LIBCPP_CONSTEXPR
 __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
 #ifndef _LIBCPP_HAS_NO_CONSTEXPR
-#if __SIZE_WIDTH__ == 64
+#if __SIZEOF_SIZE_T__ == 8
     : __first_{__v}
-#elif __SIZE_WIDTH__ == 32
+#elif __SIZEOF_SIZE_T__ == 4
     : __first_{__v, __v >> __bits_per_word}
 #else
 #error This constructor has not been ported to this platform
diff --git a/include/experimental/dynarray b/include/experimental/dynarray
index 7c5c9b3..0bc8dfe 100644
--- a/include/experimental/dynarray
+++ b/include/experimental/dynarray
@@ -38,18 +38,18 @@
 public:
     // construct/copy/destroy:
     explicit dynarray(size_type c);
-    template <typename Alloc>
-      dynarray(size_type c, const Alloc& alloc);
     dynarray(size_type c, const T& v);
-    template <typename Alloc>
-      dynarray(size_type c, const T& v, const Alloc& alloc);
     dynarray(const dynarray& d);
-    template <typename Alloc>
-      dynarray(const dynarray& d, const Alloc& alloc);
     dynarray(initializer_list<T>);
-    template <typename Alloc>
-      dynarray(initializer_list<T>, const Alloc& alloc);
 
+    template <class Alloc>
+      dynarray(allocator_arg_t, const Alloc& a, size_type c, const Alloc& alloc);
+    template <class Alloc>
+      dynarray(allocator_arg_t, const Alloc& a, size_type c, const T& v, const Alloc& alloc);
+    template <class Alloc>
+      dynarray(allocator_arg_t, const Alloc& a, const dynarray& d, const Alloc& alloc);
+    template <class Alloc>
+      dynarray(allocator_arg_t, const Alloc& a, initializer_list<T>, const Alloc& alloc);
     dynarray& operator=(const dynarray&) = delete;
     ~dynarray();
 
@@ -147,12 +147,12 @@
             assert(!"dynarray::allocation");
 #endif
         }
-        return static_cast<value_type *> (::operator new (sizeof(value_type) * count));
+        return static_cast<value_type *> (_VSTD::__allocate (sizeof(value_type) * count));
     }
 
     static inline _LIBCPP_INLINE_VISIBILITY void __deallocate ( value_type* __ptr ) noexcept
     {
-        ::operator delete (static_cast<void *> (__ptr));
+        _VSTD::__deallocate (static_cast<void *> (__ptr));
     }
 
 public:
@@ -163,15 +163,15 @@
     dynarray(initializer_list<value_type>);
 
 //  We're not implementing these right now.
-//  Waiting for the resolution of LWG issue #2235
+//  Updated with the resolution of LWG issue #2255
 //     template <typename _Alloc>
-//       dynarray(size_type __c, const _Alloc& __alloc);
+//       dynarray(allocator_arg_t, const _Alloc& __alloc, size_type __c);
 //     template <typename _Alloc>
-//       dynarray(size_type __c, const value_type& __v, const _Alloc& __alloc);
+//       dynarray(allocator_arg_t, const _Alloc& __alloc, size_type __c, const value_type& __v);
 //     template <typename _Alloc>
-//       dynarray(const dynarray& __d, const _Alloc& __alloc);
+//       dynarray(allocator_arg_t, const _Alloc& __alloc, const dynarray& __d);
 //     template <typename _Alloc>
-//       dynarray(initializer_list<value_type>, const _Alloc& __alloc);
+//       dynarray(allocator_arg_t, const _Alloc& __alloc, initializer_list<value_type>);
 
     dynarray& operator=(const dynarray&) = delete;
     ~dynarray();
diff --git a/include/forward_list b/include/forward_list
index 72d31dc..a83b195 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -1421,6 +1421,7 @@
 void
 forward_list<_Tp, _Alloc>::remove(const value_type& __v)
 {
+    forward_list<_Tp, _Alloc> __deleted_nodes; // collect the nodes we're removing
     iterator __e = end();
     for (iterator __i = before_begin(); __i.__ptr_->__next_ != nullptr;)
     {
@@ -1429,7 +1430,7 @@
             iterator __j = _VSTD::next(__i, 2);
             for (; __j != __e && *__j == __v; ++__j)
                 ;
-            erase_after(__i, __j);
+			__deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j);
             if (__j == __e)
                 break;
             __i = __j;
diff --git a/include/functional b/include/functional
index 891ed46..416a9a9 100644
--- a/include/functional
+++ b/include/functional
@@ -1421,7 +1421,7 @@
         static bool __not_null(_R2 (_Cp::*__p)(_Ap...) const volatile) {return __p;}
     template <class _R2, class ..._Ap>
         _LIBCPP_INLINE_VISIBILITY
-        static bool __not_null(const function<_Rp(_Ap...)>& __p) {return __p;}
+        static bool __not_null(const function<_R2(_Ap...)>& __p) {return !!__p;}
 
     template <class _Fp, bool = !is_same<_Fp, function>::value &&
                                 __invokable<_Fp&, _ArgTypes...>::value>
@@ -1617,21 +1617,22 @@
     if (__not_null(__f))
     {
         typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _FF;
-        if (sizeof(_FF) <= sizeof(__buf_) && is_nothrow_copy_constructible<_Fp>::value)
+        typedef typename __alloc_traits::template
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+            rebind_alloc<_FF>
+#else
+            rebind_alloc<_FF>::other
+#endif
+            _Ap;
+        _Ap __a(__a0);
+        if (sizeof(_FF) <= sizeof(__buf_) && 
+            is_nothrow_copy_constructible<_Fp>::value && is_nothrow_copy_constructible<_Ap>::value)
         {
             __f_ = (__base*)&__buf_;
-            ::new (__f_) _FF(_VSTD::move(__f));
+            ::new (__f_) _FF(_VSTD::move(__f), _Alloc(__a));
         }
         else
         {
-            typedef typename __alloc_traits::template
-#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
-                rebind_alloc<_FF>
-#else
-                rebind_alloc<_FF>::other
-#endif
-                                                         _Ap;
-            _Ap __a(__a0);
             typedef __allocator_destructor<_Ap> _Dp;
             unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
             ::new (__hold.get()) _FF(_VSTD::move(__f), _Alloc(__a));
@@ -1857,7 +1858,7 @@
 typename __invoke_of<_Ti&, _Uj...>::type
 __mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>)
 {
-    return __ti(_VSTD::forward<_Uj>(get<_Indx>(__uj))...);
+    return __ti(_VSTD::forward<_Uj>(_VSTD::get<_Indx>(__uj))...);
 }
 
 template <class _Ti, class ..._Uj>
@@ -1892,7 +1893,7 @@
 __mu(_Ti&, _Uj& __uj)
 {
     const size_t _Indx = is_placeholder<_Ti>::value - 1;
-    return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj));
+    return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj));
 }
 
 template <class _Ti, class _Uj>
@@ -2019,7 +2020,7 @@
 __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
                 _Args&& __args)
 {
-    return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
+    return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...);
 }
 
 template<class _Fp, class ..._BoundArgs>
diff --git a/include/future b/include/future
index 73d5456..de00f25 100644
--- a/include/future
+++ b/include/future
@@ -1872,7 +1872,7 @@
 __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
     : __f_(nullptr)
 {
-    typedef typename remove_reference<_Fp>::type _FR;
+    typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
     typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF;
     if (sizeof(_FF) <= sizeof(__buf_))
     {
@@ -1897,7 +1897,7 @@
     : __f_(nullptr)
 {
     typedef allocator_traits<_Alloc> __alloc_traits;
-    typedef typename remove_reference<_Fp>::type _FR;
+    typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
     typedef __packaged_task_func<_FR, _Alloc, _Rp(_ArgTypes...)> _FF;
     if (sizeof(_FF) <= sizeof(__buf_))
     {
diff --git a/include/limits b/include/limits
index d917c57..1acf03e 100644
--- a/include/limits
+++ b/include/limits
@@ -235,7 +235,7 @@
 
     static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
     static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = true;
+    static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value;
 
 #if __i386__ || __x86_64__
     static _LIBCPP_CONSTEXPR const bool traps = true;
@@ -768,7 +768,7 @@
 template <class _Tp>
     _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
 template <class _Tp>
-    const int numeric_limits<const volatile _Tp>::max_digits10;
+    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
 template <class _Tp>
     _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
 template <class _Tp>
diff --git a/include/list b/include/list
index 800a1a3..c36786d 100644
--- a/include/list
+++ b/include/list
@@ -214,10 +214,13 @@
     pointer __next_;
 
     _LIBCPP_INLINE_VISIBILITY
-    __list_node_base()
-        : __prev_(static_cast<pointer>(pointer_traits<__base_pointer>::pointer_to(*this))),
-          __next_(static_cast<pointer>(pointer_traits<__base_pointer>::pointer_to(*this)))
-          {}
+    __list_node_base() : __prev_(__self()), __next_(__self()) {}
+
+    _LIBCPP_INLINE_VISIBILITY
+    pointer __self()
+    {
+        return static_cast<pointer>(pointer_traits<__base_pointer>::pointer_to(*this));
+    }
 };
 
 template <class _Tp, class _VoidPtr>
@@ -753,20 +756,14 @@
     swap(__sz(), __c.__sz());
     swap(__end_, __c.__end_);
     if (__sz() == 0)
-        __end_.__next_ = __end_.__prev_ = static_cast<__node_pointer>(
-                       pointer_traits<__node_base_pointer>::pointer_to(__end_));
+        __end_.__next_ = __end_.__prev_ = __end_.__self();
     else
-        __end_.__prev_->__next_ = __end_.__next_->__prev_
-                                = static_cast<__node_pointer>(
-                       pointer_traits<__node_base_pointer>::pointer_to(__end_));
+        __end_.__prev_->__next_ = __end_.__next_->__prev_ = __end_.__self();
     if (__c.__sz() == 0)
-        __c.__end_.__next_ = __c.__end_.__prev_
-                           = static_cast<__node_pointer>(
-                       pointer_traits<__node_base_pointer>::pointer_to(__c.__end_));
+        __c.__end_.__next_ = __c.__end_.__prev_ = __c.__end_.__self();
     else
-        __c.__end_.__prev_->__next_ = __c.__end_.__next_->__prev_
-                                    = static_cast<__node_pointer>(
-                       pointer_traits<__node_base_pointer>::pointer_to(__c.__end_));
+        __c.__end_.__prev_->__next_ = __c.__end_.__next_->__prev_ = __c.__end_.__self();
+
 #if _LIBCPP_DEBUG_LEVEL >= 2
     __libcpp_db* __db = __get_db();
     __c_node* __cn1 = __db->__find_c_and_lock(this);
@@ -1059,7 +1056,9 @@
 #endif  // _LIBCPP_DEBUG_LEVEL >= 2
 
 private:
-    static void __link_nodes(__node_pointer __p, __node_pointer __f, __node_pointer __l);
+    static void __link_nodes  (__node_pointer __p, __node_pointer __f, __node_pointer __l);
+    void __link_nodes_at_front(__node_pointer __f, __node_pointer __l);
+    void __link_nodes_at_back (__node_pointer __f, __node_pointer __l);
     iterator __iterator(size_type __n);
     template <class _Comp>
         static iterator __sort(iterator __f1, iterator __e2, size_type __n, _Comp& __comp);
@@ -1081,6 +1080,31 @@
     __l->__next_ = __p;
 }
 
+// Link in nodes [__f, __l] at the front of the list
+template <class _Tp, class _Alloc>
+inline _LIBCPP_INLINE_VISIBILITY
+void
+list<_Tp, _Alloc>::__link_nodes_at_front(__node_pointer __f, __node_pointer __l)
+{
+    __f->__prev_ = base::__end_.__self();
+    __l->__next_ = base::__end_.__next_;
+    __l->__next_->__prev_ = __l;
+    base::__end_.__next_ = __f;
+}
+
+// Link in nodes [__f, __l] at the front of the list
+template <class _Tp, class _Alloc>
+inline _LIBCPP_INLINE_VISIBILITY
+void
+list<_Tp, _Alloc>::__link_nodes_at_back(__node_pointer __f, __node_pointer __l)
+{
+    __l->__next_ = base::__end_.__self();
+    __f->__prev_ = base::__end_.__prev_;
+    __f->__prev_->__next_ = __f;
+    base::__end_.__prev_ = __l;
+}
+
+
 template <class _Tp, class _Alloc>
 inline _LIBCPP_INLINE_VISIBILITY
 typename list<_Tp, _Alloc>::iterator
@@ -1502,7 +1526,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
-    __link_nodes(base::__end_.__next_, __hold.get(), __hold.get());
+    __link_nodes_at_front(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1515,8 +1539,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
-    __link_nodes(static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::
-                         pointer_to(base::__end_)), __hold.get(), __hold.get());
+    __link_nodes_at_back(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1531,7 +1554,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x));
-    __link_nodes(base::__end_.__next_, __hold.get(), __hold.get());
+    __link_nodes_at_front(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1544,8 +1567,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x));
-    __link_nodes(static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::
-                         pointer_to(base::__end_)), __hold.get(), __hold.get());
+    __link_nodes_at_back(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1561,7 +1583,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...);
-    __link_nodes(base::__end_.__next_, __hold.get(), __hold.get());
+    __link_nodes_at_front(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1575,8 +1597,7 @@
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __hold(__node_alloc_traits::allocate(__na, 1), _Dp(__na, 1));
     __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...);
-    __link_nodes(static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::
-                         pointer_to(base::__end_)), __hold.get(), __hold.get());
+    __link_nodes_at_back(__hold.get(), __hold.get());
     ++base::__sz();
     __hold.release();
 }
@@ -1826,8 +1847,7 @@
             throw;
         }
 #endif  // _LIBCPP_NO_EXCEPTIONS
-        __link_nodes(static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::
-                         pointer_to(base::__end_)), __r.__ptr_, __e.__ptr_);
+        __link_nodes_at_back(__r.__ptr_, __e.__ptr_);
         base::__sz() += __ds;
     }
 }
@@ -2038,14 +2058,18 @@
 void
 list<_Tp, _Alloc>::remove(const value_type& __x)
 {
-    for (iterator __i = begin(), __e = end(); __i != __e;)
+    list<_Tp, _Alloc> __deleted_nodes; // collect the nodes we're removing
+    for (const_iterator __i = begin(), __e = end(); __i != __e;)
     {
         if (*__i == __x)
         {
-            iterator __j = _VSTD::next(__i);
+            const_iterator __j = _VSTD::next(__i);
             for (; __j != __e && *__j == __x; ++__j)
                 ;
-            __i = erase(__i, __j);
+            __deleted_nodes.splice(__deleted_nodes.end(), *this, __i, __j);
+            __i = __j;
+            if (__i != __e)
+                ++__i;
         }
         else
             ++__i;
@@ -2065,6 +2089,8 @@
             for (; __j != __e && __pred(*__j); ++__j)
                 ;
             __i = erase(__i, __j);
+            if (__i != __e)
+                ++__i;
         }
         else
             ++__i;
diff --git a/include/locale b/include/locale
index 3e87e9f..fcff402 100644
--- a/include/locale
+++ b/include/locale
@@ -417,7 +417,7 @@
 //  and failbit is set in __err.
 //  Else an iterator pointing to the matching keyword is found.  If more than
 //  one keyword matches, an iterator to the first matching keyword is returned.
-//  If on exit __b == __e, eofbit is set in __err.  If __case_senstive is false,
+//  If on exit __b == __e, eofbit is set in __err.  If __case_sensitive is false,
 //  __ct is used to force to lower case before comparing characters.
 //  Examples:
 //  Keywords:  "a", "abb"
@@ -1871,7 +1871,7 @@
 };
 
 template <class _CharT>
-class _LIBCPP_TYPE_VIS __time_get_c_storage
+class _LIBCPP_TYPE_VIS_ONLY __time_get_c_storage
 {
 protected:
     typedef basic_string<_CharT> string_type;
@@ -2038,7 +2038,7 @@
 locale::id
 time_get<_CharT, _InputIterator>::id;
 
-// time_get primatives
+// time_get primitives
 
 template <class _CharT, class _InputIterator>
 void
@@ -2259,7 +2259,7 @@
         __err |= ios_base::eofbit;
 }
 
-// time_get end primatives
+// time_get end primitives
 
 template <class _CharT, class _InputIterator>
 _InputIterator
@@ -2509,7 +2509,7 @@
 };
 
 template <class _CharT>
-class _LIBCPP_TYPE_VIS __time_get_storage
+class _LIBCPP_TYPE_VIS_ONLY __time_get_storage
     : public __time_get
 {
 protected:
diff --git a/include/map b/include/map
index f533d8f..5c3969a 100644
--- a/include/map
+++ b/include/map
@@ -159,7 +159,7 @@
     template<typename K>
         const_iterator find(const K& x) const;  // C++14
     template<typename K>
-      size_type count(const K& x) const;
+      size_type count(const K& x) const;        // C++14
 
     size_type      count(const key_type& k) const;
           iterator lower_bound(const key_type& k);
@@ -353,7 +353,7 @@
     template<typename K>
         const_iterator find(const K& x) const;  // C++14
     template<typename K>
-      size_type count(const K& x) const;
+      size_type count(const K& x) const;        // C++14
 
     size_type      count(const key_type& k) const;
           iterator lower_bound(const key_type& k);
@@ -846,7 +846,6 @@
     explicit map(const key_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
-            is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
@@ -1105,6 +1104,12 @@
     _LIBCPP_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_unique(__k);}
+#if _LIBCPP_STD_VER > 11
+    template <typename _K2>
+    _LIBCPP_INLINE_VISIBILITY
+    typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
+    count(const _K2& __k)                  {return __tree_.__count_unique(__k);}
+#endif
     _LIBCPP_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
@@ -1587,7 +1592,6 @@
     explicit multimap(const key_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
-            is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
@@ -1836,6 +1840,12 @@
     _LIBCPP_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_multi(__k);}
+#if _LIBCPP_STD_VER > 11
+    template <typename _K2>
+    _LIBCPP_INLINE_VISIBILITY
+    typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
+    count(const _K2& __k)                   {return __tree_.__count_multi(__k);}
+#endif
     _LIBCPP_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
diff --git a/include/memory b/include/memory
index da8786a..dc9aeba 100644
--- a/include/memory
+++ b/include/memory
@@ -1631,9 +1631,9 @@
     _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT
         {return _VSTD::addressof(__x);}
     _LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, allocator<void>::const_pointer = 0)
-        {return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));}
+        {return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));}
     _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) _NOEXCEPT
-        {::operator delete((void*)__p);}
+        {_VSTD::__deallocate((void*)__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)
@@ -1721,9 +1721,9 @@
     _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT
         {return _VSTD::addressof(__x);}
     _LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, allocator<void>::const_pointer = 0)
-        {return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));}
+        {return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));}
     _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) _NOEXCEPT
-        {::operator delete((void*)__p);}
+        {_VSTD::__deallocate((void*)__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)
@@ -2005,8 +2005,8 @@
                                      tuple<_Args2...> __second_args,
                                      __tuple_indices<_I1...>,
                                      __tuple_indices<_I2...>)
-            : __first_(_VSTD::forward<_Args1>(get<_I1>(__first_args))...),
-              __second_(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
+            : __first_(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
+              __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
             {}
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
@@ -2019,7 +2019,7 @@
 
     _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
     {
         using _VSTD::swap;
         swap(__first_, __x.__first_);
@@ -2096,8 +2096,8 @@
                                      tuple<_Args2...> __second_args,
                                      __tuple_indices<_I1...>,
                                      __tuple_indices<_I2...>)
-            : _T1(_VSTD::forward<_Args1>(get<_I1>(__first_args))...),
-              __second_(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
+            : _T1(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
+              __second_(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
             {}
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
@@ -2110,7 +2110,7 @@
 
     _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
     {
         using _VSTD::swap;
         swap(__second_, __x.__second_);
@@ -2188,8 +2188,8 @@
                                      tuple<_Args2...> __second_args,
                                      __tuple_indices<_I1...>,
                                      __tuple_indices<_I2...>)
-            : _T2(_VSTD::forward<_Args2>(get<_I2>(__second_args))...),
-              __first_(_VSTD::forward<_Args1>(get<_I1>(__first_args))...)
+            : _T2(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...),
+              __first_(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...)
               
             {}
 
@@ -2203,7 +2203,7 @@
 
     _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp& __x)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
     {
         using _VSTD::swap;
         swap(__first_, __x.__first_);
@@ -2278,8 +2278,8 @@
                                      tuple<_Args2...> __second_args,
                                      __tuple_indices<_I1...>,
                                      __tuple_indices<_I2...>)
-            : _T1(_VSTD::forward<_Args1>(get<_I1>(__first_args))...),
-              _T2(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
+            : _T1(_VSTD::forward<_Args1>(_VSTD::get<_I1>(__first_args))...),
+              _T2(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
             {}
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
@@ -2292,7 +2292,7 @@
 
     _LIBCPP_INLINE_VISIBILITY void swap(__libcpp_compressed_pair_imp&)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
     {
     }
 };
@@ -2375,7 +2375,7 @@
 
     _LIBCPP_INLINE_VISIBILITY void swap(__compressed_pair& __x)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
         {base::swap(__x);}
 };
 
@@ -2384,7 +2384,7 @@
 void
 swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
-                   __is_nothrow_swappable<_T1>::value)
+                   __is_nothrow_swappable<_T2>::value)
     {__x.swap(__y);}
 
 // __same_or_less_cv_qualified
@@ -2401,13 +2401,14 @@
 struct __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false>
     : false_type {};
 
-template <class _Ptr1, class _Ptr2, bool = is_scalar<_Ptr1>::value &&
-                                         !is_pointer<_Ptr1>::value>
+template <class _Ptr1, class _Ptr2, bool = is_pointer<_Ptr1>::value ||
+                                           is_same<_Ptr1, _Ptr2>::value ||
+                                           __has_element_type<_Ptr1>::value>
 struct __same_or_less_cv_qualified
     : __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
 
 template <class _Ptr1, class _Ptr2>
-struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, true>
+struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, false>
     : false_type {};
 
 // default_delete
diff --git a/include/module.modulemap b/include/module.modulemap
new file mode 100644
index 0000000..a0f4254
--- /dev/null
+++ b/include/module.modulemap
@@ -0,0 +1,471 @@
+module std [system] {
+  // FIXME: The standard does not require that each of these submodules
+  // re-exports its imported modules. We should provide an alternative form of
+  // export that issues a warning if a name from the submodule is used, and
+  // use that to provide a 'strict mode' for libc++.
+  module algorithm {
+    header "algorithm"
+    export initializer_list
+    export *
+  }
+  module array {
+    header "array"
+    export initializer_list
+    export *
+  }
+  module atomic {
+    header "atomic"
+    export *
+  }
+  module bitset {
+    header "bitset"
+    export string
+    export iosfwd
+    export *
+  }
+  // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
+  module ccomplex {
+    header "ccomplex"
+    export complex
+    export *
+  }
+  module cctype {
+    header "cctype"
+    export *
+  }
+  module cerrno {
+    header "cerrno"
+/*
+    export_macros    ECONNREFUSED, EIO,          ENODEV,      ENOTEMPTY,       ERANGE,
+      E2BIG,         ECONNRESET,   EISCONN,      ENOENT,      ENOTRECOVERABLE, EROFS,
+      EACCES,        EDEADLK,      EISDIR,       ENOEXEC,     ENOTSOCK,        ESPIPE,
+      EADDRINUSE,    EDESTADDRREQ, ELOOP,        ENOLCK,      ENOTSUP,         ESRCH,
+      EADDRNOTAVAIL, EDOM,         EMFILE,       ENOLINK,     ENOTTY,          ETIME,
+      EAFNOSUPPORT,  EEXIST,       EMLINK,       ENOMEM,      ENXIO,           ETIMEDOUT,
+      EAGAIN,        EFAULT,       EMSGSIZE,     ENOMSG,      EOPNOTSUPP,      ETXTBSY,
+      EALREADY,      EFBIG,        ENAMETOOLONG, ENOPROTOOPT, EOVERFLOW,       EWOULDBLOCK,
+      EBADF,         EHOSTUNREACH, ENETDOWN,     ENOSPC,      EOWNERDEAD,      EXDEV,
+      EBADMSG,       EIDRM,        ENETRESET,    ENOSR,       EPERM,           errno,
+      EBUSY,         EILSEQ,       ENETUNREACH,  ENOSTR,      EPIPE,
+      ECANCELED,     EINPROGRESS,  ENFILE,       ENOSYS,      EPROTO,
+      ECHILD,        EINTR,        ENOBUFS,      ENOTCONN,    EPROTONOSUPPORT,
+      ECONNABORTED,  EINVAL,       ENODATA,      ENOTDIR,     EPROTOTYPE
+*/
+    export *
+  }
+  module cfenv {
+    header "cfenv"
+/*
+    export_macros FE_ALL_EXCEPT, FE_DIVBYZERO, FE_INEXACT, FE_INVALID, FE_OVERFLOW,
+                  FE_UNDERFLOW, FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD,
+                  FE_DFL_ENV
+*/
+    export *
+  }
+  module cfloat {
+    header "cfloat"
+/*
+    export_macros FLT_EVAL_METHOD, FLT_RADIX, FLT_ROUNDS,
+                  FLT_DIG, FLT_EPSILON, FLT_MANT_DIG,
+                  FLT_MAX, FLT_MAX_10_EXP, FLT_MAX_EXP,
+                  FLT_MIN, FLT_MIN_10_EXP, FLT_MIN_EXP,
+                  DBL_DIG, DBL_EPSILON, DBL_MANT_DIG,
+                  DBL_MAX, DBL_MAX_10_EXP, DBL_MAX_EXP,
+                  DBL_MIN, DBL_MIN_10_EXP, DBL_MIN_EXP,
+                  LDBL_DIG, LDBL_EPSILON, LDBL_MANT_DIG,
+                  LDBL_MAX, LDBL_MAX_10_EXP, LDBL_MAX_EXP,
+                  LDBL_MIN, LDBL_MIN_10_EXP, LDBL_MIN_EXP
+*/
+    export *
+  }
+  module chrono {
+    header "chrono"
+    export *
+  }
+  module cinttypes {
+    header "cinttypes"
+    export cstdint
+/*
+    export_macros
+      PRId8, PRId16, PRId32, PRId64, PRIdFAST8, PRIdFAST16, PRIdFAST32, PRIdFAST64, PRIdLEAST8, PRIdLEAST16, PRIdLEAST32, PRIdLEAST64, PRIdMAX, PRIdPTR,
+      PRIi8, PRIi16, PRIi32, PRIi64, PRIiFAST8, PRIiFAST16, PRIiFAST32, PRIiFAST64, PRIiLEAST8, PRIiLEAST16, PRIiLEAST32, PRIiLEAST64, PRIiMAX, PRIiPTR,
+      PRIo8, PRIo16, PRIo32, PRIo64, PRIoFAST8, PRIoFAST16, PRIoFAST32, PRIoFAST64, PRIoLEAST8, PRIoLEAST16, PRIoLEAST32, PRIoLEAST64, PRIoMAX, PRIoPTR,
+      PRIu8, PRIu16, PRIu32, PRIu64, PRIuFAST8, PRIuFAST16, PRIuFAST32, PRIuFAST64, PRIuLEAST8, PRIuLEAST16, PRIuLEAST32, PRIuLEAST64, PRIuMAX, PRIuPTR,
+      PRIx8, PRIx16, PRIx32, PRIx64, PRIxFAST8, PRIxFAST16, PRIxFAST32, PRIxFAST64, PRIxLEAST8, PRIxLEAST16, PRIxLEAST32, PRIxLEAST64, PRIxMAX, PRIxPTR,
+      PRIX8, PRIX16, PRIX32, PRIX64, PRIXFAST8, PRIXFAST16, PRIXFAST32, PRIXFAST64, PRIXLEAST8, PRIXLEAST16, PRIXLEAST32, PRIXLEAST64, PRIXMAX, PRIXPTR,
+      SCNd8, SCNd16, SCNd32, SCNd64, SCNdFAST8, SCNdFAST16, SCNdFAST32, SCNdFAST64, SCNdLEAST8, SCNdLEAST16, SCNdLEAST32, SCNdLEAST64, SCNdMAX, SCNdPTR,
+      SCNi8, SCNi16, SCNi32, SCNi64, SCNiFAST8, SCNiFAST16, SCNiFAST32, SCNiFAST64, SCNiLEAST8, SCNiLEAST16, SCNiLEAST32, SCNiLEAST64, SCNiMAX, SCNiPTR,
+      SCNo8, SCNo16, SCNo32, SCNo64, SCNoFAST8, SCNoFAST16, SCNoFAST32, SCNoFAST64, SCNoLEAST8, SCNoLEAST16, SCNoLEAST32, SCNoLEAST64, SCNoMAX, SCNoPTR,
+      SCNu8, SCNu16, SCNu32, SCNu64, SCNuFAST8, SCNuFAST16, SCNuFAST32, SCNuFAST64, SCNuLEAST8, SCNuLEAST16, SCNuLEAST32, SCNuLEAST64, SCNuMAX, SCNuPTR,
+      SCNx8, SCNx16, SCNx32, SCNx64, SCNxFAST8, SCNxFAST16, SCNxFAST32, SCNxFAST64, SCNxLEAST8, SCNxLEAST16, SCNxLEAST32, SCNxLEAST64, SCNxMAX, SCNxPTR,
+      SCNX8, SCNX16, SCNX32, SCNX64, SCNXFAST8, SCNXFAST16, SCNXFAST32, SCNXFAST64, SCNXLEAST8, SCNXLEAST16, SCNXLEAST32, SCNXLEAST64, SCNXMAX, SCNXPTR
+*/
+    export *
+  }
+  module ciso646 {
+    header "ciso646"
+    export *
+  }
+  module climits {
+    header "climits"
+/*
+    export_macros CHAR_BIT,  CHAR_MIN,  CHAR_MAX,
+                  SCHAR_MIN, SCHAR_MAX, UCHAR_MAX,
+                  SHRT_MIN,  SHRT_MAX,  USHRT_MAX,
+                  INT_MIN,   INT_MAX,   UINT_MAX,
+                  LONG_MIN,  LONG_MAX,  ULONG_MAX,
+                  LLONG_MIN, LLONG_MAX, ULLONG_MAX,
+                  MB_LEN_MAX
+*/
+    export *
+  }
+  module clocale {
+    header "clocale"
+/*
+    export_macros LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, NULL
+*/
+    export *
+  }
+  module cmath {
+    header "cmath"
+/*
+    export_macros FP_FAST_FMA, FP_FAST_FMAF, FP_FAST_FMAL, FP_ILOGBO, FP_ILOGBNAN,
+                  FP_INFINITE, FP_NAN, FP_NORMAL, FP_SUBNORMAL, FP_ZERO,
+                  HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY, NAN,
+                  MATH_ERRNO, MATH_ERREXCEPT, math_errhandling
+*/
+    export *
+  }
+  module codecvt {
+    header "codecvt"
+    export *
+  }
+  module complex {
+    header "complex"
+    export *
+  }
+  module condition_variable {
+    header "condition_variable"
+    export *
+  }
+  module csetjmp {
+    header "csetjmp"
+/*
+    export_macros setjmp
+*/
+    export *
+  }
+  module csignal {
+    header "csignal"
+/*
+    export_macros SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM,
+                  SIG_DFL, SIG_IGN, SIG_ERR
+*/
+    export *
+  }
+  module cstdarg {
+    header "cstdarg"
+/*
+    export_macros va_arg, va_start, va_end, va_copy
+*/
+    export *
+  }
+  module cstdbool {
+    header "cstdbool"
+/*
+    export_macros __bool_true_false_are_defined
+*/
+    export *
+  }
+  module cstddef {
+    header "cstddef"
+/*
+    export_macros NULL, offsetof
+*/
+    export *
+  }
+  module cstdint {
+    header "cstdint"
+/*
+    export_macros
+      INT_8_MIN, INT_8_MAX, UINT_8_MAX, INT_16_MIN, INT_16_MAX, UINT_16_MAX,
+      INT_32_MIN, INT_32_MAX, UINT_32_MAX, INT_64_MIN, INT_64_MAX, UINT_64_MAX,
+      INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX,
+      INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX,
+      INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX,
+      INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
+      INT_MAX_MIN, INT_MAX_MAX, UINT_MAX_MAX, INT_PTR_MIN, INT_PTR_MAX, UINT_PTR_MAX,
+      PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX,
+      SIZE_MAX
+*/
+    export *
+  }
+  module cstdio {
+    header "cstdio"
+/*
+    export_macros BUFSIZ, EOF, FILENAME_MAX, FOPEN_MAX, L_tmpnam, NULL,
+                  SEEK_CUR, SEEK_END, SEEK_SET, TMP_MAX, _IOFBF, _IOLBF,
+                  stdin, stdout, stderr
+*/
+    export *
+  }
+  module cstdlib {
+    header "cstdlib"
+/*
+    export_macros RAND_MAX
+*/
+    export *
+  }
+  module cstring {
+    header "cstring"
+/*
+    export_macros NULL
+*/
+    export *
+  }
+  module ctgmath {
+    header "ctgmath"
+    export ccomplex
+    export cmath
+    export *
+  }
+  module ctime {
+    header "ctime"
+/*
+    export_macros NULL, CLOCKS_PER_SEC
+*/
+    export *
+  }
+  module cwchar {
+    header "cwchar"
+/*
+    export_macros NULL, WCHAR_MAX, WCHAR_MIN, WEOF
+*/
+    export *
+  }
+  module cwctype {
+    header "cwctype"
+/*
+    export_macros WEOF
+*/
+    export *
+  }
+  module deque {
+    header "deque"
+    export initializer_list
+    export *
+  }
+  module exception {
+    header "exception"
+    export *
+  }
+  module forward_list {
+    header "forward_list"
+    export initializer_list
+    export *
+  }
+  module fstream {
+    header "fstream"
+    export *
+  }
+  module functional {
+    header "functional"
+    export *
+  }
+  module future {
+    header "future"
+    export *
+  }
+  module initializer_list {
+    header "initializer_list"
+    export *
+  }
+  module iomanip {
+    header "iomanip"
+    export *
+  }
+  module ios {
+    header "ios"
+    export iosfwd
+    export *
+  }
+  module iosfwd {
+    header "iosfwd"
+    export *
+  }
+  module iostream {
+    header "iostream"
+    export ios
+    export streambuf
+    export istream
+    export ostream
+    export *
+  }
+  module istream {
+    header "istream"
+    // FIXME: should re-export ios, streambuf?
+    export *
+  }
+  module iterator {
+    header "iterator"
+    export *
+  }
+  module limits {
+    header "limits"
+    export *
+  }
+  module list {
+    header "list"
+    export initializer_list
+    export *
+  }
+  module locale {
+    header "locale"
+    export *
+  }
+  module map {
+    header "map"
+    export initializer_list
+    export *
+  }
+  module memory {
+    header "memory"
+    export *
+  }
+  module mutex {
+    header "mutex"
+    export *
+  }
+  module new {
+    header "new"
+    export *
+  }
+  module numeric {
+    header "numeric"
+    export *
+  }
+  module ostream {
+    header "ostream"
+    // FIXME: should re-export ios, streambuf?
+    export *
+  }
+  module queue {
+    header "queue"
+    export initializer_list
+    export *
+  }
+  module random {
+    header "random"
+    export initializer_list
+    export *
+  }
+  module ratio {
+    header "ratio"
+    export *
+  }
+  module regex {
+    header "regex"
+    export initializer_list
+    export *
+  }
+  module scoped_allocator {
+    header "scoped_allocator"
+    export *
+  }
+  module set {
+    header "set"
+    export initializer_list
+    export *
+  }
+  module sstream {
+    header "sstream"
+    // FIXME: should re-export istream, ostream, ios, streambuf, string?
+    export *
+  }
+  module stack {
+    header "stack"
+    export initializer_list
+    export *
+  }
+  module stdexcept {
+    header "stdexcept"
+    export *
+  }
+  module streambuf {
+    header "streambuf"
+    export *
+  }
+  module string {
+    header "string"
+    export initializer_list
+    export *
+  }
+  module strstream {
+    header "strstream"
+    requires !cplusplus11
+  }
+  module system_error {
+    header "system_error"
+    export *
+  }
+  module thread {
+    header "thread"
+    export *
+  }
+  module tuple {
+    header "tuple"
+    export *
+  }
+  module type_traits {
+    header "type_traits"
+    export *
+  }
+  module typeindex {
+    header "typeindex"
+    export *
+  }
+  module typeinfo {
+    header "typeinfo"
+    export *
+  }
+  module unordered_map {
+    header "unordered_map"
+    export initializer_list
+    export *
+  }
+  module unordered_set {
+    header "unordered_set"
+    export initializer_list
+    export *
+  }
+  module utility {
+    header "utility"
+    export initializer_list
+    export *
+  }
+  module valarray {
+    header "valarray"
+    export initializer_list
+    export *
+  }
+  module vector {
+    header "vector"
+    export initializer_list
+    export *
+  }
+
+  // FIXME: These should be private.
+  module __bit_reference { header "__bit_reference" export * }
+  module __config { header "__config" export * }
+  module __debug { header "__debug" export * }
+  module __functional_base { header "__functional_base" export * }
+  module __hash_table { header "__hash_table" export * }
+  module __locale { header "__locale" export * }
+  module __mutex_base { header "__mutex_base" export * }
+  module __split_buffer { header "__split_buffer" export * }
+  module __sso_allocator { header "__sso_allocator" export * }
+  module __std_stream { header "__std_stream" export * }
+  module __tree { header "__tree" export * }
+  module __tuple { header "__tuple" export * }
+  module __undef_min_max { header "__undef_min_max" export * }
+}
diff --git a/include/mutex b/include/mutex
index e0c02ad..5dfba63 100644
--- a/include/mutex
+++ b/include/mutex
@@ -425,7 +425,7 @@
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-struct _LIBCPP_TYPE_VIS once_flag;
+struct _LIBCPP_TYPE_VIS_ONLY once_flag;
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
diff --git a/include/new b/include/new
index ea4a4a0..a710ed9 100644
--- a/include/new
+++ b/include/new
@@ -147,4 +147,24 @@
 inline _LIBCPP_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}
 inline _LIBCPP_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}
 
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) {
+#ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
+  return ::operator new(__size);
+#else
+  return __builtin_operator_new(__size);
+#endif
+}
+
+inline _LIBCPP_INLINE_VISIBILITY void __deallocate(void *__ptr) {
+#ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
+  ::operator delete(__ptr);
+#else
+  __builtin_operator_delete(__ptr);
+#endif
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
 #endif  // _LIBCPP_NEW
diff --git a/include/set b/include/set
index 7dbf970..22d794d 100644
--- a/include/set
+++ b/include/set
@@ -436,7 +436,6 @@
     explicit set(const value_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
-            is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__comp) {}
 
@@ -664,6 +663,12 @@
     _LIBCPP_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_unique(__k);}
+#if _LIBCPP_STD_VER > 11
+    template <typename _K2>
+    _LIBCPP_INLINE_VISIBILITY
+    typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
+    count(const _K2& __k)                  {return __tree_.__count_unique(__k);}
+#endif
     _LIBCPP_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
@@ -842,7 +847,6 @@
     explicit multiset(const value_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
-            is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__comp) {}
 
@@ -1068,6 +1072,12 @@
     _LIBCPP_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_multi(__k);}
+#if _LIBCPP_STD_VER > 11
+    template <typename _K2>
+    _LIBCPP_INLINE_VISIBILITY
+    typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
+    count(const _K2& __k)                  {return __tree_.__count_multi(__k);}
+#endif
 
     _LIBCPP_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
diff --git a/include/shared_mutex b/include/shared_mutex
index 7661054..00f816d 100644
--- a/include/shared_mutex
+++ b/include/shared_mutex
@@ -232,7 +232,7 @@
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock() noexcept
+    shared_lock() _NOEXCEPT
         : __m_(nullptr),
           __owns_(false)
         {}
@@ -244,7 +244,7 @@
         {__m_->lock_shared();}
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock(mutex_type& __m, defer_lock_t) noexcept
+    shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
         : __m_(&__m),
           __owns_(false)
         {}
@@ -288,7 +288,7 @@
     shared_lock& operator=(shared_lock const&) = delete;
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock(shared_lock&& __u) noexcept
+    shared_lock(shared_lock&& __u) _NOEXCEPT
         : __m_(__u.__m_),
           __owns_(__u.__owns_)
         {
@@ -297,7 +297,7 @@
         }
 
     _LIBCPP_INLINE_VISIBILITY
-    shared_lock& operator=(shared_lock&& __u) noexcept
+    shared_lock& operator=(shared_lock&& __u) _NOEXCEPT
     {
         if (__owns_)
             __m_->unlock_shared();
@@ -320,14 +320,14 @@
 
     // Setters
     _LIBCPP_INLINE_VISIBILITY
-    void swap(shared_lock& __u) noexcept
+    void swap(shared_lock& __u) _NOEXCEPT
     {
         _VSTD::swap(__m_, __u.__m_);
         _VSTD::swap(__owns_, __u.__owns_);
     }
 
     _LIBCPP_INLINE_VISIBILITY
-    mutex_type* release() noexcept
+    mutex_type* release() _NOEXCEPT
     {
         mutex_type* __m = __m_;
         __m_ = nullptr;
@@ -337,13 +337,13 @@
 
     // Getters
     _LIBCPP_INLINE_VISIBILITY
-    bool owns_lock() const noexcept {return __owns_;}
+    bool owns_lock() const _NOEXCEPT {return __owns_;}
 
     _LIBCPP_INLINE_VISIBILITY
-    explicit operator bool () const noexcept {return __owns_;}
+    explicit operator bool () const _NOEXCEPT {return __owns_;}
 
     _LIBCPP_INLINE_VISIBILITY
-    mutex_type* mutex() const noexcept {return __m_;}
+    mutex_type* mutex() const _NOEXCEPT {return __m_;}
 };
 
 template <class _Mutex>
@@ -409,7 +409,7 @@
 template <class _Mutex>
 inline _LIBCPP_INLINE_VISIBILITY
 void
-swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept
+swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) _NOEXCEPT
     {__x.swap(__y);}
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/include/string b/include/string
index 7e61909..cb30d04 100644
--- a/include/string
+++ b/include/string
@@ -990,9 +990,81 @@
 
 // helper fns for basic_string
 
+// __find
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find(const _CharT *__p, _SizeT __sz, 
+             _CharT __c, _SizeT __pos) _NOEXCEPT
+{
+    if (__pos >= __sz)
+        return __npos;
+    const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c);
+    if (__r == 0)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find(const _CharT *__p, _SizeT __sz, 
+       const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+{
+    if (__pos > __sz || __sz - __pos < __n)
+        return __npos;
+    if (__n == 0)
+        return __pos;
+//     if (__n == 1)
+//     	return _VSTD::__find<_CharT, _SizeT, _Traits, __npos>(__p, __sz, *__s, __pos);
+    const _CharT* __r = 
+            _VSTD::search(__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq);
+    if (__r == __p + __sz)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+
+// __rfind
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__rfind(const _CharT *__p, _SizeT __sz, 
+              _CharT __c, _SizeT __pos) _NOEXCEPT
+{
+    if (__sz < 1)
+        return __npos;
+    if (__pos < __sz)
+        ++__pos;
+    else
+        __pos = __sz;
+    for (const _CharT* __ps = __p + __pos; __ps != __p;)
+    {
+        if (_Traits::eq(*--__ps, __c))
+            return static_cast<_SizeT>(__ps - __p);
+    }
+    return __npos;
+}
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__rfind(const _CharT *__p, _SizeT __sz, 
+        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+{
+    __pos = _VSTD::min(__pos, __sz);
+    if (__n < __sz - __pos)
+        __pos += __n;
+    else
+        __pos = __sz;
+    const _CharT* __r = _VSTD::find_end(__p, __p + __pos, __s, __s + __n, _Traits::eq);
+    if (__n > 0 && __r == __p + __pos)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+// __find_first_of
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_of(const _CharT *__p, _SizeT __sz,
+                const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos >= __sz || __n == 0)
         return __npos;
@@ -1003,9 +1075,12 @@
     return static_cast<_SizeT>(__r - __p);
 }
 
+
+// __find_last_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY 
+__find_last_of(const _CharT *__p, _SizeT __sz,
+               const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
     {
     if (__n != 0)
     {
@@ -1024,9 +1099,11 @@
 }
 
 
+// __find_first_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_not_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_not_of(const _CharT *__p, _SizeT __sz,
+                    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos < __sz)
     {
@@ -1040,8 +1117,9 @@
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_not_of(const _CharT *__p, _SizeT __sz,
-    _CharT __c, _SizeT __pos) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_not_of(const _CharT *__p, _SizeT __sz,
+                          _CharT __c, _SizeT __pos) _NOEXCEPT
 {
     if (__pos < __sz)
     {
@@ -1054,9 +1132,11 @@
 }
 
 
+// __find_last_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_not_of(const _CharT *__p, _SizeT __sz,
-        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_last_not_of(const _CharT *__p, _SizeT __sz,
+                   const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos < __sz)
         ++__pos;
@@ -1070,8 +1150,9 @@
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_not_of(const _CharT *__p, _SizeT __sz,
-        _CharT __c, _SizeT __pos) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_last_not_of(const _CharT *__p, _SizeT __sz,
+                         _CharT __c, _SizeT __pos) _NOEXCEPT
 {
     if (__pos < __sz)
         ++__pos;
@@ -2053,11 +2134,13 @@
 basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, const allocator_type& __a)
     : __r_(__a)
 {
-    if (__a == __str.__alloc() || !__str.__is_long())
-        __r_.first().__r = __str.__r_.first().__r;
-    else
+    if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
         __init(_VSTD::__to_raw_pointer(__str.__get_long_pointer()), __str.__get_long_size());
-    __str.__zero();
+    else
+    {
+        __r_.first().__r = __str.__r_.first().__r;
+        __str.__zero();
+    }
 #if _LIBCPP_DEBUG_LEVEL >= 2
     __get_db()->__insert_c(this);
     if (__is_long())
@@ -2311,7 +2394,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
     size_type __cap = capacity();
     if (__cap >= __n)
     {
@@ -2485,7 +2568,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::assign recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::assign received nullptr");
     return assign(__s, traits_type::length(__s));
 }
 
@@ -2495,7 +2578,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
     size_type __cap = capacity();
     size_type __sz = size();
     if (__cap - __sz >= __n)
@@ -2632,7 +2715,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::append recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::append received nullptr");
     return append(__s, traits_type::length(__s));
 }
 
@@ -2642,7 +2725,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         this->__throw_out_of_range();
@@ -2794,7 +2877,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::insert recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::insert received nullptr");
     return insert(__pos, __s, traits_type::length(__s));
 }
 
@@ -2845,7 +2928,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace recieved nullptr");
+    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         this->__throw_out_of_range();
@@ -2977,7 +3060,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::replace recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::replace received nullptr");
     return replace(__pos, __n1, __s, traits_type::length(__s));
 }
 
@@ -3345,18 +3428,9 @@
                                                 size_type __pos,
                                                 size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): recieved nullptr");
-    size_type __sz = size();
-    if (__pos > __sz || __sz - __pos < __n)
-        return npos;
-    if (__n == 0)
-        return __pos;
-    const value_type* __p = data();
-    const value_type* __r = _VSTD::search(__p + __pos, __p + __sz, __s, __s + __n,
-                                     __traits_eq<traits_type>());
-    if (__r == __p + __sz)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3365,7 +3439,8 @@
 basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
                                                 size_type __pos) const _NOEXCEPT
 {
-    return find(__str.data(), __pos, __str.size());
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3374,8 +3449,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                 size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find(): recieved nullptr");
-    return find(__s, __pos, traits_type::length(__s));
+    _LIBCPP_ASSERT(__s != nullptr, "string::find(): received nullptr");
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3383,14 +3459,8 @@
 basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
                                                 size_type __pos) const _NOEXCEPT
 {
-    size_type __sz = size();
-    if (__pos >= __sz)
-        return npos;
-    const value_type* __p = data();
-    const value_type* __r = traits_type::find(__p + __pos, __sz - __pos, __c);
-    if (__r == 0)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __c, __pos);
 }
 
 // rfind
@@ -3401,19 +3471,9 @@
                                                  size_type __pos,
                                                  size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): recieved nullptr");
-    size_type __sz = size();
-    __pos = _VSTD::min(__pos, __sz);
-    if (__n < __sz - __pos)
-        __pos += __n;
-    else
-        __pos = __sz;
-    const value_type* __p = data();
-    const value_type* __r = _VSTD::find_end(__p, __p + __pos, __s, __s + __n,
-                                       __traits_eq<traits_type>());
-    if (__n > 0 && __r == __p + __pos)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3422,7 +3482,8 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
                                                  size_type __pos) const _NOEXCEPT
 {
-    return rfind(__str.data(), __pos, __str.size());
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3431,8 +3492,9 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                  size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::rfind(): recieved nullptr");
-    return rfind(__s, __pos, traits_type::length(__s));
+    _LIBCPP_ASSERT(__s != nullptr, "string::rfind(): received nullptr");
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3440,21 +3502,8 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
                                                  size_type __pos) const _NOEXCEPT
 {
-    size_type __sz = size();
-    if (__sz)
-    {
-        if (__pos < __sz)
-            ++__pos;
-        else
-            __pos = __sz;
-        const value_type* __p = data();
-        for (const value_type* __ps = __p + __pos; __ps != __p;)
-        {
-            if (traits_type::eq(*--__ps, __c))
-                return static_cast<size_type>(__ps - __p);
-        }
-    }
-    return npos;
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __c, __pos);
 }
 
 // find_first_of
@@ -3465,7 +3514,7 @@
                                                          size_type __pos,
                                                          size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
     return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
@@ -3486,7 +3535,7 @@
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                          size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): received nullptr");
     return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
@@ -3508,7 +3557,7 @@
                                                         size_type __pos,
                                                         size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
     return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
@@ -3529,7 +3578,7 @@
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                         size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): received nullptr");
     return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
@@ -3551,7 +3600,7 @@
                                                              size_type __pos,
                                                              size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
@@ -3572,7 +3621,7 @@
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                              size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): received nullptr");
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
@@ -3595,7 +3644,7 @@
                                                             size_type __pos,
                                                             size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
@@ -3616,7 +3665,7 @@
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                             size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): received nullptr");
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
@@ -3680,7 +3729,7 @@
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(0, npos, __s, traits_type::length(__s));
 }
 
@@ -3690,7 +3739,7 @@
                                                    size_type __n1,
                                                    const value_type* __s) const
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(__pos1, __n1, __s, traits_type::length(__s));
 }
 
@@ -3701,7 +3750,7 @@
                                                    const value_type* __s,
                                                    size_type __n2) const
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
     size_type __sz = size();
     if (__pos1 > __sz || __n2 == npos)
         this->__throw_out_of_range();
diff --git a/include/tuple b/include/tuple
index 3a1752e..c3fdd40 100644
--- a/include/tuple
+++ b/include/tuple
@@ -210,7 +210,13 @@
               "Attempted to default construct a reference element in a tuple");}
 
     template <class _Tp,
-              class = typename enable_if<is_constructible<_Hp, _Tp>::value>::type>
+              class = typename enable_if<
+                  __lazy_and<
+                      __lazy_not<is_same<typename decay<_Tp>::type, __tuple_leaf>>
+                    , is_constructible<_Hp, _Tp>
+                    >::value
+                >::type
+            >
         _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
             : value(_VSTD::forward<_Tp>(__t))
@@ -268,17 +274,8 @@
                                 >::value)),
        "Attempted to construct a reference element in a tuple with an rvalue");}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    __tuple_leaf(const __tuple_leaf& __t) _NOEXCEPT_(is_nothrow_copy_constructible<_Hp>::value)
-        : value(__t.get())
-        {static_assert(!is_rvalue_reference<_Hp>::value, "Can not copy a tuple with rvalue reference member");}
-
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    __tuple_leaf(__tuple_leaf&& __t) _NOEXCEPT_(is_nothrow_move_constructible<_Hp>::value)
-        : value(_VSTD::forward<_Hp>(__t.get()))
-        {}
+    __tuple_leaf(const __tuple_leaf& __t) = default;
+    __tuple_leaf(__tuple_leaf&& __t) = default;
 
     template <class _Tp>
         _LIBCPP_INLINE_VISIBILITY
@@ -325,7 +322,13 @@
             : _Hp(__a) {}
 
     template <class _Tp,
-              class = typename enable_if<is_constructible<_Hp, _Tp>::value>::type>
+              class = typename enable_if<
+                  __lazy_and<
+                        __lazy_not<is_same<typename decay<_Tp>::type, __tuple_leaf>>
+                      , is_constructible<_Hp, _Tp>
+                    >::value
+                >::type
+            >
         _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
             : _Hp(_VSTD::forward<_Tp>(__t)) {}
@@ -345,6 +348,9 @@
         explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
             : _Hp(_VSTD::forward<_Tp>(__t), __a) {}
 
+    __tuple_leaf(__tuple_leaf const &) = default;
+    __tuple_leaf(__tuple_leaf &&) = default;
+
     template <class _Tp>
         _LIBCPP_INLINE_VISIBILITY
         __tuple_leaf&
@@ -863,7 +869,7 @@
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp& __x, const _Up& __y)
     {
-        return __tuple_equal<_Ip - 1>()(__x, __y) && get<_Ip-1>(__x) == get<_Ip-1>(__y);
+        return __tuple_equal<_Ip - 1>()(__x, __y) && _VSTD::get<_Ip-1>(__x) == _VSTD::get<_Ip-1>(__y);
     }
 };
 
@@ -902,7 +908,7 @@
     bool operator()(const _Tp& __x, const _Up& __y)
     {
         return __tuple_less<_Ip-1>()(__x, __y) ||
-             (!__tuple_less<_Ip-1>()(__y, __x) && get<_Ip-1>(__x) < get<_Ip-1>(__y));
+             (!__tuple_less<_Ip-1>()(__y, __x) && _VSTD::get<_Ip-1>(__x) < _VSTD::get<_Ip-1>(__y));
     }
 };
 
@@ -1051,8 +1057,8 @@
     typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
     operator()(tuple<_Types...> __t, _Tuple0&& __t0)
     {
-        return forward_as_tuple(_VSTD::forward<_Types>(get<_I0>(__t))...,
-                                      get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
+        return forward_as_tuple(_VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
+                                      _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
     }
 
     template <class _Tuple0, class _Tuple1, class ..._Tuples>
@@ -1067,8 +1073,8 @@
            typename __make_tuple_indices<sizeof ...(_Types) + tuple_size<_T0>::value>::type,
            typename __make_tuple_indices<tuple_size<_T1>::value>::type>()
                            (forward_as_tuple(
-                              _VSTD::forward<_Types>(get<_I0>(__t))...,
-                              get<_J0>(_VSTD::forward<_Tuple0>(__t0))...
+                              _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
+                              _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...
                             ),
                             _VSTD::forward<_Tuple1>(__t1),
                             _VSTD::forward<_Tuples>(__tpls)...);
@@ -1097,8 +1103,8 @@
 pair<_T1, _T2>::pair(piecewise_construct_t,
                      tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
                      __tuple_indices<_I1...>, __tuple_indices<_I2...>)
-    :  first(_VSTD::forward<_Args1>(get<_I1>( __first_args))...),
-      second(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
+    :  first(_VSTD::forward<_Args1>(_VSTD::get<_I1>( __first_args))...),
+      second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
 {
 }
 
diff --git a/include/type_traits b/include/type_traits
index 26c2e0d..c0e1a6d 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -376,13 +376,9 @@
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&&> : public true_type {};
 #endif
 
-#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#define _LIBCPP_HAS_TYPE_TRAITS
-#endif
-
 // is_union
 
-#if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_union) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
     : public integral_constant<bool, __is_union(_Tp)> {};
@@ -397,7 +393,7 @@
 
 // is_class
 
-#if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_class) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
     : public integral_constant<bool, __is_class(_Tp)> {};
@@ -455,13 +451,13 @@
 
 
 namespace __libcpp_is_member_function_pointer_imp {
-	template <typename _Tp>
-	char __test(typename std::__member_pointer_traits_imp<_Tp, true, false>::_FnType *);
+    template <typename _Tp>
+    char __test(typename std::__member_pointer_traits_imp<_Tp, true, false>::_FnType *);
 
-	template <typename>
-	std::__two __test(...);
+    template <typename>
+    std::__two __test(...);
 };
-	
+    
 template <class _Tp> struct __libcpp_is_member_function_pointer
     : public integral_constant<bool, sizeof(__libcpp_is_member_function_pointer_imp::__test<_Tp>(nullptr)) == 1> {};
 
@@ -484,7 +480,7 @@
 
 // is_enum
 
-#if __has_feature(is_enum) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_enum) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
     : public integral_constant<bool, __is_enum(_Tp)> {};
@@ -797,7 +793,7 @@
 struct _LIBCPP_TYPE_VIS_ONLY is_base_of
     : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
 
-#else  // __has_feature(is_base_of)
+#else  // _LIBCPP_HAS_IS_BASE_OF
 
 namespace __is_base_of_imp
 {
@@ -822,7 +818,7 @@
     : public integral_constant<bool, is_class<_Bp>::value &&
                                      sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
 
-#endif  // __has_feature(is_base_of)
+#endif  // _LIBCPP_HAS_IS_BASE_OF
 
 // is_convertible
 
@@ -945,7 +941,7 @@
 
 // is_empty
 
-#if __has_feature(is_empty)
+#if __has_feature(is_empty) || (_GNUC_VER >= 407)
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_empty
@@ -996,17 +992,17 @@
 
 // has_virtual_destructor
 
-#if __has_feature(has_virtual_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_virtual_destructor) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
     : public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
 
-#else  // _LIBCPP_HAS_TYPE_TRAITS
+#else
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
     : public false_type {};
 
-#endif  // _LIBCPP_HAS_TYPE_TRAITS
+#endif
 
 // alignment_of
 
@@ -1541,42 +1537,61 @@
 
 // is_destructible
 
-template <class _Tp>
-struct __destructible_test
-{
-    _Tp __t;
+//	if it's a reference, return true
+//	if it's a function, return false
+//	if it's   void,     return false
+//	if it's an array of unknown bound, return false
+//	Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed
+//    where _Up is remove_all_extents<_Tp>::type
+
+template <class>
+struct __is_destructible_apply { typedef int type; };
+
+template <typename _Tp>
+struct __is_destructor_wellformed {
+	template <typename _Tp1>
+	static char  __test (
+        typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
+    );
+
+	template <typename _Tp1>
+	static __two __test (...);
+	
+	static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
 };
 
+template <class _Tp, bool>
+struct __destructible_imp;
+
 template <class _Tp>
-decltype((_VSTD::declval<__destructible_test<_Tp> >().~__destructible_test<_Tp>(), true_type()))
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-__is_destructible_test(_Tp&&);
-#else
-__is_destructible_test(_Tp&);
-#endif
-
-false_type
-__is_destructible_test(__any);
-
-template <class _Tp, bool = is_void<_Tp>::value || is_abstract<_Tp>::value
-                                                || is_function<_Tp>::value>
-struct __destructible_imp
-    : public common_type
-        <
-            decltype(__is_destructible_test(declval<_Tp>()))
-        >::type {};
+struct __destructible_imp<_Tp, false> 
+   : public _VSTD::integral_constant<bool, 
+        __is_destructor_wellformed<typename _VSTD::remove_all_extents<_Tp>::type>::value> {};
 
 template <class _Tp>
 struct __destructible_imp<_Tp, true>
-    : public false_type {};
+    : public _VSTD::true_type {};
+
+template <class _Tp, bool>
+struct __destructible_false;
+
+template <class _Tp>
+struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, _VSTD::is_reference<_Tp>::value> {};
+
+template <class _Tp>
+struct __destructible_false<_Tp, true> : public _VSTD::false_type {};
 
 template <class _Tp>
 struct is_destructible
-    : public __destructible_imp<_Tp> {};
+    : public __destructible_false<_Tp, _VSTD::is_function<_Tp>::value> {};
 
 template <class _Tp>
 struct is_destructible<_Tp[]>
-    : public false_type {};
+    : public _VSTD::false_type {};
+
+template <>
+struct is_destructible<void>
+    : public _VSTD::false_type {};
 
 // move
 
@@ -1683,6 +1698,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...), true, false>
+{
+    typedef _Class _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const, true, false>
 {
     typedef _Class const _ClassType;
@@ -1691,6 +1714,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const, true, false>
+{
+    typedef _Class const _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile, true, false>
 {
     typedef _Class volatile _ClassType;
@@ -1699,6 +1730,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile, true, false>
+{
+    typedef _Class volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile, true, false>
 {
     typedef _Class const volatile _ClassType;
@@ -1706,6 +1745,14 @@
     typedef _Rp (_FnType) (_Param...);
 };
 
+template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile, true, false>
+{
+    typedef _Class const volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
 #if __has_feature(cxx_reference_qualified_functions)
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1717,6 +1764,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) &, true, false>
+{
+    typedef _Class& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&, true, false>
 {
     typedef _Class const& _ClassType;
@@ -1725,6 +1780,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&, true, false>
+{
+    typedef _Class const& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&, true, false>
 {
     typedef _Class volatile& _ClassType;
@@ -1733,6 +1796,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&, true, false>
+{
+    typedef _Class volatile& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&, true, false>
 {
     typedef _Class const volatile& _ClassType;
@@ -1741,6 +1812,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&, true, false>
+{
+    typedef _Class const volatile& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) &&, true, false>
 {
     typedef _Class&& _ClassType;
@@ -1749,6 +1828,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) &&, true, false>
+{
+    typedef _Class&& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&&, true, false>
 {
     typedef _Class const&& _ClassType;
@@ -1757,6 +1844,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&&, true, false>
+{
+    typedef _Class const&& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&&, true, false>
 {
     typedef _Class volatile&& _ClassType;
@@ -1765,6 +1860,14 @@
 };
 
 template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&&, true, false>
+{
+    typedef _Class volatile&& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
+template <class _Rp, class _Class, class ..._Param>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&&, true, false>
 {
     typedef _Class const volatile&& _ClassType;
@@ -1772,6 +1875,14 @@
     typedef _Rp (_FnType) (_Param...);
 };
 
+template <class _Rp, class _Class, class ..._Param>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&&, true, false>
+{
+    typedef _Class const volatile&& _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param..., ...);
+};
+
 #endif  // __has_feature(cxx_reference_qualified_functions)
 
 #else  // _LIBCPP_HAS_NO_VARIADICS
@@ -1784,6 +1895,14 @@
     typedef _Rp (_FnType) ();
 };
 
+template <class _Rp, class _Class>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(...), true, false>
+{
+    typedef _Class _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (...);
+};
+
 template <class _Rp, class _Class, class _P0>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0), true, false>
 {
@@ -1792,6 +1911,14 @@
     typedef _Rp (_FnType) (_P0);
 };
 
+template <class _Rp, class _Class, class _P0>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...), true, false>
+{
+    typedef _Class _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1), true, false>
 {
@@ -1800,6 +1927,14 @@
     typedef _Rp (_FnType) (_P0, _P1);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...), true, false>
+{
+    typedef _Class _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2), true, false>
 {
@@ -1808,6 +1943,14 @@
     typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1, class _P2>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...), true, false>
+{
+    typedef _Class _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2, ...);
+};
+
 template <class _Rp, class _Class>
 struct __member_pointer_traits_imp<_Rp (_Class::*)() const, true, false>
 {
@@ -1816,6 +1959,14 @@
     typedef _Rp (_FnType) ();
 };
 
+template <class _Rp, class _Class>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(...) const, true, false>
+{
+    typedef _Class const _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (...);
+};
+
 template <class _Rp, class _Class, class _P0>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) const, true, false>
 {
@@ -1824,6 +1975,14 @@
     typedef _Rp (_FnType) (_P0);
 };
 
+template <class _Rp, class _Class, class _P0>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) const, true, false>
+{
+    typedef _Class const _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) const, true, false>
 {
@@ -1832,6 +1991,14 @@
     typedef _Rp (_FnType) (_P0, _P1);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) const, true, false>
+{
+    typedef _Class const _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) const, true, false>
 {
@@ -1840,6 +2007,14 @@
     typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1, class _P2>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) const, true, false>
+{
+    typedef _Class const _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2, ...);
+};
+
 template <class _Rp, class _Class>
 struct __member_pointer_traits_imp<_Rp (_Class::*)() volatile, true, false>
 {
@@ -1848,6 +2023,14 @@
     typedef _Rp (_FnType) ();
 };
 
+template <class _Rp, class _Class>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(...) volatile, true, false>
+{
+    typedef _Class volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (...);
+};
+
 template <class _Rp, class _Class, class _P0>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) volatile, true, false>
 {
@@ -1856,6 +2039,14 @@
     typedef _Rp (_FnType) (_P0);
 };
 
+template <class _Rp, class _Class, class _P0>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) volatile, true, false>
+{
+    typedef _Class volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) volatile, true, false>
 {
@@ -1864,6 +2055,14 @@
     typedef _Rp (_FnType) (_P0, _P1);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) volatile, true, false>
+{
+    typedef _Class volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) volatile, true, false>
 {
@@ -1872,6 +2071,14 @@
     typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1, class _P2>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) volatile, true, false>
+{
+    typedef _Class volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2, ...);
+};
+
 template <class _Rp, class _Class>
 struct __member_pointer_traits_imp<_Rp (_Class::*)() const volatile, true, false>
 {
@@ -1880,6 +2087,14 @@
     typedef _Rp (_FnType) ();
 };
 
+template <class _Rp, class _Class>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(...) const volatile, true, false>
+{
+    typedef _Class const volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (...);
+};
+
 template <class _Rp, class _Class, class _P0>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0) const volatile, true, false>
 {
@@ -1888,6 +2103,14 @@
     typedef _Rp (_FnType) (_P0);
 };
 
+template <class _Rp, class _Class, class _P0>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, ...) const volatile, true, false>
+{
+    typedef _Class const volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1) const volatile, true, false>
 {
@@ -1896,6 +2119,14 @@
     typedef _Rp (_FnType) (_P0, _P1);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, ...) const volatile, true, false>
+{
+    typedef _Class const volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, ...);
+};
+
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
 struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2) const volatile, true, false>
 {
@@ -1904,6 +2135,14 @@
     typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
+template <class _Rp, class _Class, class _P0, class _P1, class _P2>
+struct __member_pointer_traits_imp<_Rp (_Class::*)(_P0, _P1, _P2, ...) const volatile, true, false>
+{
+    typedef _Class const volatile _ClassType;
+    typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2, ...);
+};
+
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
 template <class _Rp, class _Class>
@@ -2076,10 +2315,24 @@
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
 // template <class T, class... Args> struct is_constructible;
 
+namespace __is_construct
+{
+struct __nat {};
+}
+
+#if __has_feature(is_constructible)
+
+template <class _Tp, class ..._Args>
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible
+    : public integral_constant<bool, __is_constructible(_Tp, _Args...)>
+    {};
+
+#else
+
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
 //      main is_constructible test
 
 template <class _Tp, class ..._Args>
@@ -2307,13 +2560,6 @@
 
 //      is_constructible entry point
 
-namespace __is_construct
-{
-
-struct __nat {};
-
-}
-
 template <class _Tp, class _A0 = __is_construct::__nat,
                      class _A1 = __is_construct::__nat>
 struct _LIBCPP_TYPE_VIS_ONLY is_constructible
@@ -2378,6 +2624,7 @@
     {};
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
+#endif  // __has_feature(is_constructible)
 
 // is_default_constructible
 
@@ -2426,7 +2673,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
-#if __has_feature(has_trivial_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_trivial_constructor) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_trivial_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2555,7 +2802,7 @@
 
 // is_trivially_assignable
 
-#if __has_feature(is_trivially_constructible)
+#if __has_feature(is_trivially_assignable)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2563,7 +2810,7 @@
 {
 };
 
-#else  // !__has_feature(is_trivially_constructible)
+#else  // !__has_feature(is_trivially_assignable)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2589,7 +2836,7 @@
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-#endif  // !__has_feature(is_trivially_constructible)
+#endif  // !__has_feature(is_trivially_assignable)
 
 // is_trivially_copy_assignable
 
@@ -2611,12 +2858,12 @@
 
 // is_trivially_destructible
 
-#if __has_feature(has_trivial_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
     : public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
 
-#else  // _LIBCPP_HAS_TYPE_TRAITS
+#else
 
 template <class _Tp> struct __libcpp_trivial_destructor
     : public integral_constant<bool, is_scalar<_Tp>::value ||
@@ -2625,7 +2872,7 @@
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
     : public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
 
-#endif  // _LIBCPP_HAS_TYPE_TRAITS
+#endif
 
 // is_nothrow_constructible
 
@@ -2640,7 +2887,7 @@
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp, class... _Args> struct __libcpp_is_nothrow_constructible;
 
@@ -2678,7 +2925,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2692,7 +2939,7 @@
 #else
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
 #endif
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2702,7 +2949,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2712,7 +2959,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2734,7 +2981,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2745,7 +2992,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2756,7 +3003,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2767,7 +3014,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2802,7 +3049,7 @@
 
 // is_nothrow_assignable
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp, class _Arg> struct __libcpp_is_nothrow_assignable;
 
@@ -2832,7 +3079,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2840,7 +3087,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2848,7 +3095,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, const _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2858,7 +3105,7 @@
 
 template <class _Tp>
 struct is_nothrow_assignable<_Tp&, _Tp&&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2888,7 +3135,7 @@
 
 // is_nothrow_destructible
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp> struct __libcpp_is_nothrow_destructible;
 
@@ -2945,12 +3192,12 @@
 
 // is_pod
 
-#if __has_feature(is_pod) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_pod) || (_GNUC_VER >= 403)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
     : public integral_constant<bool, __is_pod(_Tp)> {};
 
-#else  // _LIBCPP_HAS_TYPE_TRAITS
+#else
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
     : public integral_constant<bool, is_trivially_default_constructible<_Tp>::value   &&
@@ -2958,13 +3205,13 @@
                                      is_trivially_copy_assignable<_Tp>::value    &&
                                      is_trivially_destructible<_Tp>::value> {};
 
-#endif  // _LIBCPP_HAS_TYPE_TRAITS
+#endif
 
 // is_literal_type;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_literal_type
-#if __has_feature(is_literal)
-    : public integral_constant<bool, __is_literal(_Tp)>
+#ifdef _LIBCPP_IS_LITERAL
+    : public integral_constant<bool, _LIBCPP_IS_LITERAL(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value ||
                               is_reference<typename remove_all_extents<_Tp>::type>::value>
@@ -2974,7 +3221,7 @@
 // is_standard_layout;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_standard_layout
-#if __has_feature(is_standard_layout)
+#if __has_feature(is_standard_layout) || (_GNUC_VER >= 407)
     : public integral_constant<bool, __is_standard_layout(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
@@ -2994,7 +3241,7 @@
 // is_trivial;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivial
-#if __has_feature(is_trivial)
+#if __has_feature(is_trivial) || (_GNUC_VER >= 407)
     : public integral_constant<bool, __is_trivial(_Tp)>
 #else
     : integral_constant<bool, is_trivially_copyable<_Tp>::value &&
@@ -3324,7 +3571,7 @@
 {
 };
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp>
 struct __is_nothrow_swappable_imp
@@ -3355,19 +3602,19 @@
 
 #endif  // __has_feature(cxx_noexcept)
 
-#ifdef _LIBCXX_UNDERLYING_TYPE
+#ifdef _LIBCPP_UNDERLYING_TYPE
 
 template <class _Tp>
 struct underlying_type
 {
-    typedef _LIBCXX_UNDERLYING_TYPE(_Tp) type;
+    typedef _LIBCPP_UNDERLYING_TYPE(_Tp) type;
 };
 
 #if _LIBCPP_STD_VER > 11
 template <class _Tp> using underlying_type_t = typename underlying_type<_Tp>::type;
 #endif
 
-#else  // _LIBCXX_UNDERLYING_TYPE
+#else  // _LIBCPP_UNDERLYING_TYPE
 
 template <class _Tp, bool _Support = false>
 struct underlying_type
@@ -3377,7 +3624,7 @@
                             "libc++ does not know how to use it.");
 };
 
-#endif // _LIBCXX_UNDERLYING_TYPE
+#endif // _LIBCPP_UNDERLYING_TYPE
 
 #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
 
diff --git a/include/typeinfo b/include/typeinfo
index 7fcc824..14ef77b 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -116,7 +116,7 @@
         {return *reinterpret_cast<const size_t*>(&__type_name);}
 #else
         {if (!(__type_name & _LIBCPP_NONUNIQUE_RTTI_BIT)) return __type_name;
-         const char *__ptr = __name_for_load();
+         const char *__ptr = name();
          size_t __hash = 5381;
          while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
            __hash = (__hash * 33) ^ __c;
@@ -141,15 +141,7 @@
   private:
     _LIBCPP_INLINE_VISIBILITY
     int __compare_nonunique_names(const type_info &__arg) const _NOEXCEPT
-        {return __builtin_strcmp(__name_for_load(), __arg.__name_for_load());}
-
-    _LIBCPP_INLINE_VISIBILITY
-    const char *__name_for_load() const _NOEXCEPT
-        {uintptr_t __data = __type_name;
-#if 1
-         __data &= ~_LIBCPP_NONUNIQUE_RTTI_BIT;
-#endif
-         return reinterpret_cast<const char*>(__data);}
+        {return __builtin_strcmp(name(), __arg.name());}
 #endif
 };
 
diff --git a/include/utility b/include/utility
index 8a7e1dc..4eafda4 100644
--- a/include/utility
+++ b/include/utility
@@ -345,9 +345,9 @@
         _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
         pair(_Tuple&& __p)
             : first(_VSTD::forward<typename tuple_element<0,
-                                  typename __make_tuple_types<_Tuple>::type>::type>(get<0>(__p))),
+                                  typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<0>(__p))),
               second(_VSTD::forward<typename tuple_element<1,
-                                   typename __make_tuple_types<_Tuple>::type>::type>(get<1>(__p)))
+                                   typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<1>(__p)))
             {}
 
 
diff --git a/include/valarray b/include/valarray
index 5113516..2b94204 100644
--- a/include/valarray
+++ b/include/valarray
@@ -345,6 +345,7 @@
 #include <initializer_list>
 #include <algorithm>
 #include <functional>
+#include <new>
 
 #include <__undef_min_max>
 
@@ -1219,6 +1220,7 @@
     const value_type* __s = __sa.__vp_;
     for (size_t __n = __size_; __n; --__n, __t += __stride_, __s += __sa.__stride_)
         *__t = *__s;
+    return *this;
 }
 
 template <class _Tp>
@@ -2089,6 +2091,7 @@
     size_t __n = __1d_.size();
     for (size_t __i = 0; __i < __n; ++__i)
         __vp_[__1d_[__i]] = __ma.__vp_[__1d_[__i]];
+    return *this;
 }
 
 template <class _Tp>
@@ -2636,7 +2639,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<result_type*>(::operator new(__n * sizeof(result_type)));
+                static_cast<result_type*>(_VSTD::__allocate(__n * sizeof(result_type)));
         for (size_t __i = 0; __i != __n; ++__r.__end_, ++__i)
             ::new (__r.__end_) result_type(__expr_[__i]);
     }
@@ -2670,7 +2673,7 @@
 {
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2695,7 +2698,7 @@
 {
     if (__v.size())
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__v.size() * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__v.size() * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2736,7 +2739,7 @@
     size_t __n = __il.size();
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2764,7 +2767,7 @@
     size_t __n = __sa.__size_;
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2790,7 +2793,7 @@
     size_t __n = __ga.__1d_.size();
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2819,7 +2822,7 @@
     size_t __n = __ma.__1d_.size();
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -2848,7 +2851,7 @@
     size_t __n = __ia.__1d_.size();
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
@@ -3133,7 +3136,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) value_type(+*__p);
     }
@@ -3150,7 +3153,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) value_type(-*__p);
     }
@@ -3167,7 +3170,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) value_type(~*__p);
     }
@@ -3184,7 +3187,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<bool*>(::operator new(__n * sizeof(bool)));
+                static_cast<bool*>(_VSTD::__allocate(__n * sizeof(bool)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) bool(!*__p);
     }
@@ -3504,7 +3507,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         const value_type* __sb;
         value_type* __tb;
         value_type* __te;
@@ -3542,7 +3545,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         __i %= static_cast<int>(__n);
         const value_type* __m = __i >= 0 ? __begin_ + __i : __end_ + __i;
         for (const value_type* __s = __m; __s != __end_; ++__r.__end_, ++__s)
@@ -3563,7 +3566,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) value_type(__f(*__p));
     }
@@ -3580,7 +3583,7 @@
     {
         __r.__begin_ =
             __r.__end_ =
-                static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+                static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
         for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
             ::new (__r.__end_) value_type(__f(*__p));
     }
@@ -3595,12 +3598,12 @@
     {
         while (__end_ != __begin_)
             (--__end_)->~value_type();
-        ::operator delete(__begin_);
+        _VSTD::__deallocate(__begin_);
         __begin_ = __end_ = nullptr;
     }
     if (__n)
     {
-        __begin_ = __end_ = static_cast<value_type*>(::operator new(__n * sizeof(value_type)));
+        __begin_ = __end_ = static_cast<value_type*>(_VSTD::__allocate(__n * sizeof(value_type)));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
diff --git a/include/vector b/include/vector
index 6ac78d5..5d41bd1 100644
--- a/include/vector
+++ b/include/vector
@@ -483,6 +483,7 @@
 {
 private:
     typedef __vector_base<_Tp, _Allocator>           __base;
+    typedef allocator<_Tp>                           __default_allocator_type;
 public:
     typedef vector                                   __self;
     typedef _Tp                                      value_type;
@@ -749,7 +750,9 @@
     _LIBCPP_INLINE_VISIBILITY
     void clear() _NOEXCEPT
     {
+        size_type __old_size = size();
         __base::clear();
+        __annotate_shrink(__old_size);
         __invalidate_all_iterators();
     }
 
@@ -816,7 +819,9 @@
         }
         __get_db()->unlock();
 #endif
+        size_type __old_size = size();
         __base::__destruct_at_end(__new_last);
+        __annotate_shrink(__old_size);
     }
     template <class _Up>
         void
@@ -830,17 +835,52 @@
         void
         __emplace_back_slow_path(_Args&&... __args);
 #endif
+    // The following functions are no-ops outside of AddressSanitizer mode.
+    // We call annotatations only for the default Allocator because other allocators
+    // may not meet the AddressSanitizer alignment constraints.
+    // See the documentation for __sanitizer_annotate_contiguous_container for more details.
+    void __annotate_contiguous_container
+    (const void *__beg, const void *__end, const void *__old_mid, const void *__new_mid)
+    {
+#ifndef _LIBCPP_HAS_NO_ASAN
+      if (__beg && is_same<allocator_type, __default_allocator_type>::value)
+        __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
+#endif
+    }
+
+    void __annotate_new(size_type __current_size)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + capacity(), data() + __current_size);
+    }
+    void __annotate_delete()
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + size(), data() + capacity());
+    }
+    void __annotate_increase(size_type __n)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + size(), data() + size() + __n);
+    }
+    void __annotate_shrink(size_type __old_size)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + __old_size, data() + size());
+    }
 };
 
 template <class _Tp, class _Allocator>
 void
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
 {
+    __annotate_delete();
     __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
     _VSTD::swap(this->__begin_, __v.__begin_);
     _VSTD::swap(this->__end_, __v.__end_);
     _VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
+    __annotate_new(size());
     __invalidate_all_iterators();
 }
 
@@ -848,6 +888,7 @@
 typename vector<_Tp, _Allocator>::pointer
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p)
 {
+    __annotate_delete();
     pointer __r = __v.__begin_;
     __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, __p, __v.__begin_);
     __alloc_traits::__construct_forward(this->__alloc(), __p, this->__end_, __v.__end_);
@@ -855,6 +896,7 @@
     _VSTD::swap(this->__end_, __v.__end_);
     _VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
+    __annotate_new(size());
     __invalidate_all_iterators();
     return __r;
 }
@@ -874,6 +916,7 @@
         this->__throw_length_error();
     this->__begin_ = this->__end_ = __alloc_traits::allocate(this->__alloc(), __n);
     this->__end_cap() = this->__begin_ + __n;
+    __annotate_new(0);
 }
 
 template <class _Tp, class _Allocator>
@@ -920,6 +963,7 @@
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
 {
     allocator_type& __a = this->__alloc();
+    __annotate_increase(__n);
     do
     {
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_));
@@ -940,6 +984,7 @@
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
 {
     allocator_type& __a = this->__alloc();
+    __annotate_increase(__n);
     do
     {
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), __x);
@@ -960,6 +1005,7 @@
     allocator_type& __a = this->__alloc();
     for (; __first != __last; ++__first)
     {
+        __annotate_increase(1);
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), *__first);
         ++this->__end_;
     }
@@ -972,6 +1018,7 @@
     allocator_type& __a = this->__alloc();
     for (; __first != __last; ++__first)
     {
+        __annotate_increase(1);
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::move(*__first));
         ++this->__end_;
@@ -1284,10 +1331,10 @@
     _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
 {
     deallocate();
+    __base::__move_assign_alloc(__c); // this can throw
     this->__begin_ = __c.__begin_;
     this->__end_ = __c.__end_;
     this->__end_cap() = __c.__end_cap();
-    __base::__move_assign_alloc(__c);
     __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
 #if _LIBCPP_DEBUG_LEVEL >= 2
     __get_db()->swap(this, &__c);
@@ -1535,6 +1582,7 @@
 {
     if (this->__end_ != this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_), __x);
         ++this->__end_;
@@ -1552,6 +1600,7 @@
 {
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::move(__x));
@@ -1584,6 +1633,7 @@
 {
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::forward<_Args>(__args)...);
@@ -1666,6 +1716,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1705,6 +1756,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1743,6 +1795,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1794,6 +1847,7 @@
             }
             if (__n > 0)
             {
+                __annotate_increase(__n);
                 __move_range(__p, __old_last, __p + __old_n);
                 const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
                 if (__p <= __xr && __xr < this->__end_)
@@ -1904,6 +1958,7 @@
             }
             if (__n > 0)
             {
+                __annotate_increase(__n);
                 __move_range(__p, __old_last, __p + __old_n);
                 _VSTD::copy(__first, __m, __p);
             }
@@ -2297,7 +2352,7 @@
     void deallocate() _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     static size_type __align_it(size_type __new_size) _NOEXCEPT
-        {return __new_size + (__bits_per_word-1) & ~(__bits_per_word-1);};
+        {return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);};
     _LIBCPP_INLINE_VISIBILITY  size_type __recommend(size_type __new_size) const;
     _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
     template <class _ForwardIterator>
@@ -2796,10 +2851,10 @@
     _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
 {
     deallocate();
+    __move_assign_alloc(__c);
     this->__begin_ = __c.__begin_;
     this->__size_ = __c.__size_;
     this->__cap() = __c.__cap();
-    __move_assign_alloc(__c);
     __c.__begin_ = nullptr;
     __c.__cap() = __c.__size_ = 0;
 }
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index cec0bee..d56ade4 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -32,7 +32,7 @@
 endif()
 
 if (DEFINED LIBCXX_CXX_ABI_DEPS)
-  add_dependencies(cxx ${LIBCXX_CXX_ABI_DEPS})
+  add_dependencies(cxx LIBCXX_CXX_ABI_DEPS)
 endif()
 
 # Generate library list.
@@ -54,7 +54,7 @@
     list(APPEND compile_flags "-U__STRICT_ANSI__")
     list(APPEND link_flags
       "-compatibility_version 1"
-      "-current_version ${LIBCXX_VERSION}"
+      "-current_version 1"
       "-install_name /usr/lib/libc++.1.dylib"
       "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
       "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
@@ -84,6 +84,7 @@
   endif()
 endif()
 
+string(REPLACE ";" " " compile_flags "${compile_flags}")
 string(REPLACE ";" " " link_flags "${link_flags}")
 
 set_target_properties(cxx
@@ -96,6 +97,6 @@
   )
 
 install(TARGETS cxx
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
+  LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+  ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
   )
diff --git a/lib/buildit b/lib/buildit
index 7e42c1b..7e3bc2e 100755
--- a/lib/buildit
+++ b/lib/buildit
@@ -50,7 +50,7 @@
       RC_CFLAGS="-arch i386 -arch x86_64"
     fi
     SOEXT=dylib
-    if [ "$MACOSX_DEPLOYMENT_TARGET" == "10.6" ]
+    if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.6" ]
     then
         EXTRA_FLAGS="-nostdinc++ -std=c++11 -U__STRICT_ANSI__"
         LDSHARED_FLAGS="-o libc++.1.dylib \
@@ -106,7 +106,7 @@
     hostOS=`echo $hostOS | sed -e "s/\s+$//"`
     hostOS=`echo $hostOS | tr '[A-Z]' '[a-z]'`
 
-    if [ $hostOS == "linux" ]
+    if [ $hostOS = "linux" ]
     then
       LDSHARED_FLAGS="-o libc++.so.1 \
         -qmkshrobj -Wl,-soname,libc++.so.1 \
@@ -158,7 +158,7 @@
     *-*-mingw*)
         ;;
     *-ibm-*)
-        if [ $hostOS == "linux" ]
+        if [ $hostOS = "linux" ]
         then
            rm -f libc++.so
            ln -s libc++.so.1 libc++.so
diff --git a/src/hash.cpp b/src/hash.cpp
index 388ab2e..dc90f78 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -136,7 +136,7 @@
 // The algorithm creates a list of small primes, plus an open-ended list of
 // potential primes.  All prime numbers are potential prime numbers.  However
 // some potential prime numbers are not prime.  In an ideal world, all potential
-// prime numbers would be prime.  Candiate prime numbers are chosen as the next
+// prime numbers would be prime.  Candidate prime numbers are chosen as the next
 // highest potential prime.  Then this number is tested for prime by dividing it
 // by all potential prime numbers less than the sqrt of the candidate.
 //
diff --git a/src/ios.cpp b/src/ios.cpp
index 35cb030..e241394 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -305,7 +305,7 @@
 ios_base::copyfmt(const ios_base& rhs)
 {
     // If we can't acquire the needed resources, throw bad_alloc (can't set badbit)
-    // Don't alter *this until all needed resources are aquired
+    // Don't alter *this until all needed resources are acquired
     unique_ptr<event_callback, void (*)(void*)> new_callbacks(0, free);
     unique_ptr<int, void (*)(void*)> new_ints(0, free);
     unique_ptr<long, void (*)(void*)> new_longs(0, free);
diff --git a/src/random.cpp b/src/random.cpp
index bd24f2e..86017ef 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -49,7 +49,7 @@
 random_device::random_device(const string& __token)
     : __f_(open(__token.c_str(), O_RDONLY))
 {
-    if (__f_ <= 0)
+    if (__f_ < 0)
         __throw_system_error(errno, ("random_device failed to open " + __token).c_str());
 }
 
@@ -62,7 +62,22 @@
 random_device::operator()()
 {
     unsigned r;
-    read(__f_, &r, sizeof(r));
+    size_t n = sizeof(r);
+    char* p = reinterpret_cast<char*>(&r);
+    while (n > 0)
+    {
+        ssize_t s = read(__f_, p, n);
+        if (s == 0)
+            __throw_system_error(ENODATA, "random_device got EOF");
+        if (s == -1)
+        {
+            if (errno != EINTR)
+                __throw_system_error(errno, "random_device got an unexpected error");
+            continue;
+        }
+        n -= static_cast<size_t>(s);
+        p += static_cast<size_t>(s);
+    }
     return r;
 }
 #endif // defined(_WIN32)
diff --git a/src/support/win32/support.cpp b/src/support/win32/support.cpp
index 6ee31e0..e989681 100644
--- a/src/support/win32/support.cpp
+++ b/src/support/win32/support.cpp
@@ -107,8 +107,8 @@
 // Converts max_source_chars from the wide character buffer pointer to by *src,
 // into the multi byte character sequence buffer stored at dst which must be
 // dst_size_bytes bytes in size.
-// Returns >= 0: the number of bytes in the sequence sequence 
-// converted frome *src, excluding the null terminator.
+// Returns >= 0: the number of bytes in the sequence
+// converted from *src, excluding the null terminator.
 // Returns size_t(-1) if an error occurs, also sets errno.
 // If dst is NULL dst_size_bytes is ignored and no bytes are copied to dst 
 // and no "out" parameters are updated.
diff --git a/src/thread.cpp b/src/thread.cpp
index bd2b7c3..e6f57c4 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -121,7 +121,9 @@
             ts.tv_sec = ts_sec_max;
             ts.tv_nsec = giga::num - 1;
         }
-        nanosleep(&ts, 0);
+
+        while (nanosleep(&ts, &ts) == -1 && errno == EINTR)
+            ;
     }
 }
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4810b2c..7236dec 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -14,7 +14,7 @@
     set(LIT_EXECUTABLE "${CMAKE_SOURCE_DIR}/utils/lit/lit.py")
   endif()
 
-  set(LIT_ARGS_DEFAULT "-sv")
+  set(LIT_ARGS_DEFAULT "-sv --show-unsupported --show-xfail")
   if (MSVC OR XCODE)
     set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
   endif()
@@ -28,7 +28,6 @@
   set(LIBCXX_BINARY_DIR ${CMAKE_BINARY_DIR})
   set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
   pythonize_bool(LIBCXX_ENABLE_SHARED)
-  pythonize_bool(LIBCXX_HAS_STDCXX0X_FLAG)
 
   set(AUTO_GEN_COMMENT "## Autogenerated by libcxx configuration.\n# Do not edit!")
 
diff --git a/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp b/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp
index 6da3a67..b234431 100644
--- a/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp
+++ b/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp
@@ -23,6 +23,9 @@
 #endif
 
 #include "test_iterators.h"
+#include "counting_predicates.hpp"
+
+bool equal2 ( int i ) { return i == 2; }
 
 template <class Iter>
 void
@@ -30,7 +33,9 @@
 {
     int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2};
     const unsigned sa = sizeof(ia)/sizeof(ia[0]);
-    int* r = std::remove_if(ia, ia+sa, std::bind2nd(std::equal_to<int>(), 2));
+//     int* r = std::remove_if(ia, ia+sa, std::bind2nd(std::equal_to<int>(), 2));
+    unary_counting_predicate<bool(*)(int), int> cp(equal2);
+    int* r = std::remove_if(ia, ia+sa, std::ref(cp));
     assert(r == ia + sa-3);
     assert(ia[0] == 0);
     assert(ia[1] == 1);
@@ -38,6 +43,7 @@
     assert(ia[3] == 4);
     assert(ia[4] == 3);
     assert(ia[5] == 4);
+    assert(cp.count() == sa);
 }
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp b/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
index ed76fa2..4cde1a7 100644
--- a/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
@@ -17,6 +17,9 @@
 #include <algorithm>
 #include <functional>
 #include <cassert>
+
+#include "counting_predicates.hpp"
+
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #include <memory>
 
@@ -32,11 +35,43 @@
 void test(unsigned N)
 {
     int* ia = new int [N];
+    {
     for (int i = 0; i < N; ++i)
         ia[i] = i;
     std::random_shuffle(ia, ia+N);
     std::make_heap(ia, ia+N, std::greater<int>());
     assert(std::is_heap(ia, ia+N, std::greater<int>()));
+    }
+
+//  Ascending
+    {
+    binary_counting_predicate<std::greater<int>, int, int> pred ((std::greater<int>()));
+    for (int i = 0; i < N; ++i)
+        ia[i] = i;
+    std::make_heap(ia, ia+N, std::ref(pred));
+    assert(pred.count() <= 3*N);
+    assert(std::is_heap(ia, ia+N, pred));
+    }
+
+//  Descending
+    {
+    binary_counting_predicate<std::greater<int>, int, int> pred ((std::greater<int>()));
+    for (int i = 0; i < N; ++i)
+        ia[N-1-i] = i;
+    std::make_heap(ia, ia+N, std::ref(pred));
+    assert(pred.count() <= 3*N);
+    assert(std::is_heap(ia, ia+N, pred));
+    }
+
+//  Random
+    {
+    binary_counting_predicate<std::greater<int>, int, int> pred ((std::greater<int>()));
+    std::random_shuffle(ia, ia+N);
+    std::make_heap(ia, ia+N, std::ref(pred));
+    assert(pred.count() <= 3*N);
+    assert(std::is_heap(ia, ia+N, pred));   
+    }
+
     delete [] ia;
 }
 
@@ -48,6 +83,8 @@
     test(3);
     test(10);
     test(1000);
+    test(10000);
+    test(100000);
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
diff --git a/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp b/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
index 3fa8b2c..71dfeef 100644
--- a/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
@@ -27,12 +27,12 @@
     int ia[] = {1, 2, 3, 4};
     const unsigned sa = sizeof(ia)/sizeof(ia[0]);
     int ib[] = {1, 2, 3};
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+2));
-    assert(std::lexicographical_compare(ib, ib+2, ia, ia+sa));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+3));
-    assert(std::lexicographical_compare(ib, ib+3, ia, ia+sa));
-    assert(std::lexicographical_compare(ia, ia+sa, ib+1, ib+3));
-    assert(!std::lexicographical_compare(ib+1, ib+3, ia, ia+sa));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+2)));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+2),  Iter2(ia),   Iter2(ia+sa)));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+3)));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa)));
+    assert( std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib+1), Iter2(ib+3)));
+    assert(!std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa)));
 }
 
 int main()
diff --git a/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp b/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
index f5f1c07..c185156 100644
--- a/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
@@ -31,12 +31,12 @@
     int ib[] = {1, 2, 3};
     typedef std::greater<int> C;
     C c;
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+2, c));
-    assert(std::lexicographical_compare(ib, ib+2, ia, ia+sa, c));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+3, c));
-    assert(std::lexicographical_compare(ib, ib+3, ia, ia+sa, c));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib+1, ib+3, c));
-    assert(std::lexicographical_compare(ib+1, ib+3, ia, ia+sa, c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+2),  c));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+2),  Iter2(ia),   Iter2(ia+sa), c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+3),  c));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa), c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib+1), Iter2(ib+3),  c));
+    assert( std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa), c));
 }
 
 int main()
diff --git a/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
index c99c693..74e9fe6 100644
--- a/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
@@ -58,10 +58,28 @@
     test<Iter>(1000);
 }
 
+template <class Iter, class Pred>
+void test_eq0(Iter first, Iter last, Pred p)
+{
+    assert(first == std::max_element(first, last, p));
+}
+
+void test_eq()
+{
+    const size_t N = 10;
+    int* a = new int[N];
+    for (int i = 0; i < N; ++i)
+        a[i] = 10; // all the same
+    test_eq0(a, a+N, std::less<int>());
+    test_eq0(a, a+N, std::greater<int>());
+    delete [] a;
+}
+
 int main()
 {
     test<forward_iterator<const int*> >();
     test<bidirectional_iterator<const int*> >();
     test<random_access_iterator<const int*> >();
     test<const int*>();
+    test_eq();
 }
diff --git a/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
index 55d7215..2b5fdb1 100644
--- a/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
@@ -58,10 +58,28 @@
     test<Iter>(1000);
 }
 
+template <class Iter, class Pred>
+void test_eq0(Iter first, Iter last, Pred p)
+{
+    assert(first == std::min_element(first, last, p));
+}
+
+void test_eq()
+{
+    const size_t N = 10;
+    int* a = new int[N];
+    for (int i = 0; i < N; ++i)
+        a[i] = 10; // all the same
+    test_eq0(a, a+N, std::less<int>());
+    test_eq0(a, a+N, std::greater<int>());
+    delete [] a;
+}
+
 int main()
 {
     test<forward_iterator<const int*> >();
     test<bidirectional_iterator<const int*> >();
     test<random_access_iterator<const int*> >();
     test<const int*>();
+    test_eq();
 }
diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
index 1774ffd..6ac972a 100644
--- a/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
@@ -48,7 +48,7 @@
 #if _LIBCPP_STD_VER > 11
     {
 //  Note that you can't take a reference to a local var, since 
-//  it's address is not a compile-time constant.
+//  its address is not a compile-time constant.
     constexpr static int x = 1;
     constexpr static int y = 0;
     constexpr auto p1 = std::minmax (x, y);
diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
index 66b2e78..771c8f8 100644
--- a/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
+++ b/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
@@ -51,7 +51,7 @@
 #if _LIBCPP_STD_VER > 11
     {
 //  Note that you can't take a reference to a local var, since 
-//  it's address is not a compile-time constant.
+//  its address is not a compile-time constant.
     constexpr static int x = 1;
     constexpr static int y = 0;
     constexpr auto p1 = std::minmax(x, y, std::greater<>());
diff --git a/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp b/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp
new file mode 100644
index 0000000..49ec069
--- /dev/null
+++ b/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <atomic>
+
+// template <class T>
+// struct atomic
+// {
+//     bool is_lock_free() const volatile noexcept;
+//     bool is_lock_free() const noexcept;
+//     void store(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
+//     void store(T desr, memory_order m = memory_order_seq_cst) noexcept;
+//     T load(memory_order m = memory_order_seq_cst) const volatile noexcept;
+//     T load(memory_order m = memory_order_seq_cst) const noexcept;
+//     operator T() const volatile noexcept;
+//     operator T() const noexcept;
+//     T exchange(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
+//     T exchange(T desr, memory_order m = memory_order_seq_cst) noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order s, memory_order f) volatile noexcept;
+//     bool compare_exchange_weak(T& expc, T desr, memory_order s, memory_order f) noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order s, memory_order f) volatile noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order s, memory_order f) noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order m = memory_order_seq_cst) volatile noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order m = memory_order_seq_cst) noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                 memory_order m = memory_order_seq_cst) volatile noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order m = memory_order_seq_cst) noexcept;
+// 
+//     atomic() noexcept = default;
+//     constexpr atomic(T desr) noexcept;
+//     atomic(const atomic&) = delete;
+//     atomic& operator=(const atomic&) = delete;
+//     atomic& operator=(const atomic&) volatile = delete;
+//     T operator=(T) volatile noexcept;
+//     T operator=(T) noexcept;
+// };
+
+#include <atomic>
+#include <new>
+#include <cassert>
+#include <thread> // for thread_id
+#include <chrono> // for nanoseconds
+
+struct NotTriviallyCopyable {
+	NotTriviallyCopyable ( int i ) : i_(i) {}
+	NotTriviallyCopyable ( const NotTriviallyCopyable &rhs) : i_(rhs.i_) {}
+	int i_;
+	};
+
+template <class T>
+void test ( T t ) {
+	std::atomic<T> t0(t);
+	}
+
+int main()
+{
+	test(NotTriviallyCopyable(42));
+}
diff --git a/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp b/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp
new file mode 100644
index 0000000..8cdd087
--- /dev/null
+++ b/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <atomic>
+
+// template <class T>
+// struct atomic
+// {
+//     bool is_lock_free() const volatile noexcept;
+//     bool is_lock_free() const noexcept;
+//     void store(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
+//     void store(T desr, memory_order m = memory_order_seq_cst) noexcept;
+//     T load(memory_order m = memory_order_seq_cst) const volatile noexcept;
+//     T load(memory_order m = memory_order_seq_cst) const noexcept;
+//     operator T() const volatile noexcept;
+//     operator T() const noexcept;
+//     T exchange(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
+//     T exchange(T desr, memory_order m = memory_order_seq_cst) noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order s, memory_order f) volatile noexcept;
+//     bool compare_exchange_weak(T& expc, T desr, memory_order s, memory_order f) noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order s, memory_order f) volatile noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order s, memory_order f) noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order m = memory_order_seq_cst) volatile noexcept;
+//     bool compare_exchange_weak(T& expc, T desr,
+//                                memory_order m = memory_order_seq_cst) noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                 memory_order m = memory_order_seq_cst) volatile noexcept;
+//     bool compare_exchange_strong(T& expc, T desr,
+//                                  memory_order m = memory_order_seq_cst) noexcept;
+// 
+//     atomic() noexcept = default;
+//     constexpr atomic(T desr) noexcept;
+//     atomic(const atomic&) = delete;
+//     atomic& operator=(const atomic&) = delete;
+//     atomic& operator=(const atomic&) volatile = delete;
+//     T operator=(T) volatile noexcept;
+//     T operator=(T) noexcept;
+// };
+
+#include <atomic>
+#include <new>
+#include <cassert>
+#include <thread> // for thread_id
+#include <chrono> // for nanoseconds
+
+struct TriviallyCopyable {
+	TriviallyCopyable ( int i ) : i_(i) {}
+	int i_;
+	};
+
+template <class T>
+void test ( T t ) {
+	std::atomic<T> t0(t);
+	}
+
+int main()
+{
+	test(TriviallyCopyable(42));
+	test(std::this_thread::get_id());
+	test(std::chrono::nanoseconds(2));
+}
diff --git a/test/containers/associative/map/map.ops/count.pass.cpp b/test/containers/associative/map/map.ops/count.pass.cpp
index 6628e3d..9668055 100644
--- a/test/containers/associative/map/map.ops/count.pass.cpp
+++ b/test/containers/associative/map/map.ops/count.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "private_constructor.hpp"
 
 int main()
 {
@@ -96,4 +97,77 @@
     }
     }
 #endif
+#if _LIBCPP_STD_VER > 11
+    {
+    typedef std::pair<const int, double> V;
+    typedef std::map<int, double, std::less <>> M;
+    typedef M::size_type R;
+
+    V ar[] =
+    {
+        V(5, 5),
+        V(6, 6),
+        V(7, 7),
+        V(8, 8),
+        V(9, 9),
+        V(10, 10),
+        V(11, 11),
+        V(12, 12)
+    };
+    const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+    R r = m.count(5);
+    assert(r == 1);
+    r = m.count(6);
+    assert(r == 1);
+    r = m.count(7);
+    assert(r == 1);
+    r = m.count(8);
+    assert(r == 1);
+    r = m.count(9);
+    assert(r == 1);
+    r = m.count(10);
+    assert(r == 1);
+    r = m.count(11);
+    assert(r == 1);
+    r = m.count(12);
+    assert(r == 1);
+    r = m.count(4);
+    assert(r == 0);
+    }
+
+    {
+    typedef PrivateConstructor PC;
+    typedef std::map<PC, double, std::less<>> M;
+    typedef M::size_type R;
+
+    M m;
+    m [ PC::make(5)  ] = 5;
+    m [ PC::make(6)  ] = 6;
+    m [ PC::make(7)  ] = 7;
+    m [ PC::make(8)  ] = 8;
+    m [ PC::make(9)  ] = 9;
+    m [ PC::make(10) ] = 10;
+    m [ PC::make(11) ] = 11;
+    m [ PC::make(12) ] = 12;
+
+    R r = m.count(5);
+    assert(r == 1);
+    r = m.count(6);
+    assert(r == 1);
+    r = m.count(7);
+    assert(r == 1);
+    r = m.count(8);
+    assert(r == 1);
+    r = m.count(9);
+    assert(r == 1);
+    r = m.count(10);
+    assert(r == 1);
+    r = m.count(11);
+    assert(r == 1);
+    r = m.count(12);
+    assert(r == 1);
+    r = m.count(4);
+    assert(r == 0);
+    }
+#endif
 }
diff --git a/test/containers/associative/map/types.pass.cpp b/test/containers/associative/map/types.pass.cpp
index 487b69f..d117def 100644
--- a/test/containers/associative/map/types.pass.cpp
+++ b/test/containers/associative/map/types.pass.cpp
@@ -37,31 +37,34 @@
 int main()
 {
     {
-    static_assert((std::is_same<std::map<int, double>::key_type, int>::value), "");
-    static_assert((std::is_same<std::map<int, double>::mapped_type, double>::value), "");
-    static_assert((std::is_same<std::map<int, double>::value_type, std::pair<const int, double> >::value), "");
-    static_assert((std::is_same<std::map<int, double>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::map<int, double>::allocator_type, std::allocator<std::pair<const int, double> > >::value), "");
-    static_assert((std::is_same<std::map<int, double>::reference, std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::map<int, double>::const_reference, const std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::map<int, double>::pointer, std::pair<const int, double>*>::value), "");
-    static_assert((std::is_same<std::map<int, double>::const_pointer, const std::pair<const int, double>*>::value), "");
-    static_assert((std::is_same<std::map<int, double>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::map<int, double>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::map<int, double> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::mapped_type, double>::value), "");
+    static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, std::allocator<std::pair<const int, double> > >::value), "");
+    static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::pointer, std::pair<const int, double>*>::value), "");
+    static_assert((std::is_same<C::const_pointer, const std::pair<const int, double>*>::value), "");
+    static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #if __cplusplus >= 201103L
     {
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::key_type, int>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::mapped_type, double>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::value_type, std::pair<const int, double> >::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::allocator_type, min_allocator<std::pair<const int, double> > >::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::reference, std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::const_reference, const std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::pointer, min_pointer<std::pair<const int, double>>>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::const_pointer, min_pointer<const std::pair<const int, double>>>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::mapped_type, double>::value), "");
+    static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, min_allocator<std::pair<const int, double> > >::value), "");
+    static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::pointer, min_pointer<std::pair<const int, double>>>::value), "");
+    static_assert((std::is_same<C::const_pointer, min_pointer<const std::pair<const int, double>>>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+    static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
 }
diff --git a/test/containers/associative/multimap/multimap.ops/count.pass.cpp b/test/containers/associative/multimap/multimap.ops/count.pass.cpp
index 34c0413..2f172d1 100644
--- a/test/containers/associative/multimap/multimap.ops/count.pass.cpp
+++ b/test/containers/associative/multimap/multimap.ops/count.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "private_constructor.hpp"
 
 int main()
 {
@@ -89,4 +90,70 @@
     }
     }
 #endif
+
+#if _LIBCPP_STD_VER > 11
+    {
+    typedef std::multimap<int, double, std::less<>> M;
+    typedef M::size_type R;
+    V ar[] =
+    {
+        V(5, 1),
+        V(5, 2),
+        V(5, 3),
+        V(7, 1),
+        V(7, 2),
+        V(7, 3),
+        V(9, 1),
+        V(9, 2),
+        V(9, 3)
+    };
+    const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+    R r = m.count(4);
+    assert(r == 0);
+    r = m.count(5);
+    assert(r == 3);
+    r = m.count(6);
+    assert(r == 0);
+    r = m.count(7);
+    assert(r == 3);
+    r = m.count(8);
+    assert(r == 0);
+    r = m.count(9);
+    assert(r == 3);
+    r = m.count(10);
+    assert(r == 0);
+    }
+
+    {
+    typedef PrivateConstructor PC;
+    typedef std::multimap<PC, double, std::less<>> M;
+    typedef M::size_type R;
+
+    M m;
+    m.insert ( std::make_pair<PC, double> ( PC::make(5), 1 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(5), 2 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(5), 3 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(7), 1 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(7), 2 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(7), 3 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(9), 1 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(9), 2 ));
+    m.insert ( std::make_pair<PC, double> ( PC::make(9), 3 ));
+
+    R r = m.count(4);
+    assert(r == 0);
+    r = m.count(5);
+    assert(r == 3);
+    r = m.count(6);
+    assert(r == 0);
+    r = m.count(7);
+    assert(r == 3);
+    r = m.count(8);
+    assert(r == 0);
+    r = m.count(9);
+    assert(r == 3);
+    r = m.count(10);
+    assert(r == 0);
+    }
+#endif
 }
diff --git a/test/containers/associative/multimap/types.pass.cpp b/test/containers/associative/multimap/types.pass.cpp
index 82132f1..a0f4db0 100644
--- a/test/containers/associative/multimap/types.pass.cpp
+++ b/test/containers/associative/multimap/types.pass.cpp
@@ -37,31 +37,34 @@
 int main()
 {
     {
-    static_assert((std::is_same<std::multimap<int, double>::key_type, int>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::mapped_type, double>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::value_type, std::pair<const int, double> >::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::allocator_type, std::allocator<std::pair<const int, double> > >::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::reference, std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::const_reference, const std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::pointer, std::pair<const int, double>*>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::const_pointer, const std::pair<const int, double>*>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::multimap<int, double>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::multimap<int, double> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::mapped_type, double>::value), "");
+    static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, std::allocator<std::pair<const int, double> > >::value), "");
+    static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::pointer, std::pair<const int, double>*>::value), "");
+    static_assert((std::is_same<C::const_pointer, const std::pair<const int, double>*>::value), "");
+    static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #if __cplusplus >= 201103L
     {
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::key_type, int>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::mapped_type, double>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::value_type, std::pair<const int, double> >::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::allocator_type, min_allocator<std::pair<const int, double> > >::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::reference, std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::const_reference, const std::pair<const int, double>&>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::pointer, min_pointer<std::pair<const int, double>>>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::const_pointer, min_pointer<const std::pair<const int, double>>>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::mapped_type, double>::value), "");
+    static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, min_allocator<std::pair<const int, double> > >::value), "");
+    static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+    static_assert((std::is_same<C::pointer, min_pointer<std::pair<const int, double>>>::value), "");
+    static_assert((std::is_same<C::const_pointer, min_pointer<const std::pair<const int, double>>>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+    static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
 }
diff --git a/test/containers/associative/multiset/count.pass.cpp b/test/containers/associative/multiset/count.pass.cpp
index 12af167..93bd6f8 100644
--- a/test/containers/associative/multiset/count.pass.cpp
+++ b/test/containers/associative/multiset/count.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "private_constructor.hpp"
 
 int main()
 {
@@ -90,4 +91,70 @@
     }
     }
 #endif
+#if _LIBCPP_STD_VER > 11
+    {
+    typedef int V;
+    typedef std::multiset<int, std::less<>> M;
+    typedef M::size_type R;
+    V ar[] =
+    {
+        5,
+        5,
+        5,
+        5,
+        7,
+        7,
+        7,
+        9,
+        9
+    };
+    const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+    R r = m.count(4);
+    assert(r == 0);
+    r = m.count(5);
+    assert(r == 4);
+    r = m.count(6);
+    assert(r == 0);
+    r = m.count(7);
+    assert(r == 3);
+    r = m.count(8);
+    assert(r == 0);
+    r = m.count(9);
+    assert(r == 2);
+    r = m.count(10);
+    assert(r == 0);
+    }
+
+    {
+    typedef PrivateConstructor V;
+    typedef std::multiset<V, std::less<>> M;
+    typedef M::size_type R;
+
+    M m;
+    m.insert ( V::make ( 5 ));
+    m.insert ( V::make ( 5 ));
+    m.insert ( V::make ( 5 ));
+    m.insert ( V::make ( 5 ));
+    m.insert ( V::make ( 7 ));
+    m.insert ( V::make ( 7 ));
+    m.insert ( V::make ( 7 ));
+    m.insert ( V::make ( 9 ));
+    m.insert ( V::make ( 9 ));
+
+    R r = m.count(4);
+    assert(r == 0);
+    r = m.count(5);
+    assert(r == 4);
+    r = m.count(6);
+    assert(r == 0);
+    r = m.count(7);
+    assert(r == 3);
+    r = m.count(8);
+    assert(r == 0);
+    r = m.count(9);
+    assert(r == 2);
+    r = m.count(10);
+    assert(r == 0);
+    }
+#endif
 }
diff --git a/test/containers/associative/multiset/types.pass.cpp b/test/containers/associative/multiset/types.pass.cpp
index da9c8d6..e1e3ad9 100644
--- a/test/containers/associative/multiset/types.pass.cpp
+++ b/test/containers/associative/multiset/types.pass.cpp
@@ -37,31 +37,34 @@
 int main()
 {
     {
-    static_assert((std::is_same<std::multiset<int>::key_type, int>::value), "");
-    static_assert((std::is_same<std::multiset<int>::value_type, int>::value), "");
-    static_assert((std::is_same<std::multiset<int>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multiset<int>::value_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multiset<int>::allocator_type, std::allocator<int> >::value), "");
-    static_assert((std::is_same<std::multiset<int>::reference, int&>::value), "");
-    static_assert((std::is_same<std::multiset<int>::const_reference, const int&>::value), "");
-    static_assert((std::is_same<std::multiset<int>::pointer, int*>::value), "");
-    static_assert((std::is_same<std::multiset<int>::const_pointer, const int*>::value), "");
-    static_assert((std::is_same<std::multiset<int>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::multiset<int>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::multiset<int> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::value_type, int>::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::value_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, std::allocator<int> >::value), "");
+    static_assert((std::is_same<C::reference, int&>::value), "");
+    static_assert((std::is_same<C::const_reference, const int&>::value), "");
+    static_assert((std::is_same<C::pointer, int*>::value), "");
+    static_assert((std::is_same<C::const_pointer, const int*>::value), "");
+    static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #if __cplusplus >= 201103L
     {
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::key_type, int>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::value_type, int>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::value_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::allocator_type, min_allocator<int>>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::reference, int&>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::const_reference, const int&>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::pointer, min_pointer<int>>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::const_pointer, min_pointer<const int>>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::multiset<int, std::less<int>, min_allocator<int>>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::multiset<int, std::less<int>, min_allocator<int>> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::value_type, int>::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::value_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, min_allocator<int>>::value), "");
+    static_assert((std::is_same<C::reference, int&>::value), "");
+    static_assert((std::is_same<C::const_reference, const int&>::value), "");
+    static_assert((std::is_same<C::pointer, min_pointer<int>>::value), "");
+    static_assert((std::is_same<C::const_pointer, min_pointer<const int>>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+    static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
 }
diff --git a/test/containers/associative/set/count.pass.cpp b/test/containers/associative/set/count.pass.cpp
index a2dc177..32fe0b8 100644
--- a/test/containers/associative/set/count.pass.cpp
+++ b/test/containers/associative/set/count.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "private_constructor.hpp"
 
 int main()
 {
@@ -92,4 +93,76 @@
         assert(r == 0);
     }
 #endif
+#if _LIBCPP_STD_VER > 11
+    {
+        typedef int V;
+        typedef std::set<int, std::less<>> M;
+        typedef M::size_type R;
+        V ar[] =
+        {
+            5,
+            6,
+            7,
+            8,
+            9,
+            10,
+            11,
+            12
+        };
+        const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+        R r = m.count(5);
+        assert(r == 1);
+        r = m.count(6);
+        assert(r == 1);
+        r = m.count(7);
+        assert(r == 1);
+        r = m.count(8);
+        assert(r == 1);
+        r = m.count(9);
+        assert(r == 1);
+        r = m.count(10);
+        assert(r == 1);
+        r = m.count(11);
+        assert(r == 1);
+        r = m.count(12);
+        assert(r == 1);
+        r = m.count(4);
+        assert(r == 0);
+    }
+    {
+    typedef PrivateConstructor V;
+    typedef std::set<V, std::less<>> M;
+        typedef M::size_type R;
+
+    M m;
+    m.insert ( V::make ( 5 ));
+    m.insert ( V::make ( 6 ));
+    m.insert ( V::make ( 7 ));
+    m.insert ( V::make ( 8 ));
+    m.insert ( V::make ( 9 ));
+    m.insert ( V::make ( 10 ));
+    m.insert ( V::make ( 11 ));
+    m.insert ( V::make ( 12 ));
+
+    R r = m.count(5);
+    assert(r == 1);
+    r = m.count(6);
+    assert(r == 1);
+    r = m.count(7);
+    assert(r == 1);
+    r = m.count(8);
+    assert(r == 1);
+    r = m.count(9);
+    assert(r == 1);
+    r = m.count(10);
+    assert(r == 1);
+    r = m.count(11);
+    assert(r == 1);
+    r = m.count(12);
+    assert(r == 1);
+    r = m.count(4);
+    assert(r == 0);
+    }
+#endif
+
 }
diff --git a/test/containers/associative/set/types.pass.cpp b/test/containers/associative/set/types.pass.cpp
index 8d7bb68..3362c42 100644
--- a/test/containers/associative/set/types.pass.cpp
+++ b/test/containers/associative/set/types.pass.cpp
@@ -37,31 +37,34 @@
 int main()
 {
     {
-    static_assert((std::is_same<std::set<int>::key_type, int>::value), "");
-    static_assert((std::is_same<std::set<int>::value_type, int>::value), "");
-    static_assert((std::is_same<std::set<int>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::set<int>::value_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::set<int>::allocator_type, std::allocator<int> >::value), "");
-    static_assert((std::is_same<std::set<int>::reference, int&>::value), "");
-    static_assert((std::is_same<std::set<int>::const_reference, const int&>::value), "");
-    static_assert((std::is_same<std::set<int>::pointer, int*>::value), "");
-    static_assert((std::is_same<std::set<int>::const_pointer, const int*>::value), "");
-    static_assert((std::is_same<std::set<int>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::set<int>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::set<int> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::value_type, int>::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::value_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, std::allocator<int> >::value), "");
+    static_assert((std::is_same<C::reference, int&>::value), "");
+    static_assert((std::is_same<C::const_reference, const int&>::value), "");
+    static_assert((std::is_same<C::pointer, int*>::value), "");
+    static_assert((std::is_same<C::const_pointer, const int*>::value), "");
+    static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #if __cplusplus >= 201103L
     {
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::key_type, int>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::value_type, int>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::key_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::value_compare, std::less<int> >::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::allocator_type, min_allocator<int> >::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::reference, int&>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::const_reference, const int&>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::pointer, min_pointer<int>>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::const_pointer, min_pointer<const int>>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::set<int, std::less<int>, min_allocator<int>>::difference_type, std::ptrdiff_t>::value), "");
+    typedef std::set<int, std::less<int>, min_allocator<int>> C;
+    static_assert((std::is_same<C::key_type, int>::value), "");
+    static_assert((std::is_same<C::value_type, int>::value), "");
+    static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::value_compare, std::less<int> >::value), "");
+    static_assert((std::is_same<C::allocator_type, min_allocator<int> >::value), "");
+    static_assert((std::is_same<C::reference, int&>::value), "");
+    static_assert((std::is_same<C::const_reference, const int&>::value), "");
+    static_assert((std::is_same<C::pointer, min_pointer<int>>::value), "");
+    static_assert((std::is_same<C::const_pointer, min_pointer<const int>>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+    static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
 }
diff --git a/test/containers/sequences/deque/deque.capacity/resize_size.pass.cpp b/test/containers/sequences/deque/deque.capacity/resize_size.pass.cpp
index 15f49df..8f732a0 100644
--- a/test/containers/sequences/deque/deque.capacity/resize_size.pass.cpp
+++ b/test/containers/sequences/deque/deque.capacity/resize_size.pass.cpp
@@ -43,7 +43,7 @@
 test(C& c1, int size)
 {
     typedef typename C::const_iterator CI;
-    std::size_t c1_osize = c1.size();
+    typename C::size_type c1_osize = c1.size();
     c1.resize(size);
     assert(c1.size() == size);
     assert(distance(c1.begin(), c1.end()) == c1.size());
diff --git a/test/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp b/test/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp
index 727b5d5..1d1522c 100644
--- a/test/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp
+++ b/test/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp
@@ -43,7 +43,7 @@
 test(C& c1, int size, int x)
 {
     typedef typename C::const_iterator CI;
-    std::size_t c1_osize = c1.size();
+    typename C::size_type c1_osize = c1.size();
     c1.resize(size, x);
     assert(c1.size() == size);
     assert(distance(c1.begin(), c1.end()) == c1.size());
diff --git a/test/containers/sequences/deque/types.pass.cpp b/test/containers/sequences/deque/types.pass.cpp
index d32b65c..da9470d 100644
--- a/test/containers/sequences/deque/types.pass.cpp
+++ b/test/containers/sequences/deque/types.pass.cpp
@@ -82,7 +82,8 @@
         static_assert((std::is_same<C::const_reference, const C::value_type&>::value), "");
         static_assert((std::is_same<C::pointer, min_pointer<C::value_type>>::value), "");
         static_assert((std::is_same<C::const_pointer, min_pointer<const C::value_type>>::value), "");
-        static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+        static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
         static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
diff --git a/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp
index a15e786..ae381e6 100644
--- a/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp
+++ b/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp
@@ -17,6 +17,17 @@
 
 #include "min_allocator.h"
 
+struct S {
+	S(int i) : i_(new int(i)) {}
+	S(const S &rhs) : i_(new int(*rhs.i_)) {}
+	S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
+	~S () { delete i_; i_ = NULL; }
+	bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
+	int get () const { return *i_; }
+	int *i_;
+	};
+
+
 int main()
 {
     {
@@ -66,6 +77,32 @@
         c1.remove(0);
         assert(c1 == c2);
     }
+    {  // LWG issue #526
+    typedef int T;
+    typedef std::forward_list<T> C;
+    int t1[] = {1, 2, 1, 3, 5, 8, 11};
+    int t2[] = {   2,    3, 5, 8, 11};
+    C c1(std::begin(t1), std::end(t1));
+    C c2(std::begin(t2), std::end(t2));
+    c1.remove(c1.front());
+    assert(c1 == c2);
+    }
+    {
+    typedef S T;
+    typedef std::forward_list<T> C;
+    int t1[] = {1, 2, 1, 3, 5, 8, 11, 1};
+    int t2[] = {   2,    3, 5, 8, 11   };
+    C c;
+    for(int *ip = std::end(t1); ip != std::begin(t1);)
+        c.push_front(S(*--ip));
+    c.remove(c.front());
+    C::const_iterator it = c.begin();
+    for(int *ip = std::begin(t2); ip != std::end(t2); ++ip, ++it) {
+	    assert ( it != c.end());
+        assert ( *ip == it->get());
+	    }
+	assert ( it == c.end ());
+    }
 #if __cplusplus >= 201103L
     {
         typedef int T;
diff --git a/test/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
index 4c4e80c..ed408fb 100644
--- a/test/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
+++ b/test/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
@@ -16,6 +16,8 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "counting_predicates.hpp"
+
 
 bool g(int i)
 {
@@ -26,98 +28,128 @@
 {
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T> C;
         const T t1[] = {0, 5, 5, 0, 0, 0, 5};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T> C;
         const T t1[] = {0, 0, 0, 0};
         C c1(std::begin(t1), std::end(t1));
         C c2;
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T> C;
         const T t1[] = {5, 5, 5};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T> C;
         C c1;
         C c2;
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == 0);
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T> C;
         const T t1[] = {5, 5, 5, 0};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
 #if __cplusplus >= 201103L
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T, min_allocator<T>> C;
         const T t1[] = {0, 5, 5, 0, 0, 0, 5};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T, min_allocator<T>> C;
         const T t1[] = {0, 0, 0, 0};
         C c1(std::begin(t1), std::end(t1));
         C c2;
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T, min_allocator<T>> C;
         const T t1[] = {5, 5, 5};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T, min_allocator<T>> C;
         C c1;
         C c2;
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == 0);
     }
     {
         typedef int T;
+        typedef unary_counting_predicate<bool(*)(T), T> Predicate;
         typedef std::forward_list<T, min_allocator<T>> C;
         const T t1[] = {5, 5, 5, 0};
         const T t2[] = {5, 5, 5};
         C c1(std::begin(t1), std::end(t1));
         C c2(std::begin(t2), std::end(t2));
-        c1.remove_if(g);
+        Predicate cp(g);
+        c1.remove_if(std::ref(cp));
         assert(c1 == c2);
+        assert(cp.count() == std::distance(std::begin(t1), std::end(t1)));
     }
 #endif
 }
diff --git a/test/containers/sequences/forwardlist/types.pass.cpp b/test/containers/sequences/forwardlist/types.pass.cpp
index 68cebf9..c955487 100644
--- a/test/containers/sequences/forwardlist/types.pass.cpp
+++ b/test/containers/sequences/forwardlist/types.pass.cpp
@@ -32,22 +32,29 @@
 
 int main()
 {
-    static_assert((std::is_same<std::forward_list<char>::value_type, char>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::allocator_type, std::allocator<char> >::value), "");
-    static_assert((std::is_same<std::forward_list<char>::reference, char&>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::const_reference, const char&>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::pointer, char*>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::const_pointer, const char*>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::forward_list<char>::difference_type, std::ptrdiff_t>::value), "");
+    {
+    typedef std::forward_list<char> C;
+    static_assert((std::is_same<C::value_type, char>::value), "");
+    static_assert((std::is_same<C::allocator_type, std::allocator<char> >::value), "");
+    static_assert((std::is_same<C::reference, char&>::value), "");
+    static_assert((std::is_same<C::const_reference, const char&>::value), "");
+    static_assert((std::is_same<C::pointer, char*>::value), "");
+    static_assert((std::is_same<C::const_pointer, const char*>::value), "");
+    static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
+    }
 #if __cplusplus >= 201103L
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::value_type, char>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::allocator_type, min_allocator<char> >::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::reference, char&>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::const_reference, const char&>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::pointer, min_pointer<char>>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::const_pointer, min_pointer<const char>>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::size_type, std::size_t>::value), "");
-    static_assert((std::is_same<std::forward_list<char, min_allocator<char>>::difference_type, std::ptrdiff_t>::value), "");
+    {
+    typedef std::forward_list<char, min_allocator<char>> C;
+    static_assert((std::is_same<C::value_type, char>::value), "");
+    static_assert((std::is_same<C::allocator_type, min_allocator<char> >::value), "");
+    static_assert((std::is_same<C::reference, char&>::value), "");
+    static_assert((std::is_same<C::const_reference, const char&>::value), "");
+    static_assert((std::is_same<C::pointer, min_pointer<char>>::value), "");
+    static_assert((std::is_same<C::const_pointer, min_pointer<const char>>::value), "");
+//  min_allocator doesn't have a size_type, so one gets synthesized
+    static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+    static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
+    }
 #endif
 }
diff --git a/test/containers/sequences/list/list.ops/remove.pass.cpp b/test/containers/sequences/list/list.ops/remove.pass.cpp
index 76d878d..106c052 100644
--- a/test/containers/sequences/list/list.ops/remove.pass.cpp
+++ b/test/containers/sequences/list/list.ops/remove.pass.cpp
@@ -16,6 +16,17 @@
 
 #include "min_allocator.h"
 
+struct S {
+	S(int i) : i_(new int(i)) {}
+	S(const S &rhs) : i_(new int(*rhs.i_)) {}
+	S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
+	~S () { delete i_; i_ = NULL; }
+	bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
+	int get () const { return *i_; }
+	int *i_;
+	};
+
+
 int main()
 {
     {
@@ -25,6 +36,27 @@
     c.remove(3);
     assert(c == std::list<int>(a2, a2+3));
     }
+    {  // LWG issue #526
+    int a1[] = {1, 2, 1, 3, 5, 8, 11};
+    int a2[] = {   2,    3, 5, 8, 11};
+    std::list<int> c(a1, a1+7);
+    c.remove(c.front());
+    assert(c == std::list<int>(a2, a2+5));
+    }
+    {
+    int a1[] = {1, 2, 1, 3, 5, 8, 11, 1};
+    int a2[] = {   2,    3, 5, 8, 11   };
+    std::list<S> c;
+    for(int *ip = a1; ip < a1+8; ++ip)
+        c.push_back(S(*ip));
+    c.remove(c.front());
+    std::list<S>::const_iterator it = c.begin();
+    for(int *ip = a2; ip < a2+5; ++ip, ++it) {
+	    assert ( it != c.end());
+        assert ( *ip == it->get());
+	    }
+	assert ( it == c.end ());
+    }
 #if __cplusplus >= 201103L
     {
     int a1[] = {1, 2, 3, 4};
diff --git a/test/containers/sequences/list/list.ops/remove_if.pass.cpp b/test/containers/sequences/list/list.ops/remove_if.pass.cpp
index b45562a..162919e 100644
--- a/test/containers/sequences/list/list.ops/remove_if.pass.cpp
+++ b/test/containers/sequences/list/list.ops/remove_if.pass.cpp
@@ -16,28 +16,49 @@
 #include <functional>
 
 #include "min_allocator.h"
+#include "counting_predicates.hpp"
+
+bool even(int i)
+{
+    return i % 2 == 0;
+}
 
 bool g(int i)
 {
     return i < 3;
 }
 
+typedef unary_counting_predicate<bool(*)(int), int> Predicate;
+
 int main()
 {
     {
     int a1[] = {1, 2, 3, 4};
     int a2[] = {3, 4};
     std::list<int> c(a1, a1+4);
-    c.remove_if(g);
+    Predicate cp(g);
+    c.remove_if(std::ref(cp));
     assert(c == std::list<int>(a2, a2+2));
+    assert(cp.count() == 4);
+    }
+    {
+    int a1[] = {1, 2, 3, 4};
+    int a2[] = {1, 3};
+    std::list<int> c(a1, a1+4);
+    Predicate cp(even);
+    c.remove_if(std::ref(cp));
+    assert(c == std::list<int>(a2, a2+2));
+    assert(cp.count() == 4);
     }
 #if __cplusplus >= 201103L
     {
     int a1[] = {1, 2, 3, 4};
     int a2[] = {3, 4};
     std::list<int, min_allocator<int>> c(a1, a1+4);
-    c.remove_if(g);
+    Predicate cp(g);
+    c.remove_if(std::ref(cp));
     assert((c == std::list<int, min_allocator<int>>(a2, a2+2)));
+    assert(cp.count() == 4);
     }
 #endif
 }
diff --git a/test/containers/sequences/vector.bool/find.pass.cpp b/test/containers/sequences/vector.bool/find.pass.cpp
index 8bad87e..75567a9 100644
--- a/test/containers/sequences/vector.bool/find.pass.cpp
+++ b/test/containers/sequences/vector.bool/find.pass.cpp
@@ -25,6 +25,7 @@
             std::vector<bool> b(i,true);
             std::vector<bool>::iterator j = std::find(b.begin()+1, b.end(), false);
             assert(j-b.begin() == i);
+            assert(b.end() == j);
         }
     }
     {
@@ -33,6 +34,7 @@
             std::vector<bool> b(i,false);
             std::vector<bool>::iterator j = std::find(b.begin()+1, b.end(), true);
             assert(j-b.begin() == i);
+            assert(b.end() == j);
         }
     }
 }
diff --git a/test/containers/sequences/vector/asan.pass.cpp b/test/containers/sequences/vector/asan.pass.cpp
new file mode 100644
index 0000000..86c02b2
--- /dev/null
+++ b/test/containers/sequences/vector/asan.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <vector>
+
+// reference operator[](size_type n);
+
+#include <vector>
+#include <cassert>
+#include <cstdlib>
+
+#include "min_allocator.h"
+#include "asan_testing.h"
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __asan_set_error_exit_code(int);
+
+int main()
+{
+#if __cplusplus >= 201103L
+    {
+        typedef int T;
+        typedef std::vector<T, min_allocator<T>> C;
+        const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+        C c(std::begin(t), std::end(t));
+        c.reserve(2*c.size());
+        T foo = c[c.size()];    // bad, but not caught by ASAN
+    }
+#endif
+    
+    __asan_set_error_exit_code(0);
+    {
+        typedef int T;
+        typedef std::vector<T> C;
+        const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+        C c(std::begin(t), std::end(t));
+        c.reserve(2*c.size());
+        assert(is_contiguous_container_asan_correct(c)); 
+        assert(!__sanitizer_verify_contiguous_container ( c.data(), c.data() + 1, c.data() + c.capacity()));
+        T foo = c[c.size()];    // should trigger ASAN
+        assert(false);          // if we got here, ASAN didn't trigger
+    }
+}
+#else
+int main () { return 0; }
+#endif
diff --git a/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp b/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
index a22c6da..21082c8 100644
--- a/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
@@ -15,29 +15,34 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v;
         assert(v.capacity() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
         assert(v.capacity() == 100);
         v.push_back(0);
         assert(v.capacity() > 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         assert(v.capacity() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
         assert(v.capacity() == 100);
         v.push_back(0);
         assert(v.capacity() > 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp b/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
index 2914af9..4df5702 100644
--- a/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,6 +23,7 @@
         std::vector<int> v;
         v.reserve(10);
         assert(v.capacity() >= 10);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
@@ -32,6 +34,7 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 250> > v(100);
@@ -42,12 +45,14 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(10);
         assert(v.capacity() >= 10);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
@@ -58,6 +63,7 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp b/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
index e415cee..a47c513 100644
--- a/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../stack_allocator.h"
 #include "../../../MoveOnly.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -25,18 +26,22 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> > v(100);
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #else  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
@@ -44,18 +49,22 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 300> > v(100);
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #if __cplusplus >= 201103L
@@ -64,9 +73,11 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp b/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
index 49f373a..de5126b 100644
--- a/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -27,6 +28,7 @@
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
         for (unsigned i = 0; i < 50; ++i)
             assert(v[i] == 0);
         for (unsigned i = 50; i < 200; ++i)
@@ -40,6 +42,7 @@
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -47,10 +50,12 @@
         v.resize(50, 1);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert((v == std::vector<int, min_allocator<int>>(50)));
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
         for (unsigned i = 0; i < 50; ++i)
             assert(v[i] == 0);
         for (unsigned i = 50; i < 200; ++i)
@@ -61,9 +66,11 @@
         v.resize(50, 1);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp b/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
index 6b0cce4..49ab9cc 100644
--- a/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
@@ -15,39 +15,48 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 401> > v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #ifndef _LIBCPP_NO_EXCEPTIONS
     {
         std::vector<int, stack_allocator<int, 400> > v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 200);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.capacity/swap.pass.cpp b/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
index 46d8403..f3d9289 100644
--- a/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
+++ b/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
@@ -15,27 +15,36 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v1(100);
         std::vector<int> v2(200);
+        assert(is_contiguous_container_asan_correct(v1)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         v1.swap(v2);
         assert(v1.size() == 200);
         assert(v1.capacity() == 200);
+        assert(is_contiguous_container_asan_correct(v1)); 
         assert(v2.size() == 100);
         assert(v2.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v1(100);
         std::vector<int, min_allocator<int>> v2(200);
+        assert(is_contiguous_container_asan_correct(v1)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         v1.swap(v2);
         assert(v1.size() == 200);
         assert(v1.capacity() == 200);
+        assert(is_contiguous_container_asan_correct(v1)); 
         assert(v2.size() == 100);
         assert(v2.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
index c0dafce..f5c06b1 100644
--- a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d;
     d.assign({3, 4, 5, 6});
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -33,6 +35,7 @@
     std::vector<int, min_allocator<int>> d;
     d.assign({3, 4, 5, 6});
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp b/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
index 1365038..d87ac86 100644
--- a/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -28,54 +29,72 @@
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(test_allocator<MoveOnly>(5));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(test_allocator<MoveOnly>(6));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(6));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2(other_allocator<MoveOnly>(6));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2(min_allocator<MoveOnly>{});
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
index 48c8cf8..75772be 100644
--- a/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
@@ -18,6 +18,7 @@
 #include "../../../NotConstructible.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -27,11 +28,13 @@
     assert(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c)); 
 #if __cplusplus >= 201103L
     C c1 = {};
     assert(c1.__invariants());
     assert(c1.empty());
     assert(c1.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c1)); 
 #endif
 }
 
@@ -43,6 +46,7 @@
     assert(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
diff --git a/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
index 8dde17f..36e231a 100644
--- a/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
@@ -17,6 +17,7 @@
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C, class Iterator>
 void
@@ -25,6 +26,7 @@
     C c(first, last);
     assert(c.__invariants());
     assert(c.size() == std::distance(first, last));
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
diff --git a/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
index 9edc10c..7fa748a 100644
--- a/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
@@ -18,6 +18,7 @@
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C, class Iterator, class A>
 void
@@ -26,6 +27,7 @@
     C c(first, last, a);
     assert(c.__invariants());
     assert(c.size() == std::distance(first, last));
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
diff --git a/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
index c6bbf6e..e033895 100644
--- a/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
@@ -17,6 +17,7 @@
 #include "DefaultOnly.h"
 #include "min_allocator.h"
 #include "test_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -27,6 +28,7 @@
     assert(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == a);
+    assert(is_contiguous_container_asan_correct(c)); 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
@@ -42,6 +44,7 @@
     assert(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c)); 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
diff --git a/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
index 6a52d52..5b6c498 100644
--- a/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
@@ -16,6 +16,7 @@
 
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -24,6 +25,7 @@
     C c(n, x);
     assert(c.__invariants());
     assert(c.size() == n);
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
diff --git a/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
index 5653521..c62b841 100644
--- a/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -24,6 +25,7 @@
     assert(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
diff --git a/test/containers/sequences/vector/vector.cons/copy.pass.cpp b/test/containers/sequences/vector/vector.cons/copy.pass.cpp
index 6962f70..677963d 100644
--- a/test/containers/sequences/vector/vector.cons/copy.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/copy.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -25,6 +26,7 @@
     assert(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
@@ -37,15 +39,23 @@
     {
         std::vector<int, test_allocator<int> > v(3, 2, test_allocator<int>(5));
         std::vector<int, test_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == v.get_allocator());
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
     {
         std::vector<int, other_allocator<int> > v(3, 2, other_allocator<int>(5));
         std::vector<int, other_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == other_allocator<int>(-2));
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #if __cplusplus >= 201103L
@@ -57,8 +67,12 @@
     {
         std::vector<int, min_allocator<int> > v(3, 2, min_allocator<int>());
         std::vector<int, min_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == v.get_allocator());
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
index 7ff2a1e..128328c 100644
--- a/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -25,6 +26,7 @@
     assert(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
diff --git a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
index f231fcf..7eb834f 100644
--- a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -21,6 +22,7 @@
     {
     std::vector<int> d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -30,6 +32,7 @@
     {
     std::vector<int, min_allocator<int>> d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
index b57d2ed..5d7ae88 100644
--- a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
@@ -16,6 +16,7 @@
 
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,6 +25,7 @@
     std::vector<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
     assert(d.get_allocator() == test_allocator<int>(3));
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -34,6 +36,7 @@
     std::vector<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
     assert(d.get_allocator() == min_allocator<int>());
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/test/containers/sequences/vector/vector.cons/move.pass.cpp b/test/containers/sequences/vector/vector.cons/move.pass.cpp
index f09e346..bb61d54 100644
--- a/test/containers/sequences/vector/vector.cons/move.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/move.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,58 +24,79 @@
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
         std::vector<int>::const_iterator i = c1.begin();
         std::vector<int> c2 = std::move(c1);
+        assert(is_contiguous_container_asan_correct(c2)); 
         std::vector<int>::iterator j = c2.erase(i);
         assert(*j == 3);
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
         std::vector<int, min_allocator<int>>::const_iterator i = c1.begin();
         std::vector<int, min_allocator<int>> c2 = std::move(c1);
+        assert(is_contiguous_container_asan_correct(c2)); 
         std::vector<int, min_allocator<int>>::iterator j = c2.erase(i);
         assert(*j == 3);
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
index 0aac64d..1923e68 100644
--- a/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,55 +24,75 @@
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(std::move(l), test_allocator<MoveOnly>(6));
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(6));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(std::move(l), test_allocator<MoveOnly>(5));
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2(std::move(l), other_allocator<MoveOnly>(4));
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == other_allocator<MoveOnly>(4));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2(std::move(l), min_allocator<MoveOnly>());
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == min_allocator<MoveOnly>());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
index 13ec845..592b714 100644
--- a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
+++ b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d;
     d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -33,6 +35,7 @@
     std::vector<int, min_allocator<int>> d;
     d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/test/containers/sequences/vector/vector.data/data.pass.cpp b/test/containers/sequences/vector/vector.data/data.pass.cpp
index 4bda599..aed56bc 100644
--- a/test/containers/sequences/vector/vector.data/data.pass.cpp
+++ b/test/containers/sequences/vector/vector.data/data.pass.cpp
@@ -15,25 +15,30 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.data/data_const.pass.cpp b/test/containers/sequences/vector/vector.data/data_const.pass.cpp
index 7cb64f8..cb60626 100644
--- a/test/containers/sequences/vector/vector.data/data_const.pass.cpp
+++ b/test/containers/sequences/vector/vector.data/data_const.pass.cpp
@@ -15,25 +15,30 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         const std::vector<int> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         const std::vector<int> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         const std::vector<int, min_allocator<int>> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         const std::vector<int, min_allocator<int>> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp b/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
index 37298a5..8af6bda 100644
--- a/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
@@ -66,6 +67,7 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cend(), 3, 4.5);
         assert(i == c.end()-1);
         assert(c.size() == 2);
@@ -73,6 +75,7 @@
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cbegin()+1, 4, 6.5);
         assert(i == c.begin()+1);
         assert(c.size() == 3);
@@ -82,6 +85,7 @@
         assert(c[1].getd() == 6.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
     {
         std::vector<A, stack_allocator<A, 7> > c;
@@ -90,6 +94,7 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cend(), 3, 4.5);
         assert(i == c.end()-1);
         assert(c.size() == 2);
@@ -97,6 +102,7 @@
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cbegin()+1, 4, 6.5);
         assert(i == c.begin()+1);
         assert(c.size() == 3);
@@ -106,6 +112,7 @@
         assert(c[1].getd() == 6.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #if _LIBCPP_DEBUG >= 1
     {
diff --git a/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp b/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
index a399433..bbf91a4 100644
--- a/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
@@ -61,12 +62,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
     {
         std::vector<A, stack_allocator<A, 4> > c;
@@ -74,12 +77,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -88,12 +93,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp b/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
index 04ff228..85a4707 100644
--- a/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,31 +23,39 @@
     {
         std::vector<int> v;
         v.reserve(3);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v;
         v.reserve(4);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(3);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(4);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
diff --git a/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp b/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
index fb9d808..7a850ed 100644
--- a/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,6 +23,7 @@
     int a1[] = {1, 2, 3};
     std::vector<int> l1(a1, a1+3);
     std::vector<int>::const_iterator i = l1.begin();
+    assert(is_contiguous_container_asan_correct(l1)); 
     ++i;
     std::vector<int>::iterator j = l1.erase(i);
     assert(l1.size() == 2);
@@ -29,21 +31,25 @@
     assert(*j == 3);
     assert(*l1.begin() == 1);
     assert(*next(l1.begin()) == 3);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(j);
     assert(j == l1.end());
     assert(l1.size() == 1);
     assert(distance(l1.begin(), l1.end()) == 1);
     assert(*l1.begin() == 1);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(l1.begin());
     assert(j == l1.end());
     assert(l1.size() == 0);
     assert(distance(l1.begin(), l1.end()) == 0);
+    assert(is_contiguous_container_asan_correct(l1)); 
     }
 #if __cplusplus >= 201103L
     {
     int a1[] = {1, 2, 3};
     std::vector<int, min_allocator<int>> l1(a1, a1+3);
     std::vector<int, min_allocator<int>>::const_iterator i = l1.begin();
+    assert(is_contiguous_container_asan_correct(l1)); 
     ++i;
     std::vector<int, min_allocator<int>>::iterator j = l1.erase(i);
     assert(l1.size() == 2);
@@ -51,15 +57,18 @@
     assert(*j == 3);
     assert(*l1.begin() == 1);
     assert(*next(l1.begin()) == 3);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(j);
     assert(j == l1.end());
     assert(l1.size() == 1);
     assert(distance(l1.begin(), l1.end()) == 1);
     assert(*l1.begin() == 1);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(l1.begin());
     assert(j == l1.end());
     assert(l1.size() == 0);
     assert(distance(l1.begin(), l1.end()) == 0);
+    assert(is_contiguous_container_asan_correct(l1)); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
index e82d3a0..bfc18bc 100644
--- a/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
@@ -15,84 +15,113 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     int a1[] = {1, 2, 3};
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), l1.cbegin());
         assert(l1.size() == 3);
         assert(distance(l1.cbegin(), l1.cend()) == 3);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin()));
         assert(l1.size() == 2);
         assert(distance(l1.cbegin(), l1.cend()) == 2);
         assert(i == l1.begin());
         assert(l1 == std::vector<int>(a1+1, a1+3));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2));
         assert(l1.size() == 1);
         assert(distance(l1.cbegin(), l1.cend()) == 1);
         assert(i == l1.begin());
         assert(l1 == std::vector<int>(a1+2, a1+3));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3));
         assert(l1.size() == 0);
         assert(distance(l1.cbegin(), l1.cend()) == 0);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<std::vector<int> > outer(2, std::vector<int>(1));
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
         outer.erase(outer.begin(), outer.begin());
         assert(outer.size() == 2);
         assert(outer[0].size() == 1);
         assert(outer[1].size() == 1);
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), l1.cbegin());
         assert(l1.size() == 3);
         assert(distance(l1.cbegin(), l1.cend()) == 3);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin()));
         assert(l1.size() == 2);
         assert(distance(l1.cbegin(), l1.cend()) == 2);
         assert(i == l1.begin());
         assert((l1 == std::vector<int, min_allocator<int>>(a1+1, a1+3)));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2));
         assert(l1.size() == 1);
         assert(distance(l1.cbegin(), l1.cend()) == 1);
         assert(i == l1.begin());
         assert((l1 == std::vector<int, min_allocator<int>>(a1+2, a1+3)));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3));
         assert(l1.size() == 0);
         assert(distance(l1.cbegin(), l1.cend()) == 0);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<std::vector<int, min_allocator<int>>, min_allocator<std::vector<int, min_allocator<int>>>> outer(2, std::vector<int, min_allocator<int>>(1));
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
         outer.erase(outer.begin(), outer.begin());
         assert(outer.size() == 2);
         assert(outer[0].size() == 1);
         assert(outer[1].size() == 1);
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
     }
 #endif
 }
diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
index 386a4f6..30b8017 100644
--- a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d(10, 1);
     std::vector<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
     assert(d.size() == 14);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(i == d.begin() + 2);
     assert(d[0] == 1);
     assert(d[1] == 1);
@@ -44,6 +46,7 @@
     std::vector<int, min_allocator<int>> d(10, 1);
     std::vector<int, min_allocator<int>>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
     assert(d.size() == 14);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(i == d.begin() + 2);
     assert(d[0] == 1);
     assert(d[1] == 1);
diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
index 97255b0..cf24a87 100644
--- a/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
@@ -21,6 +21,7 @@
 #include "../../../stack_allocator.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -31,6 +32,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -47,6 +49,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -63,6 +66,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -79,6 +83,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -107,6 +112,7 @@
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -123,6 +129,7 @@
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
index 7ceb933..cf3715c 100644
--- a/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
@@ -20,6 +20,7 @@
 #include "../../../stack_allocator.h"
 #include "../../../MoveOnly.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -28,6 +29,7 @@
         std::vector<MoveOnly> v(100);
         std::vector<MoveOnly>::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -40,6 +42,7 @@
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> > v(100);
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> >::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -61,6 +64,7 @@
         std::vector<MoveOnly, min_allocator<MoveOnly>> v(100);
         std::vector<MoveOnly, min_allocator<MoveOnly>>::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
index 322c9ff..42effc7 100644
--- a/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -26,6 +27,7 @@
         std::vector<int> v(100);
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -39,6 +41,7 @@
         std::vector<int, stack_allocator<int, 300> > v(100);
         std::vector<int, stack_allocator<int, 300> >::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -61,6 +64,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -74,6 +78,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
index 28c7718..feb74c0 100644
--- a/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -26,6 +27,7 @@
         std::vector<int> v(100);
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -38,6 +40,7 @@
         std::vector<int, stack_allocator<int, 300> > v(100);
         std::vector<int, stack_allocator<int, 300> >::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -60,6 +63,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp b/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
index 5446b74..eeeba62 100644
--- a/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,22 +23,27 @@
         std::vector<int> c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
@@ -45,22 +51,27 @@
         std::vector<int, stack_allocator<int, 15> > c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
@@ -69,22 +80,27 @@
         std::vector<int, min_allocator<int>> c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
diff --git a/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp b/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
index f232743..6615a25 100644
--- a/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
@@ -14,6 +14,8 @@
 #include <vector>
 #include <cassert>
 
+#include "asan_testing.h"
+
 // Flag that makes the copy constructor for CMyClass throw an exception
 static bool gCopyConstructorShouldThow = false;
 
@@ -70,6 +72,8 @@
 
     vec.push_back(instance);
     std::vector<CMyClass> vec2(vec);
+    assert(is_contiguous_container_asan_correct(vec)); 
+    assert(is_contiguous_container_asan_correct(vec2)); 
 
     gCopyConstructorShouldThow = true;
     try {
@@ -77,5 +81,6 @@
     }
     catch (...) {
         assert(vec==vec2);
+        assert(is_contiguous_container_asan_correct(vec)); 
     }
 }
diff --git a/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp b/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
index bb1af29..be48893 100644
--- a/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
+++ b/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,22 +25,27 @@
         std::vector<MoveOnly> c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
@@ -47,22 +53,27 @@
         std::vector<MoveOnly, stack_allocator<MoveOnly, 15> > c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
@@ -71,22 +82,27 @@
         std::vector<MoveOnly, min_allocator<MoveOnly>> c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
diff --git a/test/containers/sequences/vector/vector.special/swap.pass.cpp b/test/containers/sequences/vector/vector.special/swap.pass.cpp
index a7d0c40..27001ae 100644
--- a/test/containers/sequences/vector/vector.special/swap.pass.cpp
+++ b/test/containers/sequences/vector/vector.special/swap.pass.cpp
@@ -16,6 +16,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,40 +25,56 @@
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1 == std::vector<int>(a2, a2+sizeof(a2)/sizeof(a2[0])));
         assert(c2 == std::vector<int>(a1, a1+sizeof(a1)/sizeof(a1[0])));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1);
         std::vector<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1 == std::vector<int>(a2, a2+sizeof(a2)/sizeof(a2[0])));
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2 == std::vector<int>(a1, a1+sizeof(a1)/sizeof(a1[0])));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1);
         std::vector<int> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #ifndef _LIBCPP_DEBUG_LEVEL
 // This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
@@ -80,11 +97,15 @@
         typedef other_allocator<int> A;
         std::vector<int, A> c1(a1, a1+sizeof(a1)/sizeof(a1[0]), A(1));
         std::vector<int, A> c2(a2, a2+sizeof(a2)/sizeof(a2[0]), A(2));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, A>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c1.get_allocator() == A(2));
         assert((c2 == std::vector<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
         assert(c2.get_allocator() == A(1));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -92,40 +113,56 @@
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int, min_allocator<int>> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, min_allocator<int>>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert((c2 == std::vector<int, min_allocator<int>>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1);
         std::vector<int, min_allocator<int>> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, min_allocator<int>>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int, min_allocator<int>> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert((c2 == std::vector<int, min_allocator<int>>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1);
         std::vector<int, min_allocator<int>> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #ifndef _LIBCPP_DEBUG_LEVEL
 // This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
@@ -135,11 +172,15 @@
         typedef min_allocator<int> A;
         std::vector<int, A> c1(a1, a1+sizeof(a1)/sizeof(a1[0]), A());
         std::vector<int, A> c2(a2, a2+sizeof(a2)/sizeof(a2[0]), A());
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, A>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c1.get_allocator() == A());
         assert((c2 == std::vector<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
         assert(c2.get_allocator() == A());
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #endif
 #endif
diff --git a/test/containers/unord/unord.map/bucket_count.pass.cpp b/test/containers/unord/unord.map/bucket_count.pass.cpp
index 9b8b4ab..d3e80d8 100644
--- a/test/containers/unord/unord.map/bucket_count.pass.cpp
+++ b/test/containers/unord/unord.map/bucket_count.pass.cpp
@@ -39,7 +39,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -67,7 +67,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/count.pass.cpp b/test/containers/unord/unord.map/count.pass.cpp
index ebacf2b..50abb53 100644
--- a/test/containers/unord/unord.map/count.pass.cpp
+++ b/test/containers/unord/unord.map/count.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -51,7 +51,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/eq.pass.cpp b/test/containers/unord/unord.map/eq.pass.cpp
index 17184e6..9258378 100644
--- a/test/containers/unord/unord.map/eq.pass.cpp
+++ b/test/containers/unord/unord.map/eq.pass.cpp
@@ -35,7 +35,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -73,7 +73,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -101,7 +101,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -121,7 +121,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -141,7 +141,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/equal_range_const.pass.cpp b/test/containers/unord/unord.map/equal_range_const.pass.cpp
index d61c2e2..fe166c9 100644
--- a/test/containers/unord/unord.map/equal_range_const.pass.cpp
+++ b/test/containers/unord/unord.map/equal_range_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/equal_range_non_const.pass.cpp b/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
index 508205a..9e8d1a9 100644
--- a/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
+++ b/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/find_const.pass.cpp b/test/containers/unord/unord.map/find_const.pass.cpp
index ee897d9..120efa3 100644
--- a/test/containers/unord/unord.map/find_const.pass.cpp
+++ b/test/containers/unord/unord.map/find_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/find_non_const.pass.cpp b/test/containers/unord/unord.map/find_non_const.pass.cpp
index efab12b..7582a79 100644
--- a/test/containers/unord/unord.map/find_non_const.pass.cpp
+++ b/test/containers/unord/unord.map/find_non_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/load_factor.pass.cpp b/test/containers/unord/unord.map/load_factor.pass.cpp
index 3b12480..472e41a 100644
--- a/test/containers/unord/unord.map/load_factor.pass.cpp
+++ b/test/containers/unord/unord.map/load_factor.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.map/swap_member.pass.cpp b/test/containers/unord/unord.map/swap_member.pass.cpp
index 6e6503e..8ab1eb6 100644
--- a/test/containers/unord/unord.map/swap_member.pass.cpp
+++ b/test/containers/unord/unord.map/swap_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -165,7 +165,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -181,7 +181,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -247,7 +247,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -263,7 +263,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -346,7 +346,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -362,7 +362,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -428,7 +428,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -444,7 +444,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -527,7 +527,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -543,7 +543,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
diff --git a/test/containers/unord/unord.map/types.pass.cpp b/test/containers/unord/unord.map/types.pass.cpp
index 2f3eab1..b53ff8e 100644
--- a/test/containers/unord/unord.map/types.pass.cpp
+++ b/test/containers/unord/unord.map/types.pass.cpp
@@ -64,7 +64,8 @@
         static_assert((std::is_same<C::const_reference, const C::value_type&>::value), "");
         static_assert((std::is_same<C::pointer, min_pointer<C::value_type>>::value), "");
         static_assert((std::is_same<C::const_pointer, min_pointer<const C::value_type>>::value), "");
-        static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    //  min_allocator doesn't have a size_type, so one gets synthesized
+        static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
         static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
diff --git a/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp b/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
index 6993a7e..7e04b8d 100644
--- a/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
+++ b/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -165,7 +165,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -181,7 +181,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -247,7 +247,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -263,7 +263,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -346,7 +346,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -362,7 +362,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -428,7 +428,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -444,7 +444,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -527,7 +527,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -543,7 +543,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
diff --git a/test/containers/unord/unord.multimap/bucket_count.pass.cpp b/test/containers/unord/unord.multimap/bucket_count.pass.cpp
index 66d84e9..d44412f 100644
--- a/test/containers/unord/unord.multimap/bucket_count.pass.cpp
+++ b/test/containers/unord/unord.multimap/bucket_count.pass.cpp
@@ -37,7 +37,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.multimap/count.pass.cpp b/test/containers/unord/unord.multimap/count.pass.cpp
index 66ac28c..efaf02e 100644
--- a/test/containers/unord/unord.multimap/count.pass.cpp
+++ b/test/containers/unord/unord.multimap/count.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/test/containers/unord/unord.multimap/eq.pass.cpp b/test/containers/unord/unord.multimap/eq.pass.cpp
index 3e6eaf6..3604e77 100644
--- a/test/containers/unord/unord.multimap/eq.pass.cpp
+++ b/test/containers/unord/unord.multimap/eq.pass.cpp
@@ -36,7 +36,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -58,7 +58,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -80,7 +80,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -111,7 +111,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -134,7 +134,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -157,7 +157,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
diff --git a/test/containers/unord/unord.multimap/equal_range_const.pass.cpp b/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
index 11116e9..67613b0 100644
--- a/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
+++ b/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -68,7 +68,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp b/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
index 98d6862..eb4c019 100644
--- a/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
+++ b/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -68,7 +68,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/test/containers/unord/unord.multimap/find_const.pass.cpp b/test/containers/unord/unord.multimap/find_const.pass.cpp
index 0d9ccaa..bc2650d 100644
--- a/test/containers/unord/unord.multimap/find_const.pass.cpp
+++ b/test/containers/unord/unord.multimap/find_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.multimap/find_non_const.pass.cpp b/test/containers/unord/unord.multimap/find_non_const.pass.cpp
index fd623d9..5a128c0 100644
--- a/test/containers/unord/unord.multimap/find_non_const.pass.cpp
+++ b/test/containers/unord/unord.multimap/find_non_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.multimap/load_factor.pass.cpp b/test/containers/unord/unord.multimap/load_factor.pass.cpp
index 0d25ef5..f407097 100644
--- a/test/containers/unord/unord.multimap/load_factor.pass.cpp
+++ b/test/containers/unord/unord.multimap/load_factor.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/test/containers/unord/unord.multimap/swap_member.pass.cpp b/test/containers/unord/unord.multimap/swap_member.pass.cpp
index 12822a9..225eccd 100644
--- a/test/containers/unord/unord.multimap/swap_member.pass.cpp
+++ b/test/containers/unord/unord.multimap/swap_member.pass.cpp
@@ -67,7 +67,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -83,7 +83,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -168,7 +168,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -184,7 +184,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -252,7 +252,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -268,7 +268,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -353,7 +353,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -369,7 +369,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -437,7 +437,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -453,7 +453,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -538,7 +538,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -554,7 +554,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
diff --git a/test/containers/unord/unord.multimap/types.pass.cpp b/test/containers/unord/unord.multimap/types.pass.cpp
index 5235415..55ae749 100644
--- a/test/containers/unord/unord.multimap/types.pass.cpp
+++ b/test/containers/unord/unord.multimap/types.pass.cpp
@@ -64,7 +64,8 @@
         static_assert((std::is_same<C::const_reference, const C::value_type&>::value), "");
         static_assert((std::is_same<C::pointer, min_pointer<C::value_type>>::value), "");
         static_assert((std::is_same<C::const_pointer, min_pointer<const C::value_type>>::value), "");
-        static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    //  min_allocator doesn't have a size_type, so one gets synthesized
+        static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
         static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
diff --git a/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
index a73d7fc..0f579e0 100644
--- a/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
+++ b/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -167,7 +167,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -183,7 +183,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -251,7 +251,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -267,7 +267,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -352,7 +352,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -368,7 +368,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -436,7 +436,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -452,7 +452,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -537,7 +537,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -553,7 +553,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
diff --git a/test/containers/unord/unord.multiset/types.pass.cpp b/test/containers/unord/unord.multiset/types.pass.cpp
index 82b403d..5222222 100644
--- a/test/containers/unord/unord.multiset/types.pass.cpp
+++ b/test/containers/unord/unord.multiset/types.pass.cpp
@@ -61,7 +61,8 @@
         static_assert((std::is_same<C::const_reference, const C::value_type&>::value), "");
         static_assert((std::is_same<C::pointer, min_pointer<C::value_type>>::value), "");
         static_assert((std::is_same<C::const_pointer, min_pointer<const C::value_type>>::value), "");
-        static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    //  min_allocator doesn't have a size_type, so one gets synthesized
+        static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
         static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
diff --git a/test/containers/unord/unord.set/types.pass.cpp b/test/containers/unord/unord.set/types.pass.cpp
index be0b359..7e752a4 100644
--- a/test/containers/unord/unord.set/types.pass.cpp
+++ b/test/containers/unord/unord.set/types.pass.cpp
@@ -61,7 +61,8 @@
         static_assert((std::is_same<C::const_reference, const C::value_type&>::value), "");
         static_assert((std::is_same<C::pointer, min_pointer<C::value_type>>::value), "");
         static_assert((std::is_same<C::const_pointer, min_pointer<const C::value_type>>::value), "");
-        static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+    //  min_allocator doesn't have a size_type, so one gets synthesized
+        static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
         static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
     }
 #endif
diff --git a/test/depr/depr.c.headers/math_h.pass.cpp b/test/depr/depr.c.headers/math_h.pass.cpp
index 858e190..b03a61b 100644
--- a/test/depr/depr.c.headers/math_h.pass.cpp
+++ b/test/depr/depr.c.headers/math_h.pass.cpp
@@ -9,6 +9,8 @@
 
 // <math.h>
 
+// XFAIL: linux
+
 #include <math.h>
 #include <type_traits>
 #include <cassert>
diff --git a/test/depr/depr.c.headers/stdio_h.pass.cpp b/test/depr/depr.c.headers/stdio_h.pass.cpp
index 8e236e3..d4cfbc8 100644
--- a/test/depr/depr.c.headers/stdio_h.pass.cpp
+++ b/test/depr/depr.c.headers/stdio_h.pass.cpp
@@ -117,7 +117,9 @@
     static_assert((std::is_same<decltype(fputs("",fp)), int>::value), "");
     static_assert((std::is_same<decltype(getc(fp)), int>::value), "");
     static_assert((std::is_same<decltype(getchar()), int>::value), "");
+#if _LIBCPP_STD_VER < 14
     static_assert((std::is_same<decltype(gets(cp)), char*>::value), "");
+#endif
     static_assert((std::is_same<decltype(putc(0,fp)), int>::value), "");
     static_assert((std::is_same<decltype(putchar(0)), int>::value), "");
     static_assert((std::is_same<decltype(puts("")), int>::value), "");
diff --git a/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
index 01a5656..eb15fac 100644
--- a/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
+++ b/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
@@ -19,23 +19,6 @@
 #include <fstream>
 #include <cassert>
 
-template <class CharT>
-struct test_buf
-    : public std::basic_filebuf<CharT>
-{
-    typedef std::basic_filebuf<CharT> base;
-    typedef typename base::char_type  char_type;
-    typedef typename base::int_type   int_type;
-    typedef typename base::pos_type   pos_type;
-
-    char_type* eback() const {return base::eback();}
-    char_type* gptr()  const {return base::gptr();}
-    char_type* egptr() const {return base::egptr();}
-    void gbump(int n) {base::gbump(n);}
-
-    virtual int_type underflow() {return base::underflow();}
-};
-
 int main()
 {
     {
diff --git a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
index 18c8b86..17ff642 100644
--- a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
+++ b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <iomanip>
 
 // template <class charT> T9 get_time(struct tm* tmb, const charT* fmt);
@@ -46,7 +43,7 @@
         std::istream is(&sb);
         is.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
-        is >> std::get_time(&t, "%c");
+        is >> std::get_time(&t, "%a %b %d %H:%M:%S %Y");
         assert(t.tm_sec == 59);
         assert(t.tm_min == 55);
         assert(t.tm_hour == 23);
@@ -62,7 +59,7 @@
         std::wistream is(&sb);
         is.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
-        is >> std::get_time(&t, L"%c");
+        is >> std::get_time(&t, L"%a %b %d %H:%M:%S %Y");
         assert(t.tm_sec == 59);
         assert(t.tm_min == 55);
         assert(t.tm_hour == 23);
diff --git a/test/input.output/iostream.format/ext.manip/put_time.pass.cpp b/test/input.output/iostream.format/ext.manip/put_time.pass.cpp
index d64ca07..52a98a1 100644
--- a/test/input.output/iostream.format/ext.manip/put_time.pass.cpp
+++ b/test/input.output/iostream.format/ext.manip/put_time.pass.cpp
@@ -62,7 +62,8 @@
         t.tm_mon = 11;
         t.tm_year = 161;
         t.tm_wday = 6;
-        os << std::put_time(&t, "%c");
+        t.tm_isdst = 0;
+        os << std::put_time(&t, "%a %b %d %H:%M:%S %Y");
         assert(sb.str() == "Sat Dec 31 23:55:59 2061");
     }
     {
@@ -77,7 +78,7 @@
         t.tm_mon = 11;
         t.tm_year = 161;
         t.tm_wday = 6;
-        os << std::put_time(&t, L"%c");
+        os << std::put_time(&t, L"%a %b %d %H:%M:%S %Y");
         assert(sb.str() == L"Sat Dec 31 23:55:59 2061");
     }
 }
diff --git a/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp b/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
index d1fd89b..3c8159a 100644
--- a/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
@@ -56,4 +56,24 @@
         assert(is.good());
         assert(is.peek() == L'1');
     }
+    {
+        testbuf<char> sb("  ");
+        std::istream is(&sb);
+        ws(is);
+        assert(!is.fail());
+        assert(is.eof());
+        ws(is);
+        assert(is.eof());
+        assert(is.fail());
+    }
+    {
+        testbuf<wchar_t> sb(L"  ");
+        std::wistream is(&sb);
+        ws(is);
+        assert(!is.fail());
+        assert(is.eof());
+        ws(is);
+        assert(is.eof());
+        assert(is.fail());
+    }
 }
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
index 3d4df9c..41a721d 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
index d060ccc..cf06e34 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
index 545f94d..ccc3545 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
index 636cf07..20e70cf 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
index 60f816d..01eecb5 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp b/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
index 59f381c..61db67c 100644
--- a/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
+++ b/test/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
@@ -53,12 +53,12 @@
         testbuf<char> sb(" 123456789");
         std::istream is(&sb);
         assert(is.sync() == 0);
-        assert(sync_called = 1);
+        assert(sync_called == 1);
     }
     {
         testbuf<wchar_t> sb(L" 123456789");
         std::wistream is(&sb);
         assert(is.sync() == 0);
-        assert(sync_called = 2);
+        assert(sync_called == 2);
     }
 }
diff --git a/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp b/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
index 3b2e156..c46e2c0 100644
--- a/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
+++ b/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 
diff --git a/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp b/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
index 9fa4476..509b836 100644
--- a/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
+++ b/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.fr_FR.UTF-8
 
 // <ios>
diff --git a/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp b/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
index e19e188..e44f4b3 100644
--- a/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
+++ b/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 
diff --git a/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp b/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
index 5df52d4..deb2dc7 100644
--- a/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
+++ b/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 
diff --git a/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp b/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
index fadc015..6a60996 100644
--- a/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
+++ b/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
@@ -26,24 +26,24 @@
 int main()
 {
     test<bool, false>();
-    test<char, true>();
-    test<signed char, true>();
+//    test<char, false>(); // don't know
+    test<signed char, false>();
     test<unsigned char, true>();
-    test<wchar_t, true>();
+//    test<wchar_t, false>(); // don't know
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
     test<char16_t, true>();
     test<char32_t, true>();
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
-    test<short, true>();
+    test<short, false>();
     test<unsigned short, true>();
-    test<int, true>();
+    test<int, false>();
     test<unsigned int, true>();
-    test<long, true>();
+    test<long, false>();
     test<unsigned long, true>();
-    test<long long, true>();
+    test<long long, false>();
     test<unsigned long long, true>();
 #ifndef _LIBCPP_HAS_NO_INT128
-    test<__int128_t, true>();
+    test<__int128_t, false>();
     test<__uint128_t, true>();
 #endif
     test<float, false>();
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 5343eda..3362d99 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -1,11 +1,12 @@
 @AUTO_GEN_COMMENT@
 config.cxx_under_test        = "@LIBCXX_COMPILER@"
-config.cxx_has_stdcxx0x_flag = @LIBCXX_HAS_STDCXX0X_FLAG@
+config.std                   = "@LIBCXX_STD_VERSION@"
 config.libcxx_src_root       = "@LIBCXX_SOURCE_DIR@"
 config.libcxx_obj_root       = "@LIBCXX_BINARY_DIR@"
 config.python_executable     = "@PYTHON_EXECUTABLE@"
 config.enable_shared         = @LIBCXX_ENABLE_SHARED@
-config.cxx_abi               = "@LIBCXX_CXX_ABI@"
+config.cxx_abi               = "@LIBCXX_CXX_ABI_LIBNAME@"
+config.llvm_use_sanitizer    = "@LLVM_USE_SANITIZER@"
 
 # Let the main config do the real work.
 lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")
diff --git a/test/localization/locale.categories/__scan_keyword.pass.cpp b/test/localization/locale.categories/__scan_keyword.pass.cpp
index 6f75fbb..b33aab9 100644
--- a/test/localization/locale.categories/__scan_keyword.pass.cpp
+++ b/test/localization/locale.categories/__scan_keyword.pass.cpp
@@ -22,7 +22,7 @@
 //  no keyword match is found.  If no keyword match is found, __ke is returned.
 //  Else an iterator pointing to the matching keyword is found.  If more than
 //  one keyword matches, an iterator to the first matching keyword is returned.
-//  If on exit __b == __e, eofbit is set in __err.  If __case_senstive is false,
+//  If on exit __b == __e, eofbit is set in __err.  If __case_sensitive is false,
 //  __ct is used to force to lower case before comparing characters.
 //  Examples:
 //  Keywords:  "a", "abb"
diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
index 93408a8..6d9e1cd 100644
--- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
@@ -19,7 +19,7 @@
 
 unsigned delete_called = 0;
 
-void* operator new[](size_t sz)
+void* operator new[](size_t sz) throw(std::bad_alloc)
 {
     return operator new(sz);
 }
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
index 43c131b..91da9f7 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// Bionic's wchar_t ctype functions are only valid for the ASCII range.
 // XFAIL: android
 // XFAIL: androideabi
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
index 61fb0b0..cc64719 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// Bionic's wchar_t ctype functions are only valid for the ASCII range.
 // XFAIL: android
 // XFAIL: androideabi
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
index a730445..904ced3 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
@@ -7,10 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
-// REQUIRES: locale.fr_CA.UTF-8
+// REQUIRES: locale.fr_CA.ISO8859-1
 
 // <locale>
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
index 6b7f385..6f25b9c 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
@@ -7,10 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
-// REQUIRES: locale.fr_CA.UTF-8
+// REQUIRES: locale.fr_CA.ISO8859-1
 
 // <locale>
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
index b2e3e7a..5a26dc6 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// Bionic's wchar_t ctype functions are only valid for the ASCII range.
 // XFAIL: android
 // XFAIL: androideabi
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
index 29b494c..bc07fcf 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// Bionic's wchar_t ctype functions are only valid for the ASCII range.
 // XFAIL: android
 // XFAIL: androideabi
 
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
index 0923093..f957149 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,7 @@
 
 // XFAIL: with_system_lib=x86_64-apple-darwin11
 // XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: linux
 
 #include <locale>
 #include <cassert>
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
index 2bc7f67..9579f4d 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,7 @@
 
 // XFAIL: with_system_lib=x86_64-apple-darwin11
 // XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: linux
 
 #include <locale>
 #include <string>
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
index 73df7ab..9b09e81 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,7 @@
 
 // XFAIL: with_system_lib=x86_64-apple-darwin11
 // XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: linux
 
 #include <locale>
 #include <cassert>
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
index 51fbb04..87e9b97 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,7 @@
 
 // XFAIL: with_system_lib=x86_64-apple-darwin11
 // XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: linux
 
 #include <locale>
 #include <string>
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
index 8d4c852..320e08d 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,8 @@
 
 // I doubt this test is portable
 
+// XFAIL: linux
+
 #include <locale>
 #include <cassert>
 #include <limits.h>
diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
index a9ee704..b46ae32 100644
--- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
+++ b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
-
 // <locale>
 
 // template <class charT> class ctype_byname;
@@ -18,6 +15,8 @@
 
 // I doubt this test is portable
 
+// XFAIL: linux
+
 #include <locale>
 #include <string>
 #include <vector>
diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
index c631a7b..d7ce103 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 // XFAIL: apple-darwin
 
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
index 731e49f..ec563fe 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -7,10 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 // XFAIL: apple-darwin
 
+// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
+// and U002E as mon_decimal_point.
+// TODO: U00A0 should be investigated.
+// Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+// XFAIL: linux
+
 // REQUIRES: locale.ru_RU.UTF-8
 
 // <locale>
diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
index 2453369..374443a 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.zh_CN.UTF-8
 
 // <locale>
diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
index 6d1e184..8b620bc 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 // XFAIL: apple-darwin
 
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
index 57fb73d..54bfcfb 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -7,10 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 // XFAIL: apple-darwin
 
+// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
+// and U002E as mon_decimal_point.
+// TODO: U00A0 should be investigated.
+// Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+// XFAIL: linux
+
 // REQUIRES: locale.ru_RU.UTF-8
 
 // <locale>
diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
index 334687b..242701e 100644
--- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.zh_CN.UTF-8
 
 // <locale>
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
index c926db7..6d23d63 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 //
 // XFAIL: apple-darwin
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
index 3174f0c..6db1f56 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
@@ -7,8 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// Russia uses ',' for the decimal separator. GLIBC returns '.'
+// XFAIL: linux
 
 // <locale>
 
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
index d98285c..4967914 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 
 // <locale>
 
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
index f53161d..b0b9da0 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 //
 // XFAIL: apple-darwin
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
index e129639..3fe9faf 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 //
 // XFAIL: apple-darwin
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
index 0e8c708..45c58ef 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
index 29ebb6c..7038ab1 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 //
 // XFAIL: apple-darwin
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
index c7fe4de..dadf0da 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
index 1674c0e..640b7cb 100644
--- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
+++ b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
index bad0671..963974d 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
index cfec095..c44debf 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
index 0435105..9a06157 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -7,13 +7,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
 // REQUIRES: locale.zh_CN.UTF-8
 
+// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
+// GLIBC also failes on the zh_CN test.
+// XFAIL: linux
+
 // <locale>
 
 // class time_get_byname<charT, InputIterator>
@@ -81,6 +83,7 @@
         assert(t.tm_year == 109);
         assert(err == std::ios_base::eofbit);
     }
+
     {
         const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "2009/06/10";
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
index 4e41757..170f33a 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
@@ -7,13 +7,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
 // REQUIRES: locale.zh_CN.UTF-8
 
+// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
+// GLIBC also failes on the zh_CN test.
+// XFAIL: linux
+
 // <locale>
 
 // class time_get_byname<charT, InputIterator>
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
index b3c0089..a924cef 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
index 60fa9a0..009dc49 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
index 1cfd5d3..536859e 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
index 5b0b48e..36c8a8e 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
index 008f68a..8cea95d 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
index 1c76ab7..452a354 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
index 89fb375..db070be 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
index a5fe751..ac607ba 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
index b1a90d8..676e7ff 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
index 5c98996..1bdb8de 100644
--- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
diff --git a/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index d892f92..ff3bb82 100644
--- a/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
 
@@ -59,19 +57,19 @@
     std::ios ios(0);
     {
         const my_facet f(LOCALE_en_US_UTF_8, 1);
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert(ex == "Today is Saturday which is abreviated Sat.");
+        assert(ex == "Today is Saturday which is abbreviated Sat.");
     }
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert((ex == "Today is Samedi which is abreviated Sam.")||
-               (ex == "Today is samedi which is abreviated sam." ));
+        assert((ex == "Today is Samedi which is abbreviated Sam.")||
+               (ex == "Today is samedi which is abbreviated sam." ));
     }
 }
diff --git a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
index 408141d..93d5952 100644
--- a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
+++ b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
@@ -45,11 +45,11 @@
     t.tm_isdst = 1;
     std::ios ios(0);
     {
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert(ex == "Today is Saturday which is abreviated Sat.");
+        assert(ex == "Today is Saturday which is abbreviated Sat.");
     }
     {
         std::string pat("The number of the month is %Om.");
diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
index cb480e6..b1f225c 100644
--- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
+++ b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
@@ -7,8 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
index a388830..b1da92d 100644
--- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
+++ b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index 1ac08ca..80b440a 100644
--- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: android
-// XFAIL: androideabi
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
diff --git a/test/localization/locales/locale/locale.cons/assign.pass.cpp b/test/localization/locales/locale/locale.cons/assign.pass.cpp
index f326890..4aca354 100644
--- a/test/localization/locales/locale/locale.cons/assign.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/assign.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.ru_RU.UTF-8
 
 // <locale>
diff --git a/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp b/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
index 090087a..8b4509b 100644
--- a/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.ru_RU.UTF-8
 // REQUIRES: locale.zh_CN.UTF-8
 
diff --git a/test/localization/locales/locale/locale.cons/copy.pass.cpp b/test/localization/locales/locale/locale.cons/copy.pass.cpp
index d48acb4..7dd7cf4 100644
--- a/test/localization/locales/locale/locale.cons/copy.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/copy.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.fr_FR.UTF-8
 
 // <locale>
diff --git a/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
index b7750bf..6bd1f63 100644
--- a/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
 
diff --git a/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp b/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
index b223dda..f7349aa 100644
--- a/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.ru_RU.UTF-8
 
 // <locale>
diff --git a/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
index 2978d16..05d87a4 100644
--- a/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.ru_RU.UTF-8
 
diff --git a/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
index 8f30ec1..34718c8 100644
--- a/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.ru_RU.UTF-8
 
 // <locale>
diff --git a/test/localization/locales/locale/locale.cons/string.pass.cpp b/test/localization/locales/locale/locale.cons/string.pass.cpp
index d2efff1..6c80df0 100644
--- a/test/localization/locales/locale/locale.cons/string.pass.cpp
+++ b/test/localization/locales/locale/locale.cons/string.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.ru_RU.UTF-8
 // REQUIRES: locale.zh_CN.UTF-8
 
diff --git a/test/numerics/c.math/cmath.pass.cpp b/test/numerics/c.math/cmath.pass.cpp
index 7c74d5b..973bea0 100644
--- a/test/numerics/c.math/cmath.pass.cpp
+++ b/test/numerics/c.math/cmath.pass.cpp
@@ -9,6 +9,9 @@
 
 // <cmath>
 
+// NOTE: isinf and isnan are tested separately because they are expected to fail
+// on linux. We don't want their expected failure to hide other failures in this file.
+
 #include <cmath>
 #include <type_traits>
 #include <cassert>
@@ -475,30 +478,6 @@
     assert(std::isfinite(-1.0) == true);
 }
 
-void test_isinf()
-{
-#ifdef isinf
-#error isinf defined
-#endif
-    static_assert((std::is_same<decltype(std::isinf((float)0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isinf((double)0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isinf(0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isinf((long double)0)), bool>::value), "");
-    assert(std::isinf(-1.0) == false);
-}
-
-void test_isnan()
-{
-#ifdef isnan
-#error isnan defined
-#endif
-    static_assert((std::is_same<decltype(std::isnan((float)0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isnan((double)0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isnan(0)), bool>::value), "");
-    static_assert((std::is_same<decltype(std::isnan((long double)0)), bool>::value), "");
-    assert(std::isnan(-1.0) == false);
-}
-
 void test_isnormal()
 {
 #ifdef isnormal
@@ -1318,8 +1297,6 @@
     test_signbit();
     test_fpclassify();
     test_isfinite();
-    test_isinf();
-    test_isnan();
     test_isnormal();
     test_isgreater();
     test_isgreaterequal();
diff --git a/test/numerics/c.math/cmath_isinf.pass.cpp b/test/numerics/c.math/cmath_isinf.pass.cpp
new file mode 100644
index 0000000..6cde04d
--- /dev/null
+++ b/test/numerics/c.math/cmath_isinf.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <cmath>
+
+// isinf
+
+// XFAIL: linux
+
+#include <cmath>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+#ifdef isinf
+#error isinf defined
+#endif
+    static_assert((std::is_same<decltype(std::isinf((float)0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isinf((double)0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isinf(0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isinf((long double)0)), bool>::value), "");
+    assert(std::isinf(-1.0) == false);
+}
\ No newline at end of file
diff --git a/test/numerics/c.math/cmath_isnan.pass.cpp b/test/numerics/c.math/cmath_isnan.pass.cpp
new file mode 100644
index 0000000..7b33b96
--- /dev/null
+++ b/test/numerics/c.math/cmath_isnan.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <cmath>
+
+// isnan
+
+// XFAIL: linux
+
+#include <cmath>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+#ifdef isnan
+#error isnan defined
+#endif
+    static_assert((std::is_same<decltype(std::isnan((float)0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isnan((double)0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isnan(0)), bool>::value), "");
+    static_assert((std::is_same<decltype(std::isnan((long double)0)), bool>::value), "");
+    assert(std::isnan(-1.0) == false);
+}
diff --git a/test/numerics/complex.number/complex.ops/stream_input.pass.cpp b/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
index 107eefc..24644e3 100644
--- a/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
+++ b/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <complex>
 
diff --git a/test/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp b/test/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp
index 3bab0df..29cb787 100644
--- a/test/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp
+++ b/test/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp
@@ -18,6 +18,7 @@
 
 int main()
 {
+    {
     int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
     const std::size_t N1 = sizeof(a1)/sizeof(a1[0]);
     bool b1[N1] = {true,  false, false, true,  true,  false,
@@ -48,4 +49,18 @@
     assert(v1[13] == 13);
     assert(v1[14] == 14);
     assert(v1[15] == 15);
+    }
+    // Test return value of assignment
+    {
+    int a1[] = {0, 1, 2};
+    int a2[] = {3, 4, 5};
+    bool b1[] = {true, false, true};
+    std::valarray<int> v1(a1, 3);
+    std::valarray<int> v2(a2, 3);
+    std::valarray<bool> const vb1(b1, 3);
+    std::mask_array<int> m1 = v1[vb1];
+    std::mask_array<int> const m2 = v2[vb1];
+    std::mask_array<int> const & r = (m1 = m2);
+    assert(&r == &m1);
+    }
 }
diff --git a/test/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp b/test/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp
index b2b111a..79be4bd 100644
--- a/test/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp
+++ b/test/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp
@@ -18,6 +18,7 @@
 
 int main()
 {
+    {
     int a1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
     int a2[] = {-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12};
     std::valarray<int> v1(a1, sizeof(a1)/sizeof(a1[0]));
@@ -40,4 +41,16 @@
     assert(v1[13] == -11);
     assert(v1[14] == 14);
     assert(v1[15] == 15);
+    }
+    // Test return value of assignment.
+    {
+    int a1[] = {0, 1, 2};
+    int a2[] = {3, 4, 3};
+    std::valarray<int> v1(a1, 3);
+    const std::valarray<int> v2(a2, 3);
+    std::slice_array<int> s1 = v1[std::slice(1, 2, 3)];
+    std::slice_array<int> s2 = v1[std::slice(2, 2, 3)];
+    std::slice_array<int> const & s3 = (s1 = s2);
+    assert(&s1 == &s3);
+    }
 }
diff --git a/test/numerics/rand/rand.device/ctor.pass.cpp b/test/numerics/rand/rand.device/ctor.pass.cpp
index a7c38d4..dfa546b 100644
--- a/test/numerics/rand/rand.device/ctor.pass.cpp
+++ b/test/numerics/rand/rand.device/ctor.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <random>
 #include <cassert>
+#include <unistd.h>
 
 int main()
 {
@@ -30,6 +31,16 @@
         std::random_device r;
     }
     {
+        int ec;
+        ec = close(STDIN_FILENO);
+        assert(!ec);
+        ec = close(STDOUT_FILENO);
+        assert(!ec);
+        ec = close(STDERR_FILENO);
+        assert(!ec);
+        std::random_device r;
+    }
+    {
         std::random_device r("/dev/urandom");;
     }
     {
diff --git a/test/numerics/rand/rand.device/eval.pass.cpp b/test/numerics/rand/rand.device/eval.pass.cpp
index 2422635..72aff07 100644
--- a/test/numerics/rand/rand.device/eval.pass.cpp
+++ b/test/numerics/rand/rand.device/eval.pass.cpp
@@ -18,6 +18,18 @@
 
 int main()
 {
-    std::random_device r;
-    std::random_device::result_type e = r();
+    {
+        std::random_device r;
+        std::random_device::result_type e = r();
+    }
+
+    try
+    {
+        std::random_device r("/dev/null");
+        r();
+        assert(false);
+    }
+    catch (const std::system_error& e)
+    {
+    }
 }
diff --git a/test/re/re.alg/re.alg.match/basic.pass.cpp b/test/re/re.alg/re.alg.match/basic.pass.cpp
index b8a2b74..d63817d 100644
--- a/test/re/re.alg/re.alg.match/basic.pass.cpp
+++ b/test/re/re.alg/re.alg.match/basic.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.match/ecma.pass.cpp b/test/re/re.alg/re.alg.match/ecma.pass.cpp
index 818e137..67df410 100644
--- a/test/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/test/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.match/extended.pass.cpp b/test/re/re.alg/re.alg.match/extended.pass.cpp
index 0effeec..733c16e 100644
--- a/test/re/re.alg/re.alg.match/extended.pass.cpp
+++ b/test/re/re.alg/re.alg.match/extended.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.search/awk.pass.cpp b/test/re/re.alg/re.alg.search/awk.pass.cpp
index e2959df..74c25c1 100644
--- a/test/re/re.alg/re.alg.search/awk.pass.cpp
+++ b/test/re/re.alg/re.alg.search/awk.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.search/basic.pass.cpp b/test/re/re.alg/re.alg.search/basic.pass.cpp
index e8f95a8..c8a5051 100644
--- a/test/re/re.alg/re.alg.search/basic.pass.cpp
+++ b/test/re/re.alg/re.alg.search/basic.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.search/ecma.pass.cpp b/test/re/re.alg/re.alg.search/ecma.pass.cpp
index e9f86d7..965c29d 100644
--- a/test/re/re.alg/re.alg.search/ecma.pass.cpp
+++ b/test/re/re.alg/re.alg.search/ecma.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.alg/re.alg.search/extended.pass.cpp b/test/re/re.alg/re.alg.search/extended.pass.cpp
index 00c57e2..c181cff 100644
--- a/test/re/re.alg/re.alg.search/extended.pass.cpp
+++ b/test/re/re.alg/re.alg.search/extended.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.traits/lookup_collatename.pass.cpp b/test/re/re.traits/lookup_collatename.pass.cpp
index e73fc20..049246e 100644
--- a/test/re/re.traits/lookup_collatename.pass.cpp
+++ b/test/re/re.traits/lookup_collatename.pass.cpp
@@ -7,8 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.traits/transform.pass.cpp b/test/re/re.traits/transform.pass.cpp
index de54194..c3bce79 100644
--- a/test/re/re.traits/transform.pass.cpp
+++ b/test/re/re.traits/transform.pass.cpp
@@ -8,8 +8,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/re/re.traits/transform_primary.pass.cpp b/test/re/re.traits/transform_primary.pass.cpp
index ee4b296..28734d6 100644
--- a/test/re/re.traits/transform_primary.pass.cpp
+++ b/test/re/re.traits/transform_primary.pass.cpp
@@ -8,8 +8,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: android
-// XFAIL: androideabi
 // REQUIRES: locale.cs_CZ.ISO8859-2
 
 // <regex>
diff --git a/test/strings/basic.string/string.cons/move_alloc.pass.cpp b/test/strings/basic.string/string.cons/move_alloc.pass.cpp
index 4e8b038..1f96314 100644
--- a/test/strings/basic.string/string.cons/move_alloc.pass.cpp
+++ b/test/strings/basic.string/string.cons/move_alloc.pass.cpp
@@ -45,6 +45,16 @@
     test(S("1"), A(5));
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7));
     }
+
+    int alloc_count = test_alloc_base::alloc_count;
+    {
+    typedef test_allocator<char> A;
+    typedef std::basic_string<char, std::char_traits<char>, A> S;
+    S s1 ( "Twas brillig, and the slivy toves did gyre and gymbal in the wabe" );
+    S s2 (std::move(s1), A(1));
+    }
+    assert ( test_alloc_base::alloc_count == alloc_count );
+    
 #if __cplusplus >= 201103L
     {
     typedef min_allocator<char> A;
diff --git a/test/strings/c.strings/cuchar.pass.cpp b/test/strings/c.strings/cuchar.pass.cpp
index d4c15db..022c656 100644
--- a/test/strings/c.strings/cuchar.pass.cpp
+++ b/test/strings/c.strings/cuchar.pass.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: apple-darwin
+// XFAIL: *
 
 // <cuchar>
 
diff --git a/test/strings/c.strings/version_cuchar.pass.cpp b/test/strings/c.strings/version_cuchar.pass.cpp
index fa47f0f..dcfdcc3 100644
--- a/test/strings/c.strings/version_cuchar.pass.cpp
+++ b/test/strings/c.strings/version_cuchar.pass.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// XFAIL: apple-darwin
+// XFAIL: *
 
 // <cuchar>
 
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp
index e395d74..af87052 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char16_t c = u'\0';
     std::char_traits<char16_t>::assign(c, u'a');
     assert(c == u'a');
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp
index e63113f..9f8461e 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp
@@ -19,6 +19,7 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char16_t>::compare(u"", u"", 0) == 0);
 
     assert(std::char_traits<char16_t>::compare(u"1", u"1", 1) == 0);
@@ -38,5 +39,6 @@
     assert(std::char_traits<char16_t>::compare(u"223", u"123", 3) > 0);
     assert(std::char_traits<char16_t>::compare(u"133", u"123", 3) > 0);
     assert(std::char_traits<char16_t>::compare(u"124", u"123", 3) > 0);
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
index 8ac9443..8216934 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char16_t c = u'\0';
     assert(std::char_traits<char16_t>::eq(u'a', u'a'));
     assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp
index f07f9d6..a20aa7d 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq_int_type.pass.cpp
@@ -19,9 +19,11 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert( std::char_traits<char16_t>::eq_int_type(u'a', u'a'));
     assert(!std::char_traits<char16_t>::eq_int_type(u'a', u'A'));
     assert(!std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), u'A'));
+#endif
     assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(),
                                                     std::char_traits<char16_t>::eof()));
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp
index 5cb4629..9f6acca 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp
@@ -19,10 +19,12 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char16_t>::length(u"") == 0);
     assert(std::char_traits<char16_t>::length(u"a") == 1);
     assert(std::char_traits<char16_t>::length(u"aa") == 2);
     assert(std::char_traits<char16_t>::length(u"aaa") == 3);
     assert(std::char_traits<char16_t>::length(u"aaaa") == 4);
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
index d01059f..135ecc0 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char16_t c = u'\0';
     assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
     assert( std::char_traits<char16_t>::lt(u'A', u'a'));
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp
index 126663f..3c213e6 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/not_eof.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char16_t>::not_eof(u'a') == u'a');
     assert(std::char_traits<char16_t>::not_eof(u'A') == u'A');
+#endif
     assert(std::char_traits<char16_t>::not_eof(0) == 0);
     assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) !=
            std::char_traits<char16_t>::eof());
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp
index d8abfc5..ab47403 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_char_type.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char16_t>::to_char_type(u'a') == u'a');
     assert(std::char_traits<char16_t>::to_char_type(u'A') == u'A');
+#endif
     assert(std::char_traits<char16_t>::to_char_type(0) == 0);
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp
index 40c3365..11eb8f5 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/to_int_type.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char16_t>::to_int_type(u'a') == u'a');
     assert(std::char_traits<char16_t>::to_int_type(u'A') == u'A');
+#endif
     assert(std::char_traits<char16_t>::to_int_type(0) == 0);
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp
index 5950898..35dcd96 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char32_t c = U'\0';
     std::char_traits<char32_t>::assign(c, U'a');
     assert(c == U'a');
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp
index 87dd6f2..ee3019c 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp
@@ -19,6 +19,7 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char32_t>::compare(U"", U"", 0) == 0);
 
     assert(std::char_traits<char32_t>::compare(U"1", U"1", 1) == 0);
@@ -38,5 +39,6 @@
     assert(std::char_traits<char32_t>::compare(U"223", U"123", 3) > 0);
     assert(std::char_traits<char32_t>::compare(U"133", U"123", 3) > 0);
     assert(std::char_traits<char32_t>::compare(U"124", U"123", 3) > 0);
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
index 9ed7034..ffeff0c 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char32_t c = U'\0';
     assert(std::char_traits<char32_t>::eq(U'a', U'a'));
     assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp
index ec43abc..eb5c696 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq_int_type.pass.cpp
@@ -19,9 +19,11 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert( std::char_traits<char32_t>::eq_int_type(U'a', U'a'));
     assert(!std::char_traits<char32_t>::eq_int_type(U'a', U'A'));
     assert(!std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), U'A'));
+#endif
     assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(),
                                                     std::char_traits<char32_t>::eof()));
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp
index 5f55add..d80ce05 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp
@@ -19,10 +19,12 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char32_t>::length(U"") == 0);
     assert(std::char_traits<char32_t>::length(U"a") == 1);
     assert(std::char_traits<char32_t>::length(U"aa") == 2);
     assert(std::char_traits<char32_t>::length(U"aaa") == 3);
     assert(std::char_traits<char32_t>::length(U"aaaa") == 4);
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
index cb1c008..f667507 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     char32_t c = U'\0';
     assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
     assert( std::char_traits<char32_t>::lt(U'A', U'a'));
+#endif
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp
index 2d4768f..d794417 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/not_eof.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char32_t>::not_eof(U'a') == U'a');
     assert(std::char_traits<char32_t>::not_eof(U'A') == U'A');
+#endif
     assert(std::char_traits<char32_t>::not_eof(0) == 0);
     assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) !=
            std::char_traits<char32_t>::eof());
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp
index 481835c..1f67242 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_char_type.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char32_t>::to_char_type(U'a') == U'a');
     assert(std::char_traits<char32_t>::to_char_type(U'A') == U'A');
+#endif
     assert(std::char_traits<char32_t>::to_char_type(0) == 0);
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp
index 2d35d7f..a378186 100644
--- a/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp
+++ b/test/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/to_int_type.pass.cpp
@@ -19,8 +19,10 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+#if __cplusplus >= 201103L
     assert(std::char_traits<char32_t>::to_int_type(U'a') == U'a');
     assert(std::char_traits<char32_t>::to_int_type(U'A') == U'A');
+#endif
     assert(std::char_traits<char32_t>::to_int_type(0) == 0);
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }
diff --git a/test/support/asan_testing.h b/test/support/asan_testing.h
new file mode 100644
index 0000000..c8797bd
--- /dev/null
+++ b/test/support/asan_testing.h
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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 ASAN_TESTING_H
+#define ASAN_TESTING_H
+
+#include <__config>
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" int __sanitizer_verify_contiguous_container
+     ( const void *beg, const void *mid, const void *end );
+     
+template <typename T, typename Alloc>
+bool is_contiguous_container_asan_correct ( const std::vector<T, Alloc> &c )
+{
+    if ( std::is_same<Alloc, std::allocator<T>>::value && c.data() != NULL)
+        return __sanitizer_verify_contiguous_container (
+            c.data(), c.data() + c.size(), c.data() + c.capacity()) != 0;
+    return true;
+}
+
+#else
+template <typename T, typename Alloc>
+bool is_contiguous_container_asan_correct ( const std::vector<T, Alloc> &c )
+{
+    return true;
+}
+#endif
+ 
+
+#endif  // ASAN_TESTING_H
\ No newline at end of file
diff --git a/test/support/constexpr_char_traits.hpp b/test/support/constexpr_char_traits.hpp
new file mode 100644
index 0000000..a2a690e
--- /dev/null
+++ b/test/support/constexpr_char_traits.hpp
@@ -0,0 +1,138 @@
+// -*- C++ -*-
+//===-------_------------ constexpr_char_traits ---------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _CONSTEXPR_CHAR_TRAITS
+#define _CONSTEXPR_CHAR_TRAITS
+
+#include <__config>
+#include <string>
+
+
+template <class _CharT>
+struct constexpr_char_traits
+{
+    typedef _CharT    char_type;
+    typedef int       int_type;
+    typedef std::streamoff off_type;
+    typedef std::streampos pos_type;
+    typedef std::mbstate_t state_type;
+
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
+        {__c1 = __c2;}
+
+    static _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+        {return __c1 == __c2;}
+
+    static _LIBCPP_CONSTEXPR  bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+        {return __c1 < __c2;}
+
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 int              compare(const char_type* __s1, const char_type* __s2, size_t __n);
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 size_t           length(const char_type* __s);
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type*       move(char_type* __s1, const char_type* __s2, size_t __n);
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n);
+    static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type*       assign(char_type* __s, size_t __n, char_type __a);
+
+    static _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
+
+    static _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+        {return char_type(__c);}
+
+    static _LIBCPP_CONSTEXPR int_type  to_int_type(char_type __c) _NOEXCEPT
+        {return int_type(__c);}
+
+    static _LIBCPP_CONSTEXPR bool      eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+        {return __c1 == __c2;}
+
+    static _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
+        {return int_type(EOF);}
+};
+
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 int
+constexpr_char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
+{
+    for (; __n; --__n, ++__s1, ++__s2)
+    {
+        if (lt(*__s1, *__s2))
+            return -1;
+        if (lt(*__s2, *__s1))
+            return 1;
+    }
+    return 0;
+}
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 size_t
+constexpr_char_traits<_CharT>::length(const char_type* __s)
+{
+    size_t __len = 0;
+    for (; !eq(*__s, char_type(0)); ++__s)
+        ++__len;
+    return __len;
+}
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT*
+constexpr_char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
+{
+    for (; __n; --__n)
+    {
+        if (eq(*__s, __a))
+            return __s;
+        ++__s;
+    }
+    return 0;
+}
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT*
+constexpr_char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
+{
+    char_type* __r = __s1;
+    if (__s1 < __s2)
+    {
+        for (; __n; --__n, ++__s1, ++__s2)
+            assign(*__s1, *__s2);
+    }
+    else if (__s2 < __s1)
+    {
+        __s1 += __n;
+        __s2 += __n;
+        for (; __n; --__n)
+            assign(*--__s1, *--__s2);
+    }
+    return __r;
+}
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT*
+constexpr_char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
+{
+    _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+    char_type* __r = __s1;
+    for (; __n; --__n, ++__s1, ++__s2)
+        assign(*__s1, *__s2);
+    return __r;
+}
+
+template <class _CharT>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT*
+constexpr_char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
+{
+    char_type* __r = __s;
+    for (; __n; --__n, ++__s)
+        assign(*__s, __a);
+    return __r;
+}
+
+#endif // _CONSTEXPR_CHAR_TRAITS
\ No newline at end of file
diff --git a/test/support/counting_predicates.hpp b/test/support/counting_predicates.hpp
new file mode 100644
index 0000000..e825848
--- /dev/null
+++ b/test/support/counting_predicates.hpp
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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 __COUNTING_PREDICATES_H
+#define __COUNTING_PREDICATES_H
+
+
+template <typename Predicate, typename Arg>
+struct unary_counting_predicate : public std::unary_function<Arg, bool>  {
+public:
+	unary_counting_predicate(Predicate p) : p_(p), count_(0) {}
+	~unary_counting_predicate() {}
+	
+	bool operator () (const Arg &a) const { ++count_; return p_(a); }
+	size_t count() const { return count_; }
+	void reset() { count_ = 0; }
+	
+private:
+	Predicate p_;
+	mutable size_t count_;
+	};
+
+
+template <typename Predicate, typename Arg1, typename Arg2=Arg1>
+struct binary_counting_predicate : public std::binary_function<Arg1, Arg2, bool> {
+public:
+
+	binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {}
+	~binary_counting_predicate() {}
+	
+	bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
+	size_t count() const { return count_; }
+	void reset() { count_ = 0; }
+
+private:
+	Predicate p_;
+	mutable size_t count_;
+	};
+
+#endif // __COUNTING_PREDICATES_H
diff --git a/test/support/min_allocator.h b/test/support/min_allocator.h
index f3f08ca..b643636 100644
--- a/test/support/min_allocator.h
+++ b/test/support/min_allocator.h
@@ -10,6 +10,34 @@
 #ifndef MIN_ALLOCATOR_H
 #define MIN_ALLOCATOR_H
 
+#include <cstddef>
+
+template <class T>
+class bare_allocator
+{
+public:
+    typedef T value_type;
+
+    bare_allocator() {}
+
+    template <class U>
+    bare_allocator(bare_allocator<U>) {}
+
+    T* allocate(std::size_t n)
+    {
+        return static_cast<T*>(::operator new(n*sizeof(T)));
+    }
+
+    void deallocate(T* p, std::size_t)
+    {
+        return ::operator delete(static_cast<void*>(p));
+    }
+
+    friend bool operator==(bare_allocator, bare_allocator) {return true;}
+    friend bool operator!=(bare_allocator x, bare_allocator y) {return !(x == y);}
+};
+
+
 #if __cplusplus >= 201103L
 
 #include <memory>
@@ -71,7 +99,7 @@
     explicit min_pointer(min_pointer<void> p) : ptr_(static_cast<T*>(p.ptr_)) {}
 
     explicit operator bool() const {return ptr_ != nullptr;}
-    
+
     typedef std::ptrdiff_t difference_type;
     typedef T& reference;
     typedef T* pointer;
diff --git a/test/support/nothing_to_do.pass.cpp b/test/support/nothing_to_do.pass.cpp
index 9a59227..9125fe1 100644
--- a/test/support/nothing_to_do.pass.cpp
+++ b/test/support/nothing_to_do.pass.cpp
@@ -11,3 +11,4 @@
 int main()
 {
 }
+
diff --git a/test/support/platform_support.h b/test/support/platform_support.h
index 9ae2ae7..09bb29a 100644
--- a/test/support/platform_support.h
+++ b/test/support/platform_support.h
@@ -44,19 +44,31 @@
 #include <string>
 #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
 #include <io.h> // _mktemp
+#else
+#include <unistd.h> // close
 #endif
 
 inline
 std::string
 get_temp_file_name()
 {
-   std::string s("temp.XXXXXX");
 #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-   _mktemp(&s[0]);
+    char Path[MAX_PATH+1];
+    char FN[MAX_PATH+1];
+    do { } while (0 == GetTempPath(MAX_PATH+1, Path));
+    do { } while (0 == GetTempFileName(Path, "libcxx", 0, FN));
+    return FN;
 #else
-   mktemp(&s[0]);
+    std::string Name;
+    int FD = -1;
+    do {
+      Name = "libcxx.XXXXXX";
+      FD = mkstemp(&Name[0]);
+      assert(errno != EINVAL && "Something is wrong with the mkstemp's argument");
+    } while (FD == -1 || errno == EEXIST);
+    close(FD);
+    return Name;
 #endif
-   return s;
 }
 
 #endif // PLATFORM_SUPPORT_H
diff --git a/test/support/test_allocator.h b/test/support/test_allocator.h
index 99f72a0..683fac2 100644
--- a/test/support/test_allocator.h
+++ b/test/support/test_allocator.h
@@ -92,6 +92,66 @@
         {return !(x == y);}
 };
 
+template <class T>
+class non_default_test_allocator
+    : public test_alloc_base
+{
+    int data_;
+
+    template <class U> friend class non_default_test_allocator;
+public:
+
+    typedef unsigned                                                   size_type;
+    typedef int                                                        difference_type;
+    typedef T                                                          value_type;
+    typedef value_type*                                                pointer;
+    typedef const value_type*                                          const_pointer;
+    typedef typename std::add_lvalue_reference<value_type>::type       reference;
+    typedef typename std::add_lvalue_reference<const value_type>::type const_reference;
+
+    template <class U> struct rebind {typedef non_default_test_allocator<U> other;};
+
+//    non_default_test_allocator() throw() : data_(0) {++count;}
+    explicit non_default_test_allocator(int i) throw() : data_(i) {++count;}
+    non_default_test_allocator(const non_default_test_allocator& a) throw()
+        : data_(a.data_) {++count;}
+    template <class U> non_default_test_allocator(const non_default_test_allocator<U>& a) throw()
+        : data_(a.data_) {++count;}
+    ~non_default_test_allocator() throw() {assert(data_ >= 0); --count; data_ = -1;}
+    pointer address(reference x) const {return &x;}
+    const_pointer address(const_reference x) const {return &x;}
+    pointer allocate(size_type n, const void* = 0)
+        {
+            assert(data_ >= 0);
+            if (time_to_throw >= throw_after) {
+#ifndef _LIBCPP_NO_EXCEPTIONS
+                throw std::bad_alloc();
+#else
+                std::terminate();
+#endif
+            }
+            ++time_to_throw;
+            ++alloc_count;
+            return (pointer)std::malloc(n * sizeof(T));
+        }
+    void deallocate(pointer p, size_type n)
+        {assert(data_ >= 0); --alloc_count; std::free(p);}
+    size_type max_size() const throw()
+        {return UINT_MAX / sizeof(T);}
+    void construct(pointer p, const T& val)
+        {::new(p) T(val);}
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void construct(pointer p, T&& val)
+        {::new(p) T(std::move(val));}
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void destroy(pointer p) {p->~T();}
+
+    friend bool operator==(const non_default_test_allocator& x, const non_default_test_allocator& y)
+        {return x.data_ == y.data_;}
+    friend bool operator!=(const non_default_test_allocator& x, const non_default_test_allocator& y)
+        {return !(x == y);}
+};
+
 template <>
 class test_allocator<void>
     : public test_alloc_base
diff --git a/test/thread/futures/futures.future_error/what.pass.cpp b/test/thread/futures/futures.future_error/what.pass.cpp
index 1c250a9..5e54350 100644
--- a/test/thread/futures/futures.future_error/what.pass.cpp
+++ b/test/thread/futures/futures.future_error/what.pass.cpp
@@ -7,6 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+// LWG 2056 changed the values of future_errc, so if we're using new headers
+// with an old library we'll get incorrect messages.
+//
+// XFAIL: with_system_lib=x86_64-apple-darwin11
+// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_lib=x86_64-apple-darwin13
+
 // <future>
 
 // class future_error
diff --git a/test/thread/futures/futures.promise/dtor.pass.cpp b/test/thread/futures/futures.promise/dtor.pass.cpp
index 3401605..cd4fafb 100644
--- a/test/thread/futures/futures.promise/dtor.pass.cpp
+++ b/test/thread/futures/futures.promise/dtor.pass.cpp
@@ -100,7 +100,15 @@
         }
         catch (const std::future_error& e)
         {
-            assert(e.code() == make_error_code(std::future_errc::broken_promise));
+            // LWG 2056 changed the values of future_errc, so if we're using new
+            // headers with an old library the error codes won't line up.
+            //
+            // Note that this particular check only applies to promise<void>
+            // since the other specializations happen to be implemented in the
+            // header rather than the library.
+            assert(
+                e.code() == make_error_code(std::future_errc::broken_promise) ||
+                e.code() == std::error_code(0, std::future_category()));
         }
     }
 }
diff --git a/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp b/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
index 7009f30..58e9982 100644
--- a/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
+++ b/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
@@ -35,6 +35,8 @@
 int A::n_moves = 0;
 int A::n_copies = 0;
 
+int func(int i) { return i; }
+
 int main()
 {
     {
@@ -58,4 +60,18 @@
         assert(A::n_copies > 0);
         assert(A::n_moves > 0);
     }
+    {
+        std::packaged_task<int(int)> p(&func);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    {
+        std::packaged_task<int(int)> p(func);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
 }
diff --git a/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp b/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
index 2e0cf5d..e7070c5 100644
--- a/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
+++ b/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
@@ -37,6 +37,8 @@
 int A::n_moves = 0;
 int A::n_copies = 0;
 
+int func(int i) { return i; }
+
 int main()
 {
     {
@@ -52,7 +54,7 @@
     }
     assert(test_alloc_base::count == 0);
     A::n_copies = 0;
-    A::n_copies = 0;
+    A::n_moves  = 0;
     {
         A a(5);
         std::packaged_task<double(int, char)> p(std::allocator_arg,
@@ -66,4 +68,28 @@
         assert(A::n_moves > 0);
     }
     assert(test_alloc_base::count == 0);
+    A::n_copies = 0;
+    A::n_moves  = 0;
+    {
+        A a(5);
+        std::packaged_task<int(int)> p(std::allocator_arg, test_allocator<A>(), &func);
+        assert(test_alloc_base::count > 0);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    assert(test_alloc_base::count == 0);
+    A::n_copies = 0;
+    A::n_moves  = 0;
+    {
+        A a(5);
+        std::packaged_task<int(int)> p(std::allocator_arg, test_allocator<A>(), func);
+        assert(test_alloc_base::count > 0);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    assert(test_alloc_base::count == 0);
 }
diff --git a/test/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp b/test/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
index d66db3f..f66b962 100644
--- a/test/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
+++ b/test/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
@@ -15,9 +15,29 @@
 #include <thread>
 #include <cstdlib>
 #include <cassert>
+#include <signal.h>
+#include <sys/time.h>
 
 int main()
 {
+    int ec;
+    struct sigaction action;
+    action.sa_handler = [](int) {};
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = 0;
+
+    ec = sigaction(SIGALRM, &action, nullptr);
+    assert(!ec);
+
+    struct itimerval it;
+    it.it_interval = { 0 };
+    it.it_value.tv_sec = 0;
+    it.it_value.tv_usec = 250000;
+    // This will result in a SIGALRM getting fired resulting in the nanosleep
+    // inside sleep_for getting EINTR.
+    ec = setitimer(ITIMER_REAL, &it, nullptr);
+    assert(!ec);
+
     typedef std::chrono::system_clock Clock;
     typedef Clock::time_point time_point;
     typedef Clock::duration duration;
diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
index 79fc151..f758a4d 100644
--- a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
+++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
@@ -92,6 +92,15 @@
     }
     assert(new_called == 0);
     {
+    assert(new_called == 0);
+    non_default_test_allocator<std::function<int(int)>> al(1);
+    std::function<int(int)> f2(std::allocator_arg, al, g);
+    assert(new_called == 0);
+    assert(f2.target<int(*)(int)>());
+    assert(f2.target<A>() == 0);
+    }
+    assert(new_called == 0);
+    {
     std::function<int(int)> f;
     assert(new_called == 0);
     assert(f.target<int(*)(int)>() == 0);
diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp
index 0efb4d9..cf7b963 100644
--- a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp
+++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp
@@ -99,6 +99,18 @@
     assert(f2.target<int(*)(int)>() == 0);
     assert(f2.target<A>() == 0);
     }
+    {
+    std::function<int(int)> f;
+    assert(new_called == 0);
+    assert(f.target<int(*)(int)>() == 0);
+    assert(f.target<A>() == 0);
+    assert(!f);
+    std::function<long(int)> g = f;
+    assert(new_called == 0);
+    assert(g.target<long(*)(int)>() == 0);
+    assert(g.target<A>() == 0);
+    assert(!g);
+    }
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     assert(new_called == 0);
     {
diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/no-variadics.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/no-variadics.pass.cpp
new file mode 100644
index 0000000..7099c45
--- /dev/null
+++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/no-variadics.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// class function<R()>
+
+// template<class F> function(F);
+
+#define _LIBCPP_HAS_NO_VARIADICS
+#include <functional>
+#include <cassert>
+
+int main()
+{
+    std::function<void()> f(static_cast<void(*)()>(0));
+    assert(!f);
+}
diff --git a/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp b/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp
index 1eb92aa..5a95097 100644
--- a/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp
+++ b/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp
@@ -16,10 +16,28 @@
 #include <functional>
 #include <cassert>
 
+#include "counting_predicates.hpp"
+
+bool is5 ( int i ) { return i == 5; }
+
+template <typename T>
+bool call_pred ( T pred ) { return pred(5); }
+
 int main()
 {
+    {
     int i = 0;
     std::reference_wrapper<int> r1 = std::ref(i);
     std::reference_wrapper<int> r2 = std::ref(r1);
     assert(&r2.get() == &i);
+    }
+    {
+    unary_counting_predicate<bool(*)(int), int> cp(is5);
+    assert(!cp(6));
+    assert(cp.count() == 1);
+	assert(call_pred(cp));
+    assert(cp.count() == 1);
+	assert(call_pred(std::ref(cp)));
+    assert(cp.count() == 2);
+	}
 }
diff --git a/test/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp b/test/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp
index e0e38fb..a8ad936 100644
--- a/test/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp
+++ b/test/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp
@@ -40,7 +40,7 @@
     {
         int i = 0;
         A<int> a = std::pointer_traits<A<int> >::pointer_to(i);
-        assert(a.t_ = &i);
+        assert(a.t_ == &i);
     }
     {
         (std::pointer_traits<A<void> >::element_type)0;
diff --git a/test/utilities/memory/pointer.traits/pointer_to.pass.cpp b/test/utilities/memory/pointer.traits/pointer_to.pass.cpp
index 764a7ba..fc44d9d 100644
--- a/test/utilities/memory/pointer.traits/pointer_to.pass.cpp
+++ b/test/utilities/memory/pointer.traits/pointer_to.pass.cpp
@@ -24,7 +24,7 @@
     {
         int i = 0;
         int* a = std::pointer_traits<int*>::pointer_to(i);
-        assert(a = &i);
+        assert(a == &i);
     }
     {
         (std::pointer_traits<void*>::element_type)0;
diff --git a/test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp b/test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
index a706c40..00a08bc 100644
--- a/test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
+++ b/test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp
@@ -25,7 +25,7 @@
 public:
 
     Deleter(Deleter&) {}
-    Deleter& operator=(Deleter&) {}
+    Deleter& operator=(Deleter&) { return *this; }
 
     void operator()(void*) const {}
 };
diff --git a/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp b/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
index 7de3b0d..eb8e31c 100644
--- a/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
+++ b/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
@@ -52,7 +52,7 @@
     test_make_signed< unsigned long long, signed long long >();
     test_make_signed< wchar_t, std::conditional<sizeof(wchar_t) == 4, int, short>::type >();
     test_make_signed< const wchar_t, std::conditional<sizeof(wchar_t) == 4, const int, const short>::type >();
-    test_make_signed< const Enum, const int >();
+    test_make_signed< const Enum, std::conditional<sizeof(Enum) == sizeof(int), const int, const signed char>::type >();
     test_make_signed< BigEnum, std::conditional<sizeof(long) == 4, long long, long>::type >();
 #ifndef _LIBCPP_HAS_NO_INT128
     test_make_signed< __int128_t, __int128_t >();
diff --git a/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp b/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
index a13485a..9844401 100644
--- a/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
+++ b/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
@@ -52,7 +52,7 @@
     test_make_unsigned<unsigned long long, unsigned long long> ();
     test_make_unsigned<wchar_t, std::conditional<sizeof(wchar_t) == 4, unsigned int, unsigned short>::type> ();
     test_make_unsigned<const wchar_t, std::conditional<sizeof(wchar_t) == 4, const unsigned int, const unsigned short>::type> ();
-    test_make_unsigned<const Enum, const unsigned int> ();
+    test_make_unsigned<const Enum, std::conditional<sizeof(Enum) == sizeof(int), const unsigned int, const unsigned char>::type >();
     test_make_unsigned<BigEnum,
                    std::conditional<sizeof(long) == 4, unsigned long long, unsigned long>::type> ();
 #ifndef _LIBCPP_HAS_NO_INT128
diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
index c563870..67ef3db 100644
--- a/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
@@ -61,6 +61,18 @@
     test_member_function_pointer<void (Class::*)(int) volatile>();
     test_member_function_pointer<void (Class::*)(int, char) volatile>();
 
+    test_member_function_pointer<void (Class::*)(...)>();
+    test_member_function_pointer<void (Class::*)(int, ...)>();
+    test_member_function_pointer<void (Class::*)(int, char, ...)>();
+
+    test_member_function_pointer<void (Class::*)(...) const>();
+    test_member_function_pointer<void (Class::*)(int, ...) const>();
+    test_member_function_pointer<void (Class::*)(int, char, ...) const>();
+
+    test_member_function_pointer<void (Class::*)(...) volatile>();
+    test_member_function_pointer<void (Class::*)(int, ...) volatile>();
+    test_member_function_pointer<void (Class::*)(int, char, ...) volatile>();
+
 #if __cplusplus >= 201103L
 // reference qualifiers on functions are a C++11 extension
     test_member_function_pointer<void (Class::*)() &&>();
@@ -74,5 +86,17 @@
     test_member_function_pointer<void (Class::*)() volatile &&>();
     test_member_function_pointer<void (Class::*)(int) volatile &&>();
     test_member_function_pointer<void (Class::*)(int, char) volatile &&>();
+
+    test_member_function_pointer<void (Class::*)(...) &&>();
+    test_member_function_pointer<void (Class::*)(int,...) &&>();
+    test_member_function_pointer<void (Class::*)(int, char,...) &&>();
+
+    test_member_function_pointer<void (Class::*)(...) &>();
+    test_member_function_pointer<void (Class::*)(int,...) &>();
+    test_member_function_pointer<void (Class::*)(int, char,...) &>();
+
+    test_member_function_pointer<void (Class::*)(...) volatile &&>();
+    test_member_function_pointer<void (Class::*)(int,...) volatile &&>();
+    test_member_function_pointer<void (Class::*)(int, char,...) volatile &&>();
 #endif
 }
diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp
new file mode 100644
index 0000000..e13e586
--- /dev/null
+++ b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp
@@ -0,0 +1,76 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// type_traits
+
+// member_function_pointer
+
+#define _LIBCPP_HAS_NO_VARIADICS
+#include <type_traits>
+
+template <class T>
+void test_member_function_pointer_imp()
+{
+    static_assert(!std::is_void<T>::value, "");
+#if _LIBCPP_STD_VER > 11
+    static_assert(!std::is_null_pointer<T>::value, "");
+#endif
+    static_assert(!std::is_integral<T>::value, "");
+    static_assert(!std::is_floating_point<T>::value, "");
+    static_assert(!std::is_array<T>::value, "");
+    static_assert(!std::is_pointer<T>::value, "");
+    static_assert(!std::is_lvalue_reference<T>::value, "");
+    static_assert(!std::is_rvalue_reference<T>::value, "");
+    static_assert(!std::is_member_object_pointer<T>::value, "");
+    static_assert( std::is_member_function_pointer<T>::value, "");
+    static_assert(!std::is_enum<T>::value, "");
+    static_assert(!std::is_union<T>::value, "");
+    static_assert(!std::is_class<T>::value, "");
+    static_assert(!std::is_function<T>::value, "");
+}
+
+template <class T>
+void test_member_function_pointer()
+{
+    test_member_function_pointer_imp<T>();
+    test_member_function_pointer_imp<const T>();
+    test_member_function_pointer_imp<volatile T>();
+    test_member_function_pointer_imp<const volatile T>();
+}
+
+class Class
+{
+};
+
+int main()
+{
+    test_member_function_pointer<void (Class::*)()>();
+    test_member_function_pointer<void (Class::*)(int)>();
+    test_member_function_pointer<void (Class::*)(int, char)>();
+
+    test_member_function_pointer<void (Class::*)() const>();
+    test_member_function_pointer<void (Class::*)(int) const>();
+    test_member_function_pointer<void (Class::*)(int, char) const>();
+
+    test_member_function_pointer<void (Class::*)() volatile>();
+    test_member_function_pointer<void (Class::*)(int) volatile>();
+    test_member_function_pointer<void (Class::*)(int, char) volatile>();
+
+    test_member_function_pointer<void (Class::*)(...)>();
+    test_member_function_pointer<void (Class::*)(int, ...)>();
+    test_member_function_pointer<void (Class::*)(int, char, ...)>();
+
+    test_member_function_pointer<void (Class::*)(...) const>();
+    test_member_function_pointer<void (Class::*)(int, ...) const>();
+    test_member_function_pointer<void (Class::*)(int, char, ...) const>();
+
+    test_member_function_pointer<void (Class::*)(...) volatile>();
+    test_member_function_pointer<void (Class::*)(int, ...) volatile>();
+    test_member_function_pointer<void (Class::*)(int, char, ...) volatile>();
+}
diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
index e4af6de..b46a4d6 100644
--- a/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
@@ -36,6 +36,7 @@
 
 struct D;
 
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 struct C
 {
     template <class U>
@@ -46,6 +47,7 @@
 {
     C operator=(int);
 };
+#endif
 
 int main()
 {
@@ -54,9 +56,10 @@
     test_is_assignable<int&, double> ();
     test_is_assignable<B, A> ();
     test_is_assignable<void*&, void*> ();
-    test_is_assignable<E, int> ();
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    test_is_assignable<E, int> ();
+
     test_is_not_assignable<int, int&> ();
     test_is_not_assignable<int, int> ();
 #endif
diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
index 0753ab7..2b8f7ef 100644
--- a/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -24,6 +24,16 @@
     A(char);
 };
 
+class Abstract
+{
+    virtual void foo() = 0;
+};
+
+class AbstractDestructor
+{
+    virtual ~AbstractDestructor() = 0;
+};
+
 template <class T>
 void test_is_constructible()
 {
@@ -71,4 +81,6 @@
     test_is_not_constructible<A, void> ();
     test_is_not_constructible<void> ();
     test_is_not_constructible<int&> ();
+    test_is_not_constructible<Abstract> ();
+    test_is_not_constructible<AbstractDestructor> ();
 }
diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
index 5cabb38..807745e 100644
--- a/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp
@@ -31,9 +31,7 @@
     static_assert(!std::is_destructible<const volatile T>::value, "");
 }
 
-class Empty
-{
-};
+class Empty {};
 
 class NotEmpty
 {
@@ -47,11 +45,6 @@
     int :  0;
 };
 
-class Abstract
-{
-    virtual ~Abstract() = 0;
-};
-
 struct A
 {
     ~A();
@@ -59,6 +52,31 @@
 
 typedef void (Function) ();
 
+struct PublicAbstract                    { public:    virtual void foo() = 0; };
+struct ProtectedAbstract                 { protected: virtual void foo() = 0; };
+struct PrivateAbstract                   { private:   virtual void foo() = 0; };
+
+struct PublicDestructor                  { public:    ~PublicDestructor() {}};
+struct ProtectedDestructor               { protected: ~ProtectedDestructor() {}};
+struct PrivateDestructor                 { private:   ~PrivateDestructor() {}};
+
+struct VirtualPublicDestructor           { public:    virtual ~VirtualPublicDestructor() {}};
+struct VirtualProtectedDestructor        { protected: virtual ~VirtualProtectedDestructor() {}};
+struct VirtualPrivateDestructor          { private:   virtual ~VirtualPrivateDestructor() {}};
+
+struct PurePublicDestructor              { public:    virtual ~PurePublicDestructor() = 0; };
+struct PureProtectedDestructor           { protected: virtual ~PureProtectedDestructor() = 0; };
+struct PurePrivateDestructor             { private:   virtual ~PurePrivateDestructor() = 0; };
+
+struct DeletedPublicDestructor           { public:    ~DeletedPublicDestructor() = delete; };
+struct DeletedProtectedDestructor        { protected: ~DeletedProtectedDestructor() = delete; };
+struct DeletedPrivateDestructor          { private:   ~DeletedPrivateDestructor() = delete; };
+
+struct DeletedVirtualPublicDestructor    { public:    virtual ~DeletedVirtualPublicDestructor() = delete; };
+struct DeletedVirtualProtectedDestructor { protected: virtual ~DeletedVirtualProtectedDestructor() = delete; };
+struct DeletedVirtualPrivateDestructor   { private:   virtual ~DeletedVirtualPrivateDestructor() = delete; };
+
+
 int main()
 {
     test_is_destructible<A>();
@@ -72,10 +90,30 @@
     test_is_destructible<char[3]>();
     test_is_destructible<bit_zero>();
     test_is_destructible<int[3]>();
+    test_is_destructible<ProtectedAbstract>();
+    test_is_destructible<PublicAbstract>();
+    test_is_destructible<PrivateAbstract>();
+    test_is_destructible<PublicDestructor>();
+    test_is_destructible<VirtualPublicDestructor>();
+    test_is_destructible<PurePublicDestructor>();
 
     test_is_not_destructible<int[]>();
     test_is_not_destructible<void>();
-    test_is_not_destructible<Abstract>();
+
+    test_is_not_destructible<ProtectedDestructor>();
+    test_is_not_destructible<PrivateDestructor>();
+    test_is_not_destructible<VirtualProtectedDestructor>();
+    test_is_not_destructible<VirtualPrivateDestructor>();
+    test_is_not_destructible<PureProtectedDestructor>();
+    test_is_not_destructible<PurePrivateDestructor>();
+    test_is_not_destructible<DeletedPublicDestructor>();
+    test_is_not_destructible<DeletedProtectedDestructor>();
+    test_is_not_destructible<DeletedPrivateDestructor>();
+
+//     test_is_not_destructible<DeletedVirtualPublicDestructor>(); // currently fails due to clang bug #20268
+    test_is_not_destructible<DeletedVirtualProtectedDestructor>();
+    test_is_not_destructible<DeletedVirtualPrivateDestructor>();
+
 #if __has_feature(cxx_access_control_sfinae) 
     test_is_not_destructible<NotEmpty>();
 #endif
diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp
index a513d52..7871732 100644
--- a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp
@@ -49,7 +49,12 @@
 
 class Abstract
 {
-    virtual ~Abstract() = 0;
+    virtual void foo() = 0;
+};
+
+class AbstractDestructor
+{
+    virtual ~AbstractDestructor() = 0;
 };
 
 struct A
@@ -60,7 +65,7 @@
 int main()
 {
     test_has_not_nothrow_destructor<void>();
-    test_has_not_nothrow_destructor<Abstract>();
+    test_has_not_nothrow_destructor<AbstractDestructor>();
     test_has_not_nothrow_destructor<NotEmpty>();
 
 #if __has_feature(cxx_noexcept)
@@ -79,6 +84,7 @@
     test_is_nothrow_destructible<const int*>();
     test_is_nothrow_destructible<char[3]>();
     test_is_nothrow_destructible<char[3]>();
+    test_is_nothrow_destructible<Abstract>();
 #if __has_feature(cxx_noexcept)
     test_is_nothrow_destructible<bit_zero>();
 #endif
diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
index ebe10e3..1b34885 100644
--- a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
+++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
@@ -49,7 +49,12 @@
 
 class Abstract
 {
-    virtual ~Abstract() = 0;
+    virtual void foo() = 0;
+};
+
+class AbstractDestructor
+{
+    virtual ~AbstractDestructor() = 0;
 };
 
 struct A
@@ -61,9 +66,10 @@
 {
     test_has_not_trivial_destructor<void>();
     test_has_not_trivial_destructor<A>();
-    test_has_not_trivial_destructor<Abstract>();
+    test_has_not_trivial_destructor<AbstractDestructor>();
     test_has_not_trivial_destructor<NotEmpty>();
 
+    test_is_trivially_destructible<Abstract>();
     test_is_trivially_destructible<int&>();
     test_is_trivially_destructible<Union>();
     test_is_trivially_destructible<Empty>();
diff --git a/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp b/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
new file mode 100644
index 0000000..2862762
--- /dev/null
+++ b/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+//
+//  Tuples of smart pointers; based on bug #18350
+//  auto_ptr doesn't have a copy constructor that takes a const &, but tuple does.
+
+#include <tuple>
+#include <memory>
+
+int main () {
+    {
+    std::tuple<std::unique_ptr<char>> up;
+    std::tuple<std::shared_ptr<char>> sp;
+    std::tuple<std::weak_ptr  <char>> wp;
+//     std::tuple<std::auto_ptr  <char>> ap;
+    }
+    {
+    std::tuple<std::unique_ptr<char[]>> up;
+    std::tuple<std::shared_ptr<char[]>> sp;
+    std::tuple<std::weak_ptr  <char[]>> wp;
+//     std::tuple<std::auto_ptr  <char[]>> ap;
+    }
+    {
+    std::tuple<std::unique_ptr<char[5]>> up;
+    std::tuple<std::shared_ptr<char[5]>> sp;
+    std::tuple<std::weak_ptr  <char[5]>> wp;
+//     std::tuple<std::auto_ptr  <char[5]>> ap;
+    }
+}
\ No newline at end of file
diff --git a/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp b/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
new file mode 100644
index 0000000..df5fdff
--- /dev/null
+++ b/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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.
+//
+//===----------------------------------------------------------------------===//
+
+// This is for bugs 18853 and 19118
+
+#if __cplusplus >= 201103L
+
+#include <tuple>
+#include <functional>
+
+struct X
+{
+    X() {}
+
+    template <class T>
+    X(T);
+
+    void operator()() {}
+};
+
+int
+main()
+{
+    X x;
+    std::function<void()> f(x);
+}
+#else
+int main () {}
+#endif
diff --git a/test/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp b/test/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
index 04cb3d5..ca53cd3 100644
--- a/test/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
+++ b/test/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
@@ -17,6 +17,40 @@
 #include <string>
 #include <cassert>
 
+
+template <class ...>
+struct never {
+    enum { value = 0 };
+};
+
+struct NoValueCtor
+{
+    NoValueCtor() : id(++count) {}
+    NoValueCtor(NoValueCtor const & other) : id(other.id) { ++count; }
+
+    // The constexpr is required to make is_constructible instantiate this template.
+    // The explicit is needed to test-around a similar bug with is_convertible.
+    template <class T>
+    constexpr explicit NoValueCtor(T)
+    { static_assert(never<T>::value, "This should not be instantiated"); }
+
+    static int count;
+    int id;
+};
+
+int NoValueCtor::count = 0;
+
+
+struct NoValueCtorEmpty
+{
+    NoValueCtorEmpty() {}
+    NoValueCtorEmpty(NoValueCtorEmpty const &) {}
+
+    template <class T>
+    constexpr explicit NoValueCtorEmpty(T)
+    { static_assert(never<T>::value, "This should not be instantiated"); }
+};
+
 int main()
 {
     {
@@ -56,6 +90,23 @@
         assert(std::get<1>(t) == nullptr);
         assert(std::get<2>(t) == "text");
     }
+    // __tuple_leaf<T> uses is_constructible<T, U> to disable its explicit converting
+    // constructor overload __tuple_leaf(U &&). Evaluating is_constructible can cause a compile error.
+    // This overload is evaluated when __tuple_leafs copy or move ctor is called.
+    // This checks that is_constructible is not evaluated when U == __tuple_leaf.
+    {
+        std::tuple<int, NoValueCtor, int, int> t(1, NoValueCtor(), 2, 3);
+        assert(std::get<0>(t) == 1);
+        assert(std::get<1>(t).id == 1);
+        assert(std::get<2>(t) == 2);
+        assert(std::get<3>(t) == 3);
+    }
+    {
+        std::tuple<int, NoValueCtorEmpty, int, int> t(1, NoValueCtorEmpty(), 2, 3);
+        assert(std::get<0>(t) == 1);
+        assert(std::get<2>(t) == 2);
+        assert(std::get<3>(t) == 3);
+    }
     // extensions
     {
         std::tuple<int, char*, std::string> t(2);
diff --git a/test/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/test/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
index 41e4b66..8dc7d21 100644
--- a/test/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
+++ b/test/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp
@@ -18,6 +18,18 @@
 
 #include "../MoveOnly.h"
 
+struct ConstructsWithTupleLeaf
+{
+    ConstructsWithTupleLeaf() {}
+
+    ConstructsWithTupleLeaf(ConstructsWithTupleLeaf const &) { assert(false); }
+    ConstructsWithTupleLeaf(ConstructsWithTupleLeaf &&) {}
+
+    template <class T>
+    ConstructsWithTupleLeaf(T t)
+    { assert(false); }
+};
+
 int main()
 {
     {
@@ -46,4 +58,12 @@
         assert(std::get<1>(t) == 1);
         assert(std::get<2>(t) == 2);
     }
+    // A bug in tuple caused __tuple_leaf to use its explicit converting constructor
+    //  as its move constructor. This tests that ConstructsWithTupleLeaf is not called
+    // (w/ __tuple_leaf)
+    {
+        typedef std::tuple<ConstructsWithTupleLeaf> d_t;
+        d_t d((ConstructsWithTupleLeaf()));
+        d_t d2(static_cast<d_t &&>(d));
+    }
 }
diff --git a/test/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type1.fail.cpp b/test/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type1.fail.cpp
index ec63a39..d955456 100644
--- a/test/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type1.fail.cpp
+++ b/test/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type1.fail.cpp
@@ -18,7 +18,7 @@
 #if _LIBCPP_STD_VER > 11
     typedef std::complex<float> cf;
     auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" );
-    assert ( std::get<cf>(t1) == cf {1,2} );    // no such type
+    assert (( std::get<cf>(t1) == cf {1,2} )); // no such type
 #else
 #error
 #endif
diff --git a/test/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp b/test/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp
index 1c01ed7..27194ef 100644
--- a/test/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp
+++ b/test/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp
@@ -17,7 +17,7 @@
 #if _LIBCPP_STD_VER > 11
     typedef std::complex<float> cf;
     auto t1 = std::make_pair<int, double> ( 42, 3.4 );
-    assert ( std::get<cf>(t1) == cf {1,2} );    // no such type
+    assert (( std::get<cf>(t1) == cf {1,2} ));  // no such type
 #else
 #error
 #endif
diff --git a/www/cxx1y_status.html b/www/cxx1y_status.html
index 83126a8..ce7f216 100644
--- a/www/cxx1y_status.html
+++ b/www/cxx1y_status.html
@@ -96,7 +96,6 @@
  	<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3779.pdf">3779</a></td><td>LWG</td><td>User-defined Literals for std::complex</td><td>Chicago</td><td>Complete</td><td>3.4</td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3789.htm">3789</a></td><td>LWG</td><td>Constexpr Library Additions: functional</td><td>Chicago</td><td>Complete</td><td>3.4</td></tr>
-	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">3778</a></td><td>CWG</td><td>Sized deallocation</td><td>Chicago</td><td></td><td></td></tr>
  	<tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>
 
 	<tr><td><a href="http://isocpp.org/files/papers/N3924.pdf">3924</a></td><td>LWG</td><td>Discouraging rand() in C++14</td><td>Issaquah</td><td>Complete</td><td>3.5</td></tr>
@@ -133,7 +132,7 @@
   <tr><td></td><td></td><td></td><td></td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2071">2071</a></td><td>std::valarray move-assignment</td><td>Portland</td><td>Complete</td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2074">2074</a></td><td>Off by one error in std::reverse_copy</td><td>Portland</td><td>Complete</td></tr>
-	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2081">2081</a></td><td>Allocator requirements should include CopyConstructible 2083 const-qualification on weak_ptr::owner_before</td><td>Portland</td><td>Complete</td></tr>
+	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2081">2081</a></td><td>Allocator requirements should include CopyConstructible</td><td>Portland</td><td>Complete</td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2083">2083</a></td><td>const-qualification on weak_ptr::owner_before</td><td>Portland</td><td>Complete</td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2086">2086</a></td><td>Overly generic type support for math functions</td><td>Portland</td><td>Complete</td></tr>
 	<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2099">2099</a></td><td>Unnecessary constraints of va_start() usage</td><td>Portland</td><td>Complete</td></tr>
diff --git a/www/debug_mode.html b/www/debug_mode.html
index 6474782..943c47d 100644
--- a/www/debug_mode.html
+++ b/www/debug_mode.html
@@ -11,6 +11,11 @@
 record which parts of libc++ have debug mode support.
 </p>
 
+<p>
+Note: Debug mode is currently not functional. Defining _LIBCPP_DEBUG will result
+in fairly nasty compile errors.
+</p>
+
 <table border=1>
 <tr>
 <th>Section</th>
@@ -151,6 +156,7 @@
 in approximate priority order.
 </p>
 
+<p>Last Updated: 3-June-2014</p>
 
 </body>
 </html>
diff --git a/www/index.html b/www/index.html
index 02470ea..d4adfe7 100644
--- a/www/index.html
+++ b/www/index.html
@@ -103,13 +103,20 @@
   <h2 id="requirements">Platform Support</h2>
   <!--=====================================================================-->
 
-   <p>libc++ is known to work on the following platforms, using g++-4.2 and
-      clang (lack of C++11 language support disables some functionality).</p>
+  <p>
+    libc++ is known to work on the following platforms, using g++-4.2 and
+    clang (lack of C++11 language support disables some functionality). Note
+    that functionality provided by &lt;atomic&gt; is only functional with
+    clang.
+  </p>
 
-    <ul>
-     <li>Mac OS X i386</li>
-     <li>Mac OS X x86_64</li>
-    </ul>
+  <ul>
+    <li>Mac OS X i386</li>
+    <li>Mac OS X x86_64</li>
+    <li>FreeBSD 10+ i386</li>
+    <li>FreeBSD 10+ x86_64</li>
+    <li>FreeBSD 10+ ARM</li>
+  </ul>
 
   <!--=====================================================================-->
   <h2 id="dir-structure">Current Status</h2>
@@ -117,15 +124,35 @@
 
    <p>libc++ is a 100% complete C++11 implementation on Apple's OS X. </p>
    <p>LLVM and Clang can self host in C++ and C++11 mode with libc++ on Linux.</p>
-   <p>C++1Y (C++14) implementation is in progress. The current status is
-       <a href="cxx1y_status.html">here</a></p>
- 
+   <p>libc++ is also a 100% complete C++14 implementation. A list of new features and changes for 
+      C++14 can be found <a href="cxx1y_status.html">here</a>.</p>
+   <p>Implementation of the post-c++14 Technical Specifications is in progress. A list of features and
+      the current status of these features can be found <a href="ts1z_status.html">here</a>.</p>
    <p>
    Ports to other platforms are underway. Here are recent test
    results for <a href="results.Windows.html">Windows</a>
    and <a href="results.Linux.html">Linux</a>.
    </p>
 
+   <!--======================================================================-->
+   <h2 id="dir-structure">Build Bots</h2>
+   <!--======================================================================-->
+   <p>These are the libc++ build bots</p>
+   <ul>
+      <li><a href="http://lab.llvm.org:8013/builders/libcxx_clang-x86_64-darwin11-RA">
+        clang-libcxxabi-x86_64-darwin11
+      </a></li>
+      <li><a href="http://llvm-amd64.freebsd.your.org/b/builders/libcxx-amd64-freebsd">
+        clang-libcxxrt-x86_64-freebsd10
+      </a></li>
+      <li><a href="http://llvm-amd64.freebsd.your.org/b/builders/libcxx-i386-freebsd">
+        clang-libcxxrt-i386-freebsd10
+      </a></li>
+      <li><a href="http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-debian">
+        clang-libcxxabi-x86_64-linux-debian
+      </a></li>
+    </ul>
+
   <!--=====================================================================-->
   <h2>Get it and get involved!</h2>
   <!--=====================================================================-->
@@ -133,12 +160,6 @@
   <p>First please review our
      <a href="http://llvm.org/docs/DeveloperPolicy.html">Developer's Policy</a>.
 
-  <p>To check out the code, use:</p>
-
-  <ul>
-  <li><code>svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx</code></li>
-  </ul>
-
   <p>
      On Mac OS 10.7 (Lion) and later, the easiest way to get this library is to install
      Xcode 4.2 or later.  However if you want to install tip-of-trunk from here
@@ -147,25 +168,106 @@
      <code>/usr/lib</code>.
   </p>
 
-  <p>
-     Next:
-  </p>
-  
+  <p>To check out the code, use:</p>
+
   <ul>
-    <li><code>cd libcxx/lib</code></li>
-    <li><code>export TRIPLE=-apple-</code></li>
-    <li><code>./buildit</code></li>
-    <li><code>ln -sf libc++.1.dylib libc++.dylib</code></li>
+  <li><code>svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx</code></li>
   </ul>
-  
+
   <p>
-     That should result in a libc++.1.dylib and libc++.dylib.  The safest thing
-     to do is to use it from where your libcxx is installed instead of replacing
-     these in your Mac OS.
+    Note that for an in-tree build, you should check out libcxx to
+    llvm/projects.
   </p>
 
   <p>
-  To use your system-installed libc++ with clang you can:
+    The following instructions are for building libc++ on FreeBSD, Linux, or Mac
+    using <a href="http://libcxxabi.llvm.org/">libc++abi</a> as the C++ ABI
+    library. On Linux, it is also possible to use
+    <a href="#libsupcxx">libsupc++</a> or <a href="#libcxxrt">libcxxrt</a>.
+  </p>
+
+  <p>In-tree build:</p>
+  <ul>
+    <li>Check out libcxx and <a href="http://libcxxabi.llvm.org/">libcxxabi</a>
+      into llvm/projects</li>
+    <li><code>cd llvm</code></li>
+    <li><code>mkdir build &amp;&amp; cd build</code></li>
+    <li><code>cmake .. # Linux may require -DCMAKE_C_COMPILER=clang
+        -DCMAKE_CXX_COMPILER=clang++</code></li>
+    <li><code>make cxx</code></li>
+  </ul>
+
+  <p>Out-of-tree build:</p>
+  <ul>
+    <li>Check out libcxx</li>
+    <li>If not on a Mac, also check out
+      <a href="http://libcxxabi.llvm.org/">libcxxabi</a></li>
+    <li><code>cd libcxx</code></li>
+    <li><code>mkdir build &amp;&amp; cd build</code></li>
+    <li><code>cmake -DLIBCXX_CXX_ABI=libcxxabi
+        -DLIBCXX_LIBCXXABI_INCLUDE_PATHS=path/to/libcxxabi/include
+        -DLIT_EXECUTABLE=path/to/llvm/utils/lit/lit.py .. # Linux may require
+        -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
+    <li><code>make</code></li>
+  </ul>
+
+  <p>To run the tests:</p>
+  <ul>
+  <li><code>make check-libcxx</code></li>
+  </ul>
+
+  <p>If you wish to run a subset of the test suite:</p>
+  <ul>
+    <li><code>cd path/to/libcxx/libcxx</code></li>
+    <li><code>alias lit='python path/to/llvm/utils/lit/lit.py'</code></li>
+    <li><code>ln -s path/to/build/dir/projects/libcxx/test/lit.site.cfg
+        test/lit.site.cfg</code></li>
+    <li><code>lit -sv test/re/ # or whichever subset of tests you're interested
+        in</code></li>
+  </ul>
+  <p>The above is currently quite inconvenient. Sorry! We're working on it!</p>
+
+  <p>More information on using LIT can be found
+    <a href="http://llvm.org/docs/CommandGuide/lit.html">here</a>. For more
+    general information about the LLVM testing infrastructure, see the
+    <a href="http://llvm.org/docs/TestingGuide.html">LLVM Testing Infrastructure
+      Guide</a>
+  </p>
+
+  <p>
+    Shared libraries for libc++ should now be present in llvm/build/lib. Note
+    that it is safest to use this from its current location rather than
+    replacing your system's libc++ (if it has one, if not, go right ahead).
+  </p>
+
+  <p>
+    Mac users, remember to be careful when replacing the system's libc++.
+    <strong>Your system will not be able to boot without a funcioning
+    libc++.</strong>
+  </p>
+
+  <!--=====================================================================-->
+  <h3>Notes</h3>
+  <!--=====================================================================-->
+
+  <p>
+    Building libc++ with <code>-fno-rtti</code> is not supported.  However
+    linking against it with <code>-fno-rtti</code> is supported.
+  </p>
+
+  <p>Send discussions to the
+    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">clang mailing list</a>.</p>
+
+  <!--=====================================================================-->
+  <h2>Using libc++ in your programs</h2>
+  <!--=====================================================================-->
+
+  <!--=====================================================================-->
+  <h3>FreeBSD and Mac OS X</h3>
+  <!--=====================================================================-->
+
+  <p>
+    To use your system-installed libc++ with clang you can:
   </p>
 
   <ul>
@@ -174,41 +276,66 @@
   </ul>
 
   <p>
-  To use your tip-of-trunk libc++ on Mac OS with clang you can:
+    To use your tip-of-trunk libc++ on Mac OS with clang you can:
   </p>
 
   <ul>
-    <li><code>export DYLD_LIBRARY_PATH=&lt;path-to-libcxx&gt;/lib</code>
+    <li><code>export DYLD_LIBRARY_PATH=path/to/build/lib</code>
     <li><code>clang++ -std=c++11 -stdlib=libc++ -nostdinc++
          -I&lt;path-to-libcxx&gt;/include -L&lt;path-to-libcxx&gt;/lib
          test.cpp</code></li>
   </ul>
 
-  <p>To run the libc++ test suite (recommended):</p>
+  <!--=====================================================================-->
+  <h3>Linux</h3>
+  <!--=====================================================================-->
+
+  <p>
+    You will need to keep the source tree of
+    <a href="http://libcxxabi.llvm.org">libc++abi</a> available on your build
+    machine and your copy of the libc++abi shared library must be placed where
+    your linker will find it.
+  </p>
+
+  <p>
+    Unfortunately you can't simply run clang with "-stdlib=libc++" at this
+    point, as clang is set up to link for libc++ linked to libsupc++.  To get
+    around this you'll have to set up your linker yourself (or patch clang).
+    For example:
+  </p>
 
   <ul>
-  <li><code>cd libcxx/test</code></li>
-  <li><code>./testit</code></li>
-     <ul>
-       <li>You can alter the command line options <code>testit</code> uses
-       with <code>export OPTIONS="whatever you need"</code></li>
-     </ul>
+    <li><code>clang++ -stdlib=libc++ helloworld.cpp -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc</code></li>
+  </ul>
+
+  <p>
+    Alternately, you could just add libc++abi to your libraries list, which in
+    most situations will give the same result:
+  </p>
+
+  <ul>
+    <li><code>clang++ -stdlib=libc++ helloworld.cpp -lc++abi</code></li>
   </ul>
 
   <!--=====================================================================-->
-  <h3>Notes</h3>
+  <h2>Bug reports and patches</h2>
   <!--=====================================================================-->
 
 <p>
-Building libc++ with <code>-fno-rtti</code> is not supported.  However linking
-against it with <code>-fno-rtti</code> is supported.
+If you think you've found a bug in libc++, please report it using 
+the <a href="http://llvm.org/bugs">LLVM Bugzilla</a>. If you're not sure, you
+can post a message to the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a> 
+mailing list or on IRC. Please include "libc++" in your subject.
 </p>
 
-  <p>Send discussions to the
-  (<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">clang mailing list</a>).</p>
+<p>
+If you want to contribute a patch to libc++, the best place for that is the
+<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a> 
+mailing list. Please include "libc++" and "PATCH" in your subject.
+</p>
 
   <!--=====================================================================-->
-  <h2>Build on Linux using CMake and libsupc++.</h2>
+  <h2 id="libsupcxx">Build on Linux using CMake and libsupc++.</h2>
   <!--=====================================================================-->
 
   <p>
@@ -269,44 +396,7 @@
   </p>
 
   <!--=====================================================================-->
-  <h2>Build on Linux using CMake and libc++abi.</h2>
-  <!--=====================================================================-->
-
-  <p>
-     You will need to keep the source tree of <a href="http://libcxxabi.llvm.org">libc++abi</a>
-     available on your build machine and your copy of the libc++abi shared library must
-     be placed where your linker will find it.
-  </p>
-  
-  <p>
-     We can now run CMake:
-     <ul>
-       <li><code>CC=clang CXX=clang++ cmake -G "Unix Makefiles"
-                -DLIBCXX_CXX_ABI=libcxxabi
-                -DLIBCXX_LIBCXXABI_INCLUDE_PATHS="&lt;libc++abi-source-dir&gt;/include"
-                -DCMAKE_BUILD_TYPE=Release
-                -DCMAKE_INSTALL_PREFIX=/usr
-                &lt;libc++-source-dir&gt;</code></li>
-       <li><code>make</code></li>
-       <li><code>sudo make install</code></li>
-     </ul>
-     <p>
-        Unfortunately you can't simply run clang with "-stdlib=libc++" at this point, as
-        clang is set up to link for libc++ linked to libsupc++.  To get around this
-        you'll have to set up your linker yourself (or patch clang).  For example,
-        <ul>
-          <li><code>clang++ -stdlib=libc++ helloworld.cpp -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc</code></li>
-        </ul>
-        Alternately, you could just add libc++abi to your libraries list, which in most
-        situations will give the same result:
-        <ul>
-          <li><code>clang++ -stdlib=libc++ helloworld.cpp -lc++abi</code></li>
-        </ul>
-     </p>
-  </p>
-
-  <!--=====================================================================-->
-  <h2>Build on Linux using CMake and libcxxrt.</h2>
+  <h2 id="libcxxrt">Build on Linux using CMake and libcxxrt.</h2>
   <!--=====================================================================-->
 
   <p>
diff --git a/www/results.Linux.html b/www/results.Linux.html
index 5e3eaf1..82416a3 100644
--- a/www/results.Linux.html
+++ b/www/results.Linux.html
@@ -5,118 +5,509 @@
 </head>
 <body>
 <pre>
+All failures in the libc++ test suite will be documented here.
+Note: glibc >= 2.16 is required for full C11 compatibility.
 
-All failures in the libc++ test suite will be documented here. Last
-run was with Clang (pre-3.2) on Debian unstable x86_64 with eglibc
-2.13 and kernel 3.2.0-3-amd64. The ABI library used was libc++abi.
+Test Suite Run Information:
+Date: 8/18/2014
+Compiler: Clang Tip-of-Tree (r215809)
+ABI: libc++abi
+C Library: eglibc 2.19
+Platform: x86_64-linux-gnu
+Kernel: 3.13.0-32-generic
+Distribution: Ubuntu 14.04
+Run By: Eric Fiselier (eric at efcs dot ca)
 
-depr/
- depr.c.headers/
-  math_h.pass.cpp: Fails a static assert that the return type of
-   isnan(double) and isinf(double) is a bool.
- uchar_h.pass.cpp:
-   My libc doesn't seem to provide uchar.h yet.
- exception.unexpected/
-  set.unexpected/
-   get_unexpected.pass.cpp: This seems to be a problem with libc++abi:
-    its default unexpected handler does not call the terminate handler?
-   set_unexpected.pass.cpp: idem.
-diagnostics/
- syserr/
-  syserr.errcat/
-   syserr.errcat.objects/
-    system_category.pass.cpp: Always maps back to generic category
-     when it should stay system category, because the implementation
-     dependson ELAST, which Linux lacks.
-input.output/
- iostream.format/
-  ext.manip/
-   get_time.pass.cpp: Local representation is 'Sat 31 Dec 2061
-    11:55:59 PM EST' which does not match the expected result in the
-    test.
-   put_time.pass.cpp: idem.
-language.support/
- support.start.term/
-  quick_exit.pass.cpp: Fails because it doesn't know about
-   std::at_quick_exit. Interestingly my libc does seem to know about
-   std::[at_]quick_exit, so this needs some investigation.
-localization/
- locale.categories/
-  category.collate/
-   locale.collate.byname/
-    compare.pass.cpp: In the C local, sorting order seems OK, but not
-     in the &quot&quot and en UTF8 locals. Needs investigation.
-  category.ctype/
-   locale.codecvt/
-    locale.codecvt.members/
-     wchar_t_out.pass.cpp: Needs investigation.
-    widen_1.pass.cpp: Fails due to not converting some out of bounds
-     characters the same way as expected. Needs investigation.
-    widen_many.pass.cpp: idem.
-  category.monetary/
-   locale.money.get/
-    locale.money.get.members/
-     get_long_double_ru_RU.pass.cpp: Needs investigation.
-     get_long_double_zh_CN.pass.cpp: idem.
-    locale.money.put.members/
-     put_long_double_ru_RU.pass.cpp: idem.
-     put_long_double_zh_CN.pass.cpp: idem.
-   locale.moneypunct.byname/
-    decimal_point.pass.cpp: Expects ',' for RU, but gets '.'.
-    thousands_sep.pass.cpp: idem.
-  category.numeric/
-   locale.nm.put/
-    facet.num.put.members/
-     put_long_double.pass.cpp: Fails due to getting '+nan' rather
-      than just 'nan'.
-  category.time/
-   locale.time.get.byname/
-    get_date.pass.cpp: Needs investigation.
-    get_date_wide.pass.cpp: idem.
-    get_monthname.pass.cpp: idem.
-    get_monthname_wide.pass.cpp: idem.
-    get_one.pass.cpp: idem.
-    get_one_wide.pass.cpp: idem.
-    get_weekday.pass.cpp: idem.
-    get_weekday_wide.pass.cpp: idem.
-   locale.time.put.byname/
-    put1.pass.cpp: idem.
-   locale.time.put/
-    locale.time.put.members/
-     put2.pass.cpp: idem.
-  facet.numpunct/
-   locale.numpunct.byname/
-    grouping.pass.cpp: idem.
-    thousands_sep.pass.cpp: idem.
-numerics/
- c.math/
-  cmath.pass.cpp: Fails for same reason as depr/depr.c.headers/math_h.pass.cpp
-re/
- re.alg/
-  re.alg.match/
-   awk.pass.cpp: Needs investigation.
-   basic.pass.cpp: idem.
-   ecma.pass.cpp: idem.
-   extended.pass.cpp: idem.
-  re.alg.search/
-   awk.pass.cpp: idem.
-   basic.pass.cpp: idem.
-   ecma.pass.cpp: idem.
-   extended.pass.cpp: idem.
- re.traits/
-  lookup_collatename.pass.cpp: idem.
-strings/
- c.strings/
-  cuchar.pass.cpp: Can't find cuchar header
-  version_cuchar.pass.cpp: idem.
-utilities/
- memory/
-  unique.ptr/
-   unique.ptr.runtime/
-    unique.ptr.runtime.ctor/
-     default02.pass.cpp:
-      test previously passed, recently started crashing clang. Needs investigation.
-     pointer02.pass.cpp: idem.
+
+Testing Time: 1187.82s
+********************
+Failing Tests (33):
+    libc++ :: localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
+        - GLIBC's locales collate strings differently. Needs investigation.
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
+        - Needs Investigation.
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
+        - Idem
+    libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
+        - Idem
+    libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+        - Differences in GLIBC locales. Needs investigation.
+    libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+        - Differences in GLIBC locales. Puts '-' before 'CNY' as opposed to after.
+    libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+        - Differences in GLIBC locales. Needs investigation.
+    libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+        - Differences in GLIBC locales. Puts '-' before 'CNY' as opposed to after.
+    libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
+        - Expects ',' for ru_RU but gets '.'.
+    libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
+        - Expects ',' for ru_RU but gets '.'.
+    libc++ :: localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+        - GLIBC puts "+nan" where "nan" is expected.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+        - GLIBC has different locale data for fr_FR, ru_RU and zh_CN.
+          The is also a possible bug in zh_CN tests. Needs investigation.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
+        - Some test cases are non-portible with GLIBC (include time zone).
+          Other failures related to GLIBC locale data. Needs investigation.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
+        - GLIBC starts weekdays with lowercase letters. Test case expectes upper case.
+    libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
+        - Idem.
+    libc++ :: localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+        - GLIBC abbreviated days end with '.'. Test case expects no '.'.
+    libc++ :: localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
+        - Needs investigation.
+    libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
+        - Fails due to differences in GLIBC locales
+    libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+        - Fails due to differences in GLIBC locales
+    libc++ :: re/re.alg/re.alg.match/basic.pass.cpp
+        - Needs investigation.
+    libc++ :: re/re.alg/re.alg.match/ecma.pass.cpp
+        - Idem.
+    libc++ :: re/re.alg/re.alg.match/extended.pass.cpp
+        - Idem.
+    libc++ :: re/re.alg/re.alg.search/awk.pass.cpp
+        - Idem.
+    libc++ :: re/re.alg/re.alg.search/basic.pass.cpp
+        - Idem.
+    libc++ :: re/re.alg/re.alg.search/ecma.pass.cpp
+        - Idem.
+    libc++ :: re/re.alg/re.alg.search/extended.pass.cpp
+        - Idem.
+    libc++ :: re/re.traits/lookup_collatename.pass.cpp
+        - Idem.
+    libc++ :: re/re.traits/translate_nocase.pass.cpp
+        - Idem.
+
+********************
+Expected Failing Tests (5):
+    libc++ :: depr/depr.c.headers/math_h.pass.cpp
+        - Fails a static assert that the return type of
+          isnan(double) and isinf(double) is a bool. see PR18382.
+    libc++ :: numerics/c.math/cmath_isinf.pass.cpp
+        - Idem.
+    libc++ :: numerics/c.math/cmath_isnan.pass.cpp
+        - Idem.
+    libc++ :: strings/c.strings/cuchar.pass.cpp
+        - &lt;cuchar&gt; is not implemented.
+    libc++ :: strings/c.strings/version_cuchar.pass.cpp
+        - Idem.
+
+  Expected Passes    : 4716
+  Expected Failures  : 5
+  Unexpected Failures: 33
+
+********************************************************************************
+
+-- Testing: 4754 tests, 2 threads --
+FAIL: libc++ :: localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp (2073 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp4DtKocexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp4DtKocexe'
+Exit Code: -6
+Standard Error:
+--
+tmp4DtKocexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp:38: int main(): Assertion `f.compare(s2.data(), s2.data() + s2.size(), s3.data(), s3.data() + s3.size()) == 1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp (2152 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpAfkClkexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpAfkClkexe'
+Exit Code: -6
+Standard Error:
+--
+tmpAfkClkexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp:38: int main(): Assertion `f.tolower('\xDA') == '\xFA'' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp (2153 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpGjakKeexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpGjakKeexe'
+Exit Code: -6
+Standard Error:
+--
+tmpGjakKeexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp:35: int main(): Assertion `in[0] == '\xFA'' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp (2154 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp0gK3Y6exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp0gK3Y6exe'
+Exit Code: -6
+Standard Error:
+--
+tmp0gK3Y6exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp:39: int main(): Assertion `f.toupper('\xFA') == '\xDA'' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp (2155 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpCoF624exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpCoF624exe'
+Exit Code: -6
+Standard Error:
+--
+tmpCoF624exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp:35: int main(): Assertion `in[0] == '\xDA'' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp (2157 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpjOo8fnexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpjOo8fnexe'
+Exit Code: -6
+Standard Error:
+--
+tmpjOo8fnexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp:53: int main(): Assertion `f.widen(char(-5)) == wchar_t(251)' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp (2158 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpDWZ5aNexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpDWZ5aNexe'
+Exit Code: -6
+Standard Error:
+--
+tmpDWZ5aNexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp:60: int main(): Assertion `v[6] == wchar_t(133)' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp (2184 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpfA5HOrexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpfA5HOrexe'
+Exit Code: -6
+Standard Error:
+--
+tmpfA5HOrexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp:71: int main(): Assertion `iter.base() == v.data() + v.size()' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp (2185 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpTI59qtexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpTI59qtexe'
+Exit Code: -6
+Standard Error:
+--
+tmpTI59qtexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp:314: int main(): Assertion `iter.base() == v.data() + v.size()' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp (2192 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp1psSk2exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp1psSk2exe'
+Exit Code: -6
+Standard Error:
+--
+tmp1psSk2exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp:70: int main(): Assertion `ex == "0,00 "' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp (2193 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpKwjbrPexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpKwjbrPexe'
+Exit Code: -6
+Standard Error:
+--
+tmpKwjbrPexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp:218: int main(): Assertion `ex == "CNY -0.01"' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp (2198 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp4UnNQ2exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp4UnNQ2exe'
+Exit Code: -6
+Standard Error:
+--
+tmp4UnNQ2exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp:114: int main(): Assertion `f.decimal_point() == ','' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp (2205 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp6MGZAmexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp6MGZAmexe'
+Exit Code: -6
+Standard Error:
+--
+tmp6MGZAmexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp:114: int main(): Assertion `f.thousands_sep() == ' '' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp (2229 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp7AME77exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp7AME77exe'
+Exit Code: -6
+Standard Error:
+--
+tmp7AME77exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp:10886: void test5(): Assertion `ex == "nan"' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp (2249 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpooRjFgexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpooRjFgexe'
+Exit Code: -6
+Standard Error:
+--
+tmpooRjFgexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp:64: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp (2250 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpcm_vb9exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpcm_vb9exe'
+Exit Code: -6
+Standard Error:
+--
+tmpcm_vb9exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp:64: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp (2253 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpLKJQXHexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpLKJQXHexe'
+Exit Code: -6
+Standard Error:
+--
+tmpLKJQXHexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp:51: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp (2254 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpiDgYiqexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpiDgYiqexe'
+Exit Code: -6
+Standard Error:
+--
+tmpiDgYiqexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp:51: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp (2257 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpAUaH78exe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpAUaH78exe'
+Exit Code: -6
+Standard Error:
+--
+tmpAUaH78exe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp:74: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp (2258 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp7iGNTDexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp7iGNTDexe'
+Exit Code: -6
+Standard Error:
+--
+tmp7iGNTDexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp:72: int main(): Assertion `i.base() == in+sizeof(in)/sizeof(in[0])-1' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp (2277 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpnT0vVFexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpnT0vVFexe'
+Exit Code: -6
+Standard Error:
+--
+tmpnT0vVFexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp:73: int main(): Assertion `(ex == "Today is Samedi which is abbreviated Sam.")|| (ex == "Today is samedi which is abbreviated sam." )' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp (2281 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp47THCHexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp47THCHexe'
+Exit Code: -6
+Standard Error:
+--
+tmp47THCHexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp:185: int main(): Assertion `ex == "May"' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp (2285 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpn6fLHJexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpn6fLHJexe'
+Exit Code: -6
+Standard Error:
+--
+tmpn6fLHJexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp:57: int main(): Assertion `np.grouping() == "\x7F"' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp (2286 of 4754)
+******************** TEST 'libc++ :: localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpkna8llexe' '/home/eric/workspace/staging-libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpkna8llexe'
+Exit Code: -6
+Standard Error:
+--
+tmpkna8llexe: /home/eric/workspace/staging-libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp:57: int main(): Assertion `np.thousands_sep() == ','' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.match/basic.pass.cpp (3203 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.match/basic.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmp0wkTrlexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmp0wkTrlexe'
+Exit Code: -6
+Standard Error:
+--
+tmp0wkTrlexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp:624: int main(): Assertion `std::regex_match(s, m, std::regex("[a[=M=]z]", std::regex_constants::basic))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.match/ecma.pass.cpp (3204 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.match/ecma.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpghcl7yexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpghcl7yexe'
+Exit Code: -6
+Standard Error:
+--
+tmpghcl7yexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp:585: int main(): Assertion `std::regex_match(s, m, std::regex("[a[=M=]z]"))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.match/extended.pass.cpp (3208 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.match/extended.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpGVUdIMexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpGVUdIMexe'
+Exit Code: -6
+Standard Error:
+--
+tmpGVUdIMexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp:622: int main(): Assertion `std::regex_match(s, m, std::regex("[a[=M=]z]", std::regex_constants::extended))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.search/awk.pass.cpp (3218 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.search/awk.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpgFuw4cexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpgFuw4cexe'
+Exit Code: -6
+Standard Error:
+--
+tmpgFuw4cexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp:694: int main(): Assertion `std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::awk))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.search/basic.pass.cpp (3219 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.search/basic.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpXeQuwGexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpXeQuwGexe'
+Exit Code: -6
+Standard Error:
+--
+tmpXeQuwGexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp:696: int main(): Assertion `std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::basic))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.search/ecma.pass.cpp (3220 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.search/ecma.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpvGAAImexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpvGAAImexe'
+Exit Code: -6
+Standard Error:
+--
+tmpvGAAImexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp:675: int main(): Assertion `std::regex_search(s, m, std::regex("[a[=M=]z]"))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.alg/re.alg.search/extended.pass.cpp (3224 of 4754)
+******************** TEST 'libc++ :: re/re.alg/re.alg.search/extended.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpGvouurexe' '/home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpGvouurexe'
+Exit Code: -6
+Standard Error:
+--
+tmpGvouurexe: /home/eric/workspace/staging-libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp:694: int main(): Assertion `std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::extended))' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.traits/lookup_collatename.pass.cpp (3349 of 4754)
+******************** TEST 'libc++ :: re/re.traits/lookup_collatename.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpItXmtJexe' '/home/eric/workspace/staging-libcxx/test/re/re.traits/lookup_collatename.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpItXmtJexe'
+Exit Code: -6
+Standard Error:
+--
+tmpItXmtJexe: /home/eric/workspace/staging-libcxx/test/re/re.traits/lookup_collatename.pass.cpp:31: void test(const char_type *, const std::basic_string<char_type> &) [char_type = char]: Assertion `t.lookup_collatename(F(A), F(A + t.length(A))) == expected' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
+FAIL: libc++ :: re/re.traits/translate_nocase.pass.cpp (3354 of 4754)
+******************** TEST 'libc++ :: re/re.traits/translate_nocase.pass.cpp' FAILED ********************
+Compiled With: '/opt/llvm-tot/bin/clang++' '-o' '/tmp/tmpGsRNu3exe' '/home/eric/workspace/staging-libcxx/test/re/re.traits/translate_nocase.pass.cpp' '-nostdinc++' '-std=c++11' '-D__STDC_FORMAT_MACROS' '-D__STDC_LIMIT_MACROS' '-D__STDC_CONSTANT_MACROS' '-I/home/eric/workspace/staging-libcxx/test/../include' '-I/home/eric/workspace/staging-libcxx/test/../test/support' '-nodefaultlibs' '-L/home/eric/workspace/build-libcxx-staging/lib' '-lc++' '-lc++abi' '-lgcc_eh' '-lc' '-lm' '-lpthread' '-lrt' '-lgcc_s' '-Wl,-R' '/home/eric/workspace/build-libcxx-staging/lib'
+Command: '/tmp/tmpGsRNu3exe'
+Exit Code: -6
+Standard Error:
+--
+tmpGsRNu3exe: /home/eric/workspace/staging-libcxx/test/re/re.traits/translate_nocase.pass.cpp:44: int main(): Assertion `t.translate_nocase('\xDA') == '\xFA'' failed.
+--
+
+Compiled test failed unexpectedly!
+********************
 </pre>
 </body>
 </html>
diff --git a/www/ts1z_status.html b/www/ts1z_status.html
new file mode 100644
index 0000000..c06ef7b
--- /dev/null
+++ b/www/ts1z_status.html
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+          "http://www.w3.org/TR/html4/strict.dtd">
+<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
+<html>
+<head>
+  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+  <title>libc++ C++1Y Status</title>
+  <link type="text/css" rel="stylesheet" href="menu.css">
+  <link type="text/css" rel="stylesheet" href="content.css">
+</head>
+
+<body>
+<div id="menu">
+  <div>
+    <a href="http://llvm.org/">LLVM Home</a>
+  </div>
+
+  <div class="submenu">
+    <label>libc++ Info</label>
+    <a href="/index.html">About</a>
+  </div>
+
+  <div class="submenu">
+    <label>Quick Links</label>
+    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
+    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a>
+    <a href="http://llvm.org/bugs/">Bug Reports</a>
+    <a href="http://llvm.org/svn/llvm-project/libcxx/trunk/">Browse SVN</a>
+    <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/">Browse ViewVC</a>
+  </div>
+</div>
+
+<div id="content">
+  <!--*********************************************************************-->
+  <h1>Post-C++14 TS Implementation Status</h1>
+  <!--*********************************************************************-->
+
+  <p>In April 2013, the C++ standard committee approved the draft for the next version of the C++ standard, known as "C++1Y" (probably to be C++14)</p>
+  <p>The draft standard includes papers and issues that were voted on at the previous three meetings (Kona, Portland, and Bristol)</p>
+  <p>This page shows the status of libc++; the status of clang's support of the language features is <a href="http://clang.llvm.org/cxx_status.html">here</a>.</p>
+
+  <h3>Technical Specifications</h3>
+  <table id="TS" border="1">
+	<tr><th>Paper Number</th><th>TS Title</th></tr>
+
+	<tr><td>4023</td><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4023.html">C++ Extensions for Library Fundamentals</a></td></tr>
+	<tr><td>3940</td><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3940.html">Technical Specification - File System</a></td></tr>
+	<tr><td></td><td></td></tr>
+  </table>
+
+  <h3>Features in Library Fundamentals</h3>
+  <table id="Features" border="1">
+	<tr><th>Feature Name</th><th>Status</th></tr>
+	<tr><td>Uses-allocator construction</td><td>Not started</td></tr>
+	<tr><td>Changes to std::shared_ptr and weak_ptr</td><td>Not started</td></tr>
+	<tr><td>Additions to std::function</td><td>Not started</td></tr>
+	<tr><td>Changes to std::common_type</td><td>Not started</td></tr>
+	<tr><td>Changes to std::iterator_traits</td><td>Not started</td></tr>
+	<tr><td>Additions to std::promise</td><td>Not started</td></tr>
+	<tr><td>Additions to std::packaged_task</td><td>Not started</td></tr>
+  <tr><td></td><td></td></tr>
+	<tr><td>Class erased_type</td><td>Not started</td></tr>
+	<tr><td>Calling a function with a tuple of arguments</td><td>Not started</td></tr>
+	<tr><td>Other type transformations</td><td>Not started</td></tr>
+	<tr><td>Compile-time Rational Arithmetic</td><td>Not started</td></tr>
+	<tr><td>Time Utilities</td><td>Not started</td></tr>
+	<tr><td>System Error Support</td><td>Not started</td></tr>
+  <tr><td></td><td></td></tr>
+	<tr><td>Searchers</td><td>Not started</td></tr>
+	<tr><td>Optional Objects</td><td>Initial implementation complete</td></tr>
+	<tr><td>class any</td><td>Not started</td></tr>
+	<tr><td>string_view</td><td>Implementation in progress</td></tr>
+	<tr><td>memory</td><td>Not started</td></tr>
+	<tr><td>Algorithms library</td><td>Not started</td></tr>
+	<tr><td>Networking</td><td>Not started</td></tr>
+
+  </table>
+
+  <h3>Features in Filesystem</h3>
+  <table id="Features" border="1">
+	<tr><th>Feature Name</th><th>Status</th></tr>
+	<tr><td>All features</td><td>Not started</td></tr>
+
+  </table>
+
+  <p>Last Updated: 2-June-2014</p>
+</div>
+</body>
+</html>