public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Giuliano Belinassi <giulianob@gcc.gnu.org>
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
Date: Tue, 18 Aug 2020 01:18:10 +0000 (GMT)	[thread overview]
Message-ID: <20200818011810.C11C03857C76@sourceware.org> (raw)

https://gcc.gnu.org/g:4dcee15414f38ccdb3882cdbe30ef41566d7442f

commit 4dcee15414f38ccdb3882cdbe30ef41566d7442f
Author: Jonathan Wakely <jwakely@redhat.com>
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{} );


                 reply	other threads:[~2020-08-18  1:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818011810.C11C03857C76@sourceware.org \
    --to=giulianob@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).