diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst
index 694882dd263..993ce2cca5f 100644
--- a/docs/DesignDocs/VisibilityMacros.rst
+++ b/docs/DesignDocs/VisibilityMacros.rst
@@ -90,20 +90,21 @@ Visibility Macros
The macro has an empty definition with GCC.
**Windows Behavior**: `extern template` and `dllexport` are fundamentally
- incompatible *on a template class* on Windows; the former suppresses
+ incompatible *on a class template* on Windows; the former suppresses
instantiation, while the latter forces it. Specifying both on the same
- declaration makes the template class be instantiated, which is not desirable
+ declaration makes the class template be instantiated, which is not desirable
inside headers. This macro therefore expands to `dllimport` outside of libc++
but nothing inside of it (rather than expanding to `dllexport`); instead, the
explicit instantiations themselves are marked as exported. Note that this
- applies *only* to extern template *classes*. Extern template *functions* obey
+ applies *only* to extern *class* templates. Extern *function* templates obey
regular import/export semantics, and applying `dllexport` directly to the
- extern template declaration is the correct thing to do for them.
+ extern template declaration (i.e. using `_LIBCPP_FUNC_VIS`) is the correct
+ thing to do for them.
**_LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS**
Mark the member functions, typeinfo, and vtable of an explicit instantiation
of a class template as being exported by the libc++ library. This attribute
- must be specified on all template class explicit instantiations.
+ must be specified on all class template explicit instantiations.
It is only necessary to mark the explicit instantiation itself (as opposed to
the extern template declaration) as exported on Windows, as discussed above.
diff --git a/include/__config b/include/__config
index 003e1ea60c6..f15d2d06e56 100644
--- a/include/__config
+++ b/include/__config
@@ -229,8 +229,9 @@
# define _LIBCPP_SHORT_WCHAR 1
// Both MinGW and native MSVC provide a "MSVC"-like enviroment
# define _LIBCPP_MSVCRT_LIKE
-// If mingw not explicitly detected, assume using MS C runtime only.
-# ifndef __MINGW32__
+// If mingw not explicitly detected, assume using MS C runtime only if
+// a MS compatibility version is specified.
+# if defined(_MSC_VER) && !defined(__MINGW32__)
# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
# endif
# if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
@@ -625,7 +626,6 @@ namespace std {
#define _LIBCPP_HIDDEN
#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
#define _LIBCPP_TEMPLATE_VIS
-#define _LIBCPP_FUNC_VIS_ONLY
#define _LIBCPP_ENUM_VIS
#if defined(_LIBCPP_COMPILER_MSVC)
@@ -684,10 +684,6 @@ namespace std {
# endif
#endif
-#ifndef _LIBCPP_FUNC_VIS_ONLY
-# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
-#endif
-
#ifndef _LIBCPP_EXTERN_VIS
# define _LIBCPP_EXTERN_VIS
#endif
@@ -925,8 +921,10 @@ template struct __static_assert_check {};
# define _LIBCPP_STD_VER 11
# elif __cplusplus <= 201402L
# define _LIBCPP_STD_VER 14
+# elif __cplusplus <= 201703L
+# define _LIBCPP_STD_VER 17
# else
-# define _LIBCPP_STD_VER 16 // current year, or date of c++17 ratification
+# define _LIBCPP_STD_VER 18 // current year, or date of c++2a ratification
# endif
#endif // _LIBCPP_STD_VER
diff --git a/include/algorithm b/include/algorithm
index 9fe0361e577..4542275adfd 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -4234,10 +4234,6 @@ sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last, _Compare __comp)
_VSTD::sort<_Tp*, _Comp_ref>(__first.base(), __last.base(), __comp);
}
-#ifdef _LIBCPP_MSVC
-#pragma warning( push )
-#pragma warning( disable: 4231)
-#endif // _LIBCPP_MSVC
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less&, char*>(char*, char*, __less&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less&, wchar_t*>(wchar_t*, wchar_t*, __less&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less&, signed char*>(signed char*, signed char*, __less&))
@@ -4271,9 +4267,6 @@ _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less&, long double*>(long double*, long double*, __less&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS unsigned __sort5<__less&, long double*>(long double*, long double*, long double*, long double*, long double*, __less&))
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
// lower_bound
diff --git a/include/string b/include/string
index 010a4c7816e..cf42f529c70 100644
--- a/include/string
+++ b/include/string
@@ -578,14 +578,7 @@ __basic_string_common<__b>::__throw_out_of_range() const
_VSTD::__throw_out_of_range("basic_string");
}
-#ifdef _LIBCPP_MSVC
-#pragma warning( push )
-#pragma warning( disable: 4231 )
-#endif // _LIBCPP_MSVC
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __basic_string_common)
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
#ifdef _LIBCPP_NO_EXCEPTIONS
template
@@ -4006,7 +3999,7 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator*
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string)
-_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&))
+_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS string operator+, allocator >(char const*, string const&))
#if _LIBCPP_STD_VER > 11
// Literal suffixes for basic_string [basic.string.literals]
diff --git a/include/vector b/include/vector
index ee19fb7081a..6e9920a0f80 100644
--- a/include/vector
+++ b/include/vector
@@ -310,14 +310,7 @@ __vector_base_common<__b>::__throw_out_of_range() const
_VSTD::__throw_out_of_range("vector");
}
-#ifdef _LIBCPP_MSVC
-#pragma warning( push )
-#pragma warning( disable: 4231 )
-#endif // _LIBCPP_MSVC
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __vector_base_common)
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
template
class __vector_base
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 9fc0d139433..578651423f3 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -258,7 +258,7 @@ if (LIBCXX_ENABLE_STATIC)
set(MERGE_ARCHIVES_SEARCH_PATHS "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
endif()
if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR
- (${LIBCXX_CXX_ABI_LIBRARY} STREQUAL "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))
+ (${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))
set(MERGE_ARCHIVES_ABI_TARGET "$")
else()
set(MERGE_ARCHIVES_ABI_TARGET
diff --git a/test/support/test_macros.h b/test/support/test_macros.h
index cc2918a0875..95270e43790 100644
--- a/test/support/test_macros.h
+++ b/test/support/test_macros.h
@@ -81,8 +81,11 @@
# define TEST_STD_VER 11
#elif __cplusplus <= 201402L
# define TEST_STD_VER 14
+#elif __cplusplus <= 201703L
+# define TEST_STD_VER 17
#else
-# define TEST_STD_VER 16 // current year; greater than current standard
+# define TEST_STD_VER 99 // greater than current standard
+// This is deliberately different than _LIBCPP_STD_VER to discourage matching them up.
#endif
#endif
diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html
index bd33b6e3c57..d9c44fc297a 100644
--- a/www/cxx1z_status.html
+++ b/www/cxx1z_status.html
@@ -161,6 +161,9 @@
Diagnose out of bounds tuple_element/variant_alternative
Toronto
Complete
+
+
+
+
+
Last Updated: 16-Jul-2017
+
+
+
diff --git a/www/index.html b/www/index.html
index 5dc13858d40..2e707dcb213 100644
--- a/www/index.html
+++ b/www/index.html
@@ -138,6 +138,8 @@
C++14 can be found here.
A list of features and changes for the next C++ standard, known here as
"C++1z" (probably to be C++17) can be found here.
+
A list of features and changes for the C++ standard beyond C++17, known here as
+ "C++2a" (probably to be C++20) can be found here.
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 here.