From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id C11C03857C76; Tue, 18 Aug 2020 01:18:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C11C03857C76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597713490; bh=W/axthz9r3CM77AnixgQmeuq5A/HmnY3ihUbOWq3y2A=; h=From:To:Subject:Date:From; b=N0/zbIcDKCFI0L2Z0Pegp2z9qOBrv6DjDs1719iD1+c0iojhXewC4QtrOLOfyCyYS xoax51+XmBp5Xm+8jWGsCNJo3mN7BmJrBkuJSVnBB4fFguwB2nZJaRsUxUtIujywT8 +tUorq5I5/pAOknCPA21OFtKSynFDDdmcMncsbUo= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/giulianob/heads/autopar_rebase2)] libstdc++: Fix test for old string ABI X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/users/giulianob/heads/autopar_rebase2 X-Git-Oldrev: ce6e78096f8ea798e31dbe982f50bf74de95a9f7 X-Git-Newrev: 4dcee15414f38ccdb3882cdbe30ef41566d7442f Message-Id: <20200818011810.C11C03857C76@sourceware.org> Date: Tue, 18 Aug 2020 01:18:10 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 01:18:10 -0000 https://gcc.gnu.org/g:4dcee15414f38ccdb3882cdbe30ef41566d7442f commit 4dcee15414f38ccdb3882cdbe30ef41566d7442f Author: Jonathan Wakely Date: Thu Jul 30 16:04:59 2020 +0100 libstdc++: Fix test for old string ABI The COW string doesn't accept const_iterator arguments in insert and related member functions. Pass a mutable iterator instead. libstdc++-v3/ChangeLog: * testsuite/20_util/from_chars/4.cc: Pass non-const iterator to string::insert. Diff: --- libstdc++-v3/testsuite/20_util/from_chars/4.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util/from_chars/4.cc b/libstdc++-v3/testsuite/20_util/from_chars/4.cc index 23fc990bb38..8148560be48 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/4.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/4.cc @@ -338,7 +338,7 @@ test_max_mantissa() VERIFY( flt == val ); std::string s2 = s.substr(0, len - 5); - s2.insert(s2.cbegin() + orig_len - 1, '.'); + s2.insert(s2.begin() + orig_len - 1, '.'); s2 += "e000000000001"; res = std::from_chars(s.data(), s.data() + len, flt, fmt); VERIFY( res.ec == std::errc{} );