From owner-svn-src-all@freebsd.org Tue Aug 8 16:53:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DA0DDC317A; Tue, 8 Aug 2017 16:53:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DC8669DDB; Tue, 8 Aug 2017 16:53:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v78Grfct082777; Tue, 8 Aug 2017 16:53:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v78GreBB082767; Tue, 8 Aug 2017 16:53:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201708081653.v78GreBB082767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 8 Aug 2017 16:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r322264 - in vendor/libc++/dist: include test/std/input.output/string.streams/stringstream.cons test/std/thread/thread.mutex/thread.lock/thread.lock.scoped test/std/utilities/variant/va... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist: include test/std/input.output/string.streams/stringstream.cons test/std/thread/thread.mutex/thread.lock/thread.lock.scoped test/std/utilities/variant/variant.variant/variant.cto... X-SVN-Commit-Revision: 322264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2017 16:53:42 -0000 Author: dim Date: Tue Aug 8 16:53:40 2017 New Revision: 322264 URL: https://svnweb.freebsd.org/changeset/base/322264 Log: Vendor import of libc++ release_50 branch r310316: https://llvm.org/svn/llvm-project/libcxx/branches/release_50@310316 Modified: vendor/libc++/dist/include/__bsd_locale_defaults.h vendor/libc++/dist/include/__bsd_locale_fallbacks.h vendor/libc++/dist/include/__locale vendor/libc++/dist/include/mutex vendor/libc++/dist/include/sstream vendor/libc++/dist/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp vendor/libc++/dist/www/cxx1z_status.html vendor/libc++/dist/www/cxx2a_status.html Modified: vendor/libc++/dist/include/__bsd_locale_defaults.h ============================================================================== --- vendor/libc++/dist/include/__bsd_locale_defaults.h Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/include/__bsd_locale_defaults.h Tue Aug 8 16:53:40 2017 (r322264) @@ -15,6 +15,10 @@ #ifndef _LIBCPP_BSD_LOCALE_DEFAULTS_H #define _LIBCPP_BSD_LOCALE_DEFAULTS_H +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + #define __libcpp_mb_cur_max_l(loc) MB_CUR_MAX_L(loc) #define __libcpp_btowc_l(ch, loc) btowc_l(ch, loc) #define __libcpp_wctob_l(wch, loc) wctob_l(wch, loc) Modified: vendor/libc++/dist/include/__bsd_locale_fallbacks.h ============================================================================== --- vendor/libc++/dist/include/__bsd_locale_fallbacks.h Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/include/__bsd_locale_fallbacks.h Tue Aug 8 16:53:40 2017 (r322264) @@ -18,6 +18,10 @@ #include #include +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + _LIBCPP_BEGIN_NAMESPACE_STD inline _LIBCPP_ALWAYS_INLINE Modified: vendor/libc++/dist/include/__locale ============================================================================== --- vendor/libc++/dist/include/__locale Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/include/__locale Tue Aug 8 16:53:40 2017 (r322264) @@ -34,7 +34,7 @@ # include #elif defined(_NEWLIB_VERSION) # include -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ +#elif (defined(__APPLE__) || defined(__FreeBSD__) \ || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) # include #elif defined(__Fuchsia__) Modified: vendor/libc++/dist/include/mutex ============================================================================== --- vendor/libc++/dist/include/mutex Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/include/mutex Tue Aug 8 16:53:40 2017 (r322264) @@ -116,7 +116,7 @@ class scoped_lock // C++17 (public) using mutex_type = Mutex; // If MutexTypes... consists of the single type Mutex explicit scoped_lock(MutexTypes&... m); - scoped_lock(MutexTypes&... m, adopt_lock_t); + scoped_lock(adopt_lock_t, MutexTypes&... m); ~scoped_lock(); scoped_lock(scoped_lock const&) = delete; scoped_lock& operator=(scoped_lock const&) = delete; @@ -500,7 +500,7 @@ class _LIBCPP_TEMPLATE_VIS scoped_lock<_Mutex> { (publ ~scoped_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();} _LIBCPP_INLINE_VISIBILITY - explicit scoped_lock(mutex_type& __m, adopt_lock_t) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m)) + explicit scoped_lock(adopt_lock_t, mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m)) : __m_(__m) {} scoped_lock(scoped_lock const&) = delete; @@ -522,7 +522,7 @@ class _LIBCPP_TEMPLATE_VIS scoped_lock (public) } _LIBCPP_INLINE_VISIBILITY - scoped_lock(_MArgs&... __margs, adopt_lock_t) + scoped_lock(adopt_lock_t, _MArgs&... __margs) : __t_(__margs...) { } Modified: vendor/libc++/dist/include/sstream ============================================================================== --- vendor/libc++/dist/include/sstream Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/include/sstream Tue Aug 8 16:53:40 2017 (r322264) @@ -249,7 +249,8 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_st template basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type& __s, ios_base::openmode __wch) - : __hm_(0), + : __str_(__s.get_allocator()), + __hm_(0), __mode_(__wch) { str(__s); Modified: vendor/libc++/dist/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp Tue Aug 8 16:53:40 2017 (r322264) @@ -18,6 +18,16 @@ #include #include +template +struct NoDefaultAllocator : std::allocator +{ + template struct rebind { using other = NoDefaultAllocator; }; + NoDefaultAllocator(int id_) : id(id_) { } + template NoDefaultAllocator(const NoDefaultAllocator& a) : id(a.id) { } + int id; +}; + + int main() { { @@ -45,5 +55,14 @@ int main() assert(i == 456); ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); + } + { // This is https://bugs.llvm.org/show_bug.cgi?id=33727 + typedef std::basic_string , NoDefaultAllocator > S; + typedef std::basic_stringbuf, NoDefaultAllocator > SB; + + S s(NoDefaultAllocator(1)); + SB sb(s); + // This test is not required by the standard, but *where else* could it get the allocator? + assert(sb.str().get_allocator() == s.get_allocator()); } } Modified: vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/adopt_lock.pass.cpp Tue Aug 8 16:53:40 2017 (r322264) @@ -14,7 +14,7 @@ // template class scoped_lock; -// scoped_lock(Mutex&..., adopt_lock_t); +// scoped_lock(adopt_lock_t, Mutex&...); #include #include @@ -43,7 +43,7 @@ int main() using LG = std::scoped_lock; m1.lock(); { - LG lg(m1, std::adopt_lock); + LG lg(std::adopt_lock, m1); assert(m1.locked); } assert(!m1.locked); @@ -53,7 +53,7 @@ int main() using LG = std::scoped_lock; m1.lock(); m2.lock(); { - LG lg(m1, m2, std::adopt_lock); + LG lg(std::adopt_lock, m1, m2); assert(m1.locked && m2.locked); } assert(!m1.locked && !m2.locked); @@ -63,7 +63,7 @@ int main() using LG = std::scoped_lock; m1.lock(); m2.lock(); m3.lock(); { - LG lg(m1, m2, m3, std::adopt_lock); + LG lg(std::adopt_lock, m1, m2, m3); assert(m1.locked && m2.locked && m3.locked); } assert(!m1.locked && !m2.locked && !m3.locked); Modified: vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp Tue Aug 8 16:53:40 2017 (r322264) @@ -261,4 +261,13 @@ int main() { test_copy_ctor_valueless_by_exception(); test_copy_ctor_sfinae(); test_constexpr_copy_ctor_extension(); +#if 0 +// disable this for the moment; it fails on older compilers. +// Need to figure out which compilers will support it. +{ // This is the motivating example from P0739R0 + std::variant v1(3); + std::variant v2 = v1; + (void) v2; +} +#endif } Modified: vendor/libc++/dist/www/cxx1z_status.html ============================================================================== --- vendor/libc++/dist/www/cxx1z_status.html Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/www/cxx1z_status.html Tue Aug 8 16:53:40 2017 (r322264) @@ -39,6 +39,8 @@

