aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-19 07:02:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-19 07:02:49 +0000
commit97a708bebca0e58714a1e005445ff28d0c1c2ca5 (patch)
treeca5965646804934581ceb1c2894df9431a357e8c
parent289ae9e3ac13cefd468cfb852e8b9f52e984de08 (diff)
downloadsrc-97a708bebca0e58714a1e005445ff28d0c1c2ca5.tar.gz
src-97a708bebca0e58714a1e005445ff28d0c1c2ca5.zip
Vendor import of libc++ trunk r308421:vendor/libc++/libc++-trunk-r308421
Notes
Notes: svn path=/vendor/libc++/dist/; revision=321190 svn path=/vendor/libc++/libc++-trunk-r308421/; revision=321191; tag=vendor/libc++/libc++-trunk-r308421
-rw-r--r--docs/DesignDocs/VisibilityMacros.rst11
-rw-r--r--include/__config14
-rw-r--r--include/algorithm7
-rw-r--r--include/string9
-rw-r--r--include/vector7
-rw-r--r--lib/CMakeLists.txt2
-rw-r--r--test/support/test_macros.h5
-rw-r--r--www/cxx1z_status.html8
-rw-r--r--www/cxx2a_status.html90
-rw-r--r--www/index.html2
-rw-r--r--www/upcoming_meeting.html6
11 files changed, 123 insertions, 38 deletions
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst
index 694882dd2638..993ce2cca5fd 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 003e1ea60c60..f15d2d06e564 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 <unsigned> 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 9fe0361e577d..4542275adfda 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*, char*, __less<char>&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&))
@@ -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*, long double*, __less<long double>&))
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&))
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
// lower_bound
diff --git a/include/string b/include/string
index 010a4c7816ea..cf42f529c701 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<true>)
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
#ifdef _LIBCPP_NO_EXCEPTIONS
template <class _Iter>
@@ -4006,7 +3999,7 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator*
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<char>)
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>)
-_LIBCPP_EXTERN_TEMPLATE(string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&))
+_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS string operator+<char, char_traits<char>, allocator<char> >(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 ee19fb7081a2..6e9920a0f80f 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<true>)
-#ifdef _LIBCPP_MSVC
-#pragma warning( pop )
-#endif // _LIBCPP_MSVC
template <class _Tp, class _Allocator>
class __vector_base
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 9fc0d1394336..578651423f3b 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 "$<TARGET_LINKER_FILE:${LIBCXX_CXX_ABI_LIBRARY}>")
else()
set(MERGE_ARCHIVES_ABI_TARGET
diff --git a/test/support/test_macros.h b/test/support/test_macros.h
index cc2918a0875a..95270e437905 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 bd33b6e3c574..d9c44fc297ac 100644
--- a/www/cxx1z_status.html
+++ b/www/cxx1z_status.html
@@ -161,6 +161,9 @@
<tr><td><a href="http://wg21.link/P0607R0">P0607R0</a></td><td>LWG</td><td>Inline Variables for the Standard Library</td><td>Kona</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0618R0">P0618R0</a></td><td>LWG</td><td>Deprecating &lt;codecvt&gt;</td><td>Kona</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0623R0">P0623R0</a></td><td>LWG</td><td>Final C++17 Parallel Algorithms Fixes</td><td>Kona</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://wg21.link/P0682R1">P0682R1</a></td><td>LWG</td><td>Repairing elementary string conversions</td><td>Toronto</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0739R0">P0739R0</a></td><td>LWG</td><td>Some improvements to class template argument deduction integration into the standard library</td><td>Toronto</td><td></td><td></td></tr>
<!-- <tr><td></td><td></td><td></td><td></td><td></td><td></td></tr> -->
</table>
@@ -483,6 +486,11 @@
<tr><td><a href="http://wg21.link/LWG2911">2911</a></td><td>An is_aggregate type trait is needed</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2921">2921</a></td><td>packaged_task and type-erased allocators</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2934">2934</a></td><td>optional&lt;const T&gt; doesn't compare with T</td><td>Kona</td><td>Complete</td></tr>
+ <tr><td></td><td></td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2901">2901</a></td><td>Variants cannot properly support allocators</td><td>Toronto</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2955">2955</a></td><td><tt>to_chars / from_chars</tt> depend on <tt>std::string</tt></td><td>Toronto</td><td>Resolved by <a href="https://wg21.link/P0682R1">P0682R1</a></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2956">2956</a></td><td><tt>filesystem::canonical()</tt> still defined in terms of <tt>absolute(p, base)</tt></td><td>Toronto</td><td>Complete</td></tr>
+
<!--
<tr><td><a href="http://wg21.link/LWG1214">1214</a></td><td>Insufficient/inconsistent key immutability requirements for associative containers</td><td>Urbana</td><td></td></tr>
-->
diff --git a/www/cxx2a_status.html b/www/cxx2a_status.html
new file mode 100644
index 000000000000..2c9f878b623f
--- /dev/null
+++ b/www/cxx2a_status.html
@@ -0,0 +1,90 @@
+<!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=utf-8">
+ <title>libc++ C++2a 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.llvm.org/mailman/listinfo/cfe-dev">cfe-dev</a>
+ <a href="http://lists.llvm.org/mailman/listinfo/cfe-commits">cfe-commits</a>
+ <a href="https://bugs.llvm.org/">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>libc++ C++2a Status</h1>
+ <!--*********************************************************************-->
+
+ <p>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).</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#cxx2a">here</a>.</p>
+
+ <p>The groups that have contributed papers:
+ <ul>
+ <li>LWG - Library working group</li>
+ <li>CWG - Core Language Working group</li>
+ <li>SG1 - Study group #1 (Concurrency working group)</li>
+ </ul>
+ </p>
+
+ <h3>Paper Status</h3>
+ <table id="papers" border="1">
+ <tr><th>Paper #</th><th>Group</th><th>Paper Name</th><th>Meeting</th><th>Status</th><th>First released version</th></tr>
+<!--
+ <tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3346.pdf">3346</a></td><td>LWG</td><td>Terminology for Container Element Requirements - Rev 1</td><td>Kona</td><td>Complete</td><td>3.4</td></tr>
+-->
+ <tr><td><a href="https://wg21.link/P0463R1">P0463R1</a></td><td>LWG</td><td>Endian just Endian</td><td>Toronto</td><td></td><td></td></tr>
+ <tr><td><a href="https://wg21.link/P0674R1">P0674R1</a></td><td>LWG</td><td>Extending make_shared to Support Arrays</td><td>Toronto</td><td></td><td></td></tr>
+
+<!-- <tr><td></td><td></td><td></td><td></td><td></td><td></td></tr> -->
+ </table>
+
+<p><i>[ Note: "Nothing to do" means that no library changes were needed to implement this change -- end note]</i></p>
+
+ <h3>Library Working group Issues Status</h3>
+<!-- <I>Note: "NAD" means that the issue was deemed "Not a defect"</I> -->
+ <table id="issues" border="1">
+ <tr><th>Issue #</th><th>Issue Name</th><th>Meeting</th><th>Status</th></tr>
+<!--
+ <tr><td><a href="http://wg21.link/LWG1214">1214</a></td><td>Insufficient/inconsistent key immutability requirements for associative containers</td><td>Urbana</td><td></td></tr>
+-->
+ <tr><td><a href="http://wg21.link/LWG2070">2070</a></td><td><tt>allocate_shared</tt> should use <tt>allocator_traits&lt;A&gt;::construct</tt></td><td>Toronto</td><td>Resolved by <a href="https://wg21.link/P0674R1">P0674R1</a></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2444">2444</a></td><td>Inconsistent complexity for <tt>std::sort_heap</tt></td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2593">2593</a></td><td>Moved-from state of Allocators</td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2597">2597</a></td><td><tt>std::log</tt> misspecified for complex numbers</td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2783">2783</a></td><td><tt>stack::emplace()</tt> and <tt>queue::emplace()</tt> should return <tt>decltype(auto)</tt></td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2932">2932</a></td><td>Constraints on parallel algorithm implementations are underspecified</td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2937">2937</a></td><td>Is <tt>equivalent("existing_thing", "not_existing_thing")</tt> an error</td><td>Toronto</td><td>Complete</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2940">2940</a></td><td><tt>result_of</tt> specification also needs a little cleanup</td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2942">2942</a></td><td>LWG 2873's resolution missed <tt>weak_ptr::owner_before</tt></td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2954">2954</a></td><td>Specialization of the convenience variable templates should be prohibited</td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2961">2961</a></td><td>Bad postcondition for <tt>set_default_resource</tt></td><td>Toronto</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2966">2966</a></td><td>Incomplete resolution of US 74</td><td>Toronto</td><td><i>Nothing to do</i></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2974">2974</a></td><td>Diagnose out of bounds <tt>tuple_element/variant_alternative</tt></td><td>Toronto</td><td>Complete</td></tr>
+
+<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
+ </table>
+
+ <p>Last Updated: 16-Jul-2017</p>
+</div>
+</body>
+</html>
diff --git a/www/index.html b/www/index.html
index 5dc13858d400..2e707dcb2137 100644
--- a/www/index.html
+++ b/www/index.html
@@ -138,6 +138,8 @@
C++14 can be found <a href="cxx1y_status.html">here</a>.</p>
<p>A list of features and changes for the next C++ standard, known here as
"C++1z" (probably to be C++17) can be found <a href="cxx1z_status.html">here</a>.</p>
+ <p>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 <a href="cxx2a_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>
diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html
index f1a99fdef2d8..f90f4661266d 100644
--- a/www/upcoming_meeting.html
+++ b/www/upcoming_meeting.html
@@ -73,7 +73,11 @@
<tr><td><a href="http://wg21.link/LWG2974">2974</a></td><td>Diagnose out of bounds tuple_element/variant_alternative</td><td>Toronto</td><td></td></tr>
<tr><td></td><td><center><b>Priority 1 Bugs</b></center></td><td></td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Kona</td><td>We do this already</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2665">2665</a></td><td>remove_filename() post condition is incorrect</td><td>Toronto</td><td>We do this already</td></tr>
+
+ <tr><td></td><td><center><b>Immediate Issues in Toronto</b></center></td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2901">2901</a></td><td>Variants cannot properly support allocators</td><td>Toronto</td><td>We do this already</td></tr>
+ <tr><td><a href="http://wg21.link/LWG2956">2956</a></td><td><tt>filesystem::canonical()</tt> still defined in terms of <tt>absolute(p, base)</tt></td><td>Toronto</td><td></td></tr>
</table>