From owner-svn-src-projects@freebsd.org  Sun Dec 24 01:16:29 2017
Return-Path: <owner-svn-src-projects@freebsd.org>
Delivered-To: svn-src-projects@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 DD1ABE89D8C
 for <svn-src-projects@mailman.ysv.freebsd.org>;
 Sun, 24 Dec 2017 01:16:29 +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 A4A5980683;
 Sun, 24 Dec 2017 01:16:29 +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 vBO1GSHc082855;
 Sun, 24 Dec 2017 01:16:28 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBO1GShe082853;
 Sun, 24 Dec 2017 01:16:28 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201712240116.vBO1GShe082853@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Sun, 24 Dec 2017 01:16:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject: svn commit: r327139 - projects/clang600-import/contrib/libc++/include
X-SVN-Group: projects
X-SVN-Commit-Author: dim
X-SVN-Commit-Paths: projects/clang600-import/contrib/libc++/include
X-SVN-Commit-Revision: 327139
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-projects@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: "SVN commit messages for the src &quot; projects&quot;
 tree" <svn-src-projects.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-projects>, 
 <mailto:svn-src-projects-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-projects/>
List-Post: <mailto:svn-src-projects@freebsd.org>
List-Help: <mailto:svn-src-projects-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-projects>, 
 <mailto:svn-src-projects-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Dec 2017 01:16:30 -0000

Author: dim
Date: Sun Dec 24 01:16:28 2017
New Revision: 327139
URL: https://svnweb.freebsd.org/changeset/base/327139

Log:
  Merge libc++ trunk r321414 to contrib/libc++.

Modified:
  projects/clang600-import/contrib/libc++/include/sstream
  projects/clang600-import/contrib/libc++/include/string_view
Directory Properties:
  projects/clang600-import/contrib/libc++/   (props changed)

Modified: projects/clang600-import/contrib/libc++/include/sstream
==============================================================================
--- projects/clang600-import/contrib/libc++/include/sstream	Sun Dec 24 01:15:12 2017	(r327138)
+++ projects/clang600-import/contrib/libc++/include/sstream	Sun Dec 24 01:16:28 2017	(r327139)
@@ -577,6 +577,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(
     if ((__wch & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out)
         && __way == ios_base::cur)
         return pos_type(-1);
+    const ptrdiff_t __hm = __hm_ == nullptr ? 0 : __hm_ - __str_.data();
     off_type __noff;
     switch (__way)
     {
@@ -590,13 +591,13 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(
             __noff = this->pptr() - this->pbase();
         break;
     case ios_base::end:
-        __noff = __hm_ - __str_.data();
+        __noff = __hm;
         break;
     default:
         return pos_type(-1);
     }
     __noff += __off;
-    if (__noff < 0 || __hm_ - __str_.data() < __noff)
+    if (__noff < 0 || __hm < __noff)
         return pos_type(-1);
     if (__noff != 0)
     {

Modified: projects/clang600-import/contrib/libc++/include/string_view
==============================================================================
--- projects/clang600-import/contrib/libc++/include/string_view	Sun Dec 24 01:15:12 2017	(r327138)
+++ projects/clang600-import/contrib/libc++/include/string_view	Sun Dec 24 01:16:28 2017	(r327139)
@@ -196,9 +196,9 @@ class _LIBCPP_TEMPLATE_VIS basic_string_view { (public
     // types
     typedef _Traits                                    traits_type;
     typedef _CharT                                     value_type;
-    typedef const _CharT*                              pointer;
+    typedef _CharT*                                    pointer;
     typedef const _CharT*                              const_pointer;
-    typedef const _CharT&                              reference;
+    typedef _CharT&                                    reference;
     typedef const _CharT&                              const_reference;
     typedef const_pointer                              const_iterator; // See [string.view.iterators]
     typedef const_iterator                             iterator;