diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-07-30 16:04:59 +0100 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:20:16 -0300 |
commit | 4dcee15414f38ccdb3882cdbe30ef41566d7442f (patch) | |
tree | 25637a625f68cb9006d2e0c5f966cb72007c1126 | |
parent | ce6e78096f8ea798e31dbe982f50bf74de95a9f7 (diff) | |
download | gcc-4dcee15414f38ccdb3882cdbe30ef41566d7442f.zip gcc-4dcee15414f38ccdb3882cdbe30ef41566d7442f.tar.gz gcc-4dcee15414f38ccdb3882cdbe30ef41566d7442f.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/testsuite/20_util/from_chars/4.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/4.cc b/libstdc++-v3/testsuite/20_util/from_chars/4.cc index 23fc990..8148560 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{} ); |