From 97a708bebca0e58714a1e005445ff28d0c1c2ca5 Mon Sep 17 00:00:00 2001
From: Dimitry Andric
Date: Wed, 19 Jul 2017 07:02:49 +0000
Subject: [PATCH] Vendor import of libc++ trunk r308421:
https://llvm.org/svn/llvm-project/libcxx/trunk@308421
---
docs/DesignDocs/VisibilityMacros.rst | 11 ++--
include/__config | 14 ++---
include/algorithm | 7 ---
include/string | 9 +--
include/vector | 7 ---
lib/CMakeLists.txt | 2 +-
test/support/test_macros.h | 5 +-
www/cxx1z_status.html | 8 +++
www/cxx2a_status.html | 90 ++++++++++++++++++++++++++++
www/index.html | 2 +
www/upcoming_meeting.html | 6 +-
11 files changed, 123 insertions(+), 38 deletions(-)
create mode 100644 www/cxx2a_status.html
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 @@
P0607R0 LWG Inline Variables for the Standard Library Kona
P0618R0 LWG Deprecating <codecvt> Kona
P0623R0 LWG Final C++17 Parallel Algorithms Fixes Kona
+
+ P0682R1 LWG Repairing elementary string conversions Toronto
+ P0739R0 LWG Some improvements to class template argument deduction integration into the standard library Toronto
@@ -483,6 +486,11 @@
2911 An is_aggregate type trait is needed Kona Complete
2921 packaged_task and type-erased allocators Kona
2934 optional<const T> doesn't compare with T Kona Complete
+
+ 2901 Variants cannot properly support allocators Toronto Complete
+ 2955 to_chars / from_chars depend on std::string Toronto Resolved by P0682R1
+ 2956 filesystem::canonical() still defined in terms of absolute(p, base) Toronto Complete
+
diff --git a/www/cxx2a_status.html b/www/cxx2a_status.html
new file mode 100644
index 00000000000..2c9f878b623
--- /dev/null
+++ b/www/cxx2a_status.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+ libc++ C++2a Status
+
+
+
+
+
+
+
+
+
+
libc++ C++2a Status
+
+
+
In July 2017, the C++ standard committee created a draft for the next version of the C++ standard, known here as "C++2a" (probably to be C++20).
+
This page shows the status of libc++; the status of clang's support of the language features is here .
+
+
The groups that have contributed papers:
+
+ LWG - Library working group
+ CWG - Core Language Working group
+ SG1 - Study group #1 (Concurrency working group)
+
+
+
+
Paper Status
+
+ Paper # Group Paper Name Meeting Status First released version
+
+ P0463R1 LWG Endian just Endian Toronto
+ P0674R1 LWG Extending make_shared to Support Arrays Toronto
+
+
+
+
+
[ Note: "Nothing to do" means that no library changes were needed to implement this change -- end note]
+
+
Library Working group Issues Status
+
+
+ Issue # Issue Name Meeting Status
+
+ 2070 allocate_shared should use allocator_traits<A>::construct Toronto Resolved by P0674R1
+ 2444 Inconsistent complexity for std::sort_heap Toronto
+ 2593 Moved-from state of Allocators Toronto
+ 2597 std::log misspecified for complex numbersToronto
+ 2783 stack::emplace() and queue::emplace() should return decltype(auto) Toronto
+ 2932 Constraints on parallel algorithm implementations are underspecified Toronto
+ 2937 Is equivalent("existing_thing", "not_existing_thing") an error Toronto Complete
+ 2940 result_of specification also needs a little cleanupToronto
+ 2942 LWG 2873's resolution missed weak_ptr::owner_before Toronto
+ 2954 Specialization of the convenience variable templates should be prohibited Toronto
+ 2961 Bad postcondition for set_default_resource Toronto
+ 2966 Incomplete resolution of US 74 Toronto Nothing to do
+ 2974 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 .
diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html
index f1a99fdef2d..f90f4661266 100644
--- a/www/upcoming_meeting.html
+++ b/www/upcoming_meeting.html
@@ -73,7 +73,11 @@
2974 Diagnose out of bounds tuple_element/variant_alternative Toronto
Priority 1 Bugs
- 2665 remove_filename() post condition is incorrect Kona We do this already
+ 2665 remove_filename() post condition is incorrect Toronto We do this already
+
+ Immediate Issues in Toronto
+ 2901 Variants cannot properly support allocators Toronto We do this already
+ 2956 filesystem::canonical() still defined in terms of absolute(p, base) Toronto