In February 2017, the C++ standard committee approved this draft, and sent it to ISO for approval as C++17

This page shows the status of libc++; the status of clang's support of the language features is here.

+

Reminder: Features in unreleased drafts of the standard are subject to change.

+

The groups that have contributed papers:

  • LWG - Library working group
  • @@ -163,7 +165,7 @@ P0623R0LWGFinal C++17 Parallel Algorithms FixesKona P0682R1LWGRepairing elementary string conversionsToronto - P0739R0LWGSome improvements to class template argument deduction integration into the standard libraryToronto + P0739R0LWGSome improvements to class template argument deduction integration into the standard libraryTorontoComplete5.0 @@ -497,7 +499,7 @@ -

    Last Updated: 25-May-2017

    +

    Last Updated: 27-Jul-2017

    Modified: vendor/libc++/dist/www/cxx2a_status.html ============================================================================== --- vendor/libc++/dist/www/cxx2a_status.html Tue Aug 8 16:53:34 2017 (r322263) +++ vendor/libc++/dist/www/cxx2a_status.html Tue Aug 8 16:53:40 2017 (r322264) @@ -38,6 +38,8 @@

    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.

    +

    Reminder: Features in unreleased drafts of the standard are subject to change.

    +

    The groups that have contributed papers:

    • LWG - Library working